aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4compileddata_p.h
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2016-07-28 17:40:32 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2016-08-02 07:22:26 +0000
commit54ee6994e66936c1d532f7718c858c9b18e3c91d (patch)
treecd4620b0d41dfe3f20164e570ed64faa8fa663ac /src/qml/compiler/qv4compileddata_p.h
parentfa53d4e35433cc59e99b24f16f18c713683c1a80 (diff)
Add a checksum to the generated QML compilation units
Change-Id: Icd5b1d805059981cbbb4c0eb2a5c842d59223839 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qml/compiler/qv4compileddata_p.h')
-rw-r--r--src/qml/compiler/qv4compileddata_p.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/qml/compiler/qv4compileddata_p.h b/src/qml/compiler/qv4compileddata_p.h
index 82e303f27d..519708f089 100644
--- a/src/qml/compiler/qv4compileddata_p.h
+++ b/src/qml/compiler/qv4compileddata_p.h
@@ -611,6 +611,7 @@ struct Unit
LEUInt32 architectureIndex; // string index to QSysInfo::buildAbi()
LEUInt32 codeGeneratorIndex;
+ char dependencyMD5Checksum[16];
enum : unsigned int {
IsJavascript = 0x1,
@@ -788,7 +789,14 @@ struct ResolvedTypeReference
void doDynamicTypeCheck();
};
// map from name index
-typedef QHash<int, ResolvedTypeReference*> ResolvedTypeReferenceMap;
+// While this could be a hash, a map is chosen here to provide a stable
+// order, which is used to calculating a check-sum on dependent meta-objects.
+struct ResolvedTypeReferenceMap: public QMap<int, ResolvedTypeReference*>
+{
+ bool addToHash(QCryptographicHash *hash, QQmlEngine *engine) const;
+};
+#else
+struct ResolvedTypeReferenceMap {};
#endif
// index is per-object binding index