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.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/qml/compiler/qv4compileddata.cpp') diff --git a/src/qml/compiler/qv4compileddata.cpp b/src/qml/compiler/qv4compileddata.cpp index 2aab1743cc..83ae9c56df 100644 --- a/src/qml/compiler/qv4compileddata.cpp +++ b/src/qml/compiler/qv4compileddata.cpp @@ -579,6 +579,19 @@ void ResolvedTypeReference::doDynamicTypeCheck() mo = compilationUnit->rootPropertyCache()->firstCppMetaObject(); isFullyDynamicType = qtTypeInherits(mo); } + +bool ResolvedTypeReferenceMap::addToHash(QCryptographicHash *hash, QQmlEngine *engine) const +{ + for (auto it = constBegin(), end = constEnd(); it != end; ++it) { + QQmlPropertyCache *pc = it.value()->createPropertyCache(engine); + bool ok = false; + hash->addData(pc->checksum(&ok)); + if (!ok) + return false; + } + return true; +} + #endif } -- cgit v1.2.3