- exports.removeDuplicates();
- qSort(exports);
-
- qml->writeArrayBinding(QLatin1String("exports"), exports);
+ QStringList exportStrings = exports.keys();
+ qSort(exportStrings);
+ qml->writeArrayBinding(QLatin1String("exports"), exportStrings);
+
+ // write meta object revisions unless they're all zero
+ QStringList metaObjectRevisions;
+ bool shouldWriteMetaObjectRevisions = false;
+ foreach (const QString &exportString, exportStrings) {
+ int metaObjectRevision = exports[exportString]->metaObjectRevision();
+ if (metaObjectRevision != 0)
+ shouldWriteMetaObjectRevisions = true;
+ metaObjectRevisions += QString::number(metaObjectRevision);
+ }
+ if (shouldWriteMetaObjectRevisions)
+ qml->writeArrayBinding(QLatin1String("exportMetaObjectRevisions"), metaObjectRevisions);