diff options
Diffstat (limited to 'src/qml/jsruntime')
4 files changed, 8 insertions, 6 deletions
diff --git a/src/qml/jsruntime/qv4executablecompilationunit.cpp b/src/qml/jsruntime/qv4executablecompilationunit.cpp index 7c02391a1a..6e0d07210c 100644 --- a/src/qml/jsruntime/qv4executablecompilationunit.cpp +++ b/src/qml/jsruntime/qv4executablecompilationunit.cpp @@ -858,7 +858,8 @@ bool ExecutableCompilationUnit::saveToDisk(const QUrl &unitUrl, QString *errorSt This function creates a temporary key vector and sorts it to guarantuee a stable hash. This is used to calculate a check-sum on dependent meta-objects. */ -bool ResolvedTypeReferenceMap::addToHash(QCryptographicHash *hash) const +bool ResolvedTypeReferenceMap::addToHash( + QCryptographicHash *hash, QHash<quintptr, QByteArray> *checksums) const { std::vector<int> keys (count()); int i = 0; @@ -868,7 +869,7 @@ bool ResolvedTypeReferenceMap::addToHash(QCryptographicHash *hash) const } std::sort(keys.begin(), keys.end()); for (int key: keys) { - if (!this->operator[](key)->addToHash(hash)) + if (!this->operator[](key)->addToHash(hash, checksums)) return false; } diff --git a/src/qml/jsruntime/qv4executablecompilationunit_p.h b/src/qml/jsruntime/qv4executablecompilationunit_p.h index 6798829898..c093033aab 100644 --- a/src/qml/jsruntime/qv4executablecompilationunit_p.h +++ b/src/qml/jsruntime/qv4executablecompilationunit_p.h @@ -94,7 +94,7 @@ class ResolvedTypeReference; // map from name index struct ResolvedTypeReferenceMap: public QHash<int, ResolvedTypeReference*> { - bool addToHash(QCryptographicHash *hash) const; + bool addToHash(QCryptographicHash *hash, QHash<quintptr, QByteArray> *checksums) const; }; class Q_QML_PRIVATE_EXPORT ExecutableCompilationUnit final: public CompiledData::CompilationUnit, diff --git a/src/qml/jsruntime/qv4resolvedtypereference.cpp b/src/qml/jsruntime/qv4resolvedtypereference.cpp index 96bddccf83..4ac68611f4 100644 --- a/src/qml/jsruntime/qv4resolvedtypereference.cpp +++ b/src/qml/jsruntime/qv4resolvedtypereference.cpp @@ -100,11 +100,12 @@ QQmlRefPointer<QQmlPropertyCache> ResolvedTypeReference::createPropertyCache() } } -bool ResolvedTypeReference::addToHash(QCryptographicHash *hash) +bool ResolvedTypeReference::addToHash( + QCryptographicHash *hash, QHash<quintptr, QByteArray> *checksums) { if (m_type.isValid() && !m_type.isInlineComponentType()) { bool ok = false; - hash->addData(createPropertyCache()->checksum(&ok)); + hash->addData(createPropertyCache()->checksum(checksums, &ok)); return ok; } if (!m_compilationUnit) diff --git a/src/qml/jsruntime/qv4resolvedtypereference_p.h b/src/qml/jsruntime/qv4resolvedtypereference_p.h index 61e683ce17..582c3a5d0a 100644 --- a/src/qml/jsruntime/qv4resolvedtypereference_p.h +++ b/src/qml/jsruntime/qv4resolvedtypereference_p.h @@ -75,7 +75,7 @@ public: QQmlRefPointer<QQmlPropertyCache> propertyCache() const; QQmlRefPointer<QQmlPropertyCache> createPropertyCache(); - bool addToHash(QCryptographicHash *hash); + bool addToHash(QCryptographicHash *hash, QHash<quintptr, QByteArray> *checksums); void doDynamicTypeCheck(); |