From 54ee6994e66936c1d532f7718c858c9b18e3c91d Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Thu, 28 Jul 2016 17:40:32 +0200 Subject: Add a checksum to the generated QML compilation units Change-Id: Icd5b1d805059981cbbb4c0eb2a5c842d59223839 Reviewed-by: Ulf Hermann --- src/qml/compiler/qv4compileddata_p.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/qml/compiler/qv4compileddata_p.h') 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 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 +{ + bool addToHash(QCryptographicHash *hash, QQmlEngine *engine) const; +}; +#else +struct ResolvedTypeReferenceMap {}; #endif // index is per-object binding index -- cgit v1.2.3