aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4compiler.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2018-03-12 16:33:01 +0100
committerSimon Hausmann <simon.hausmann@qt.io>2018-03-20 09:44:15 +0000
commit80592dcf0df3bce6177e8e051e88af7b9e6b3f6e (patch)
tree2b7f68ef624bb0913e35fa56f5d7326a806217c1 /src/qml/compiler/qv4compiler.cpp
parent64e90f393146dadb382d154e7d67a9109ab2492a (diff)
Tighten QML cache version checking
Don't just include the "compile hash" of QtQml in the dependencies hash of QML files but use a dedicated field in the data structure, that we will also fill in when generating cache files ahead of time. This ensures that AOT generated cache files are considered invalid even when switching between different sha1s of declarative. Task-number: QTBUG-66986 Change-Id: I3d8ee103fd1a33a5b4c4576b3a2703fcd09712dd Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Diffstat (limited to 'src/qml/compiler/qv4compiler.cpp')
-rw-r--r--src/qml/compiler/qv4compiler.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/qml/compiler/qv4compiler.cpp b/src/qml/compiler/qv4compiler.cpp
index ccc909c199..c9e535c93f 100644
--- a/src/qml/compiler/qv4compiler.cpp
+++ b/src/qml/compiler/qv4compiler.cpp
@@ -48,6 +48,9 @@
#include <wtf/MathExtras.h>
#include <QCryptographicHash>
+// generated by qmake:
+#include "qml_compile_hash_p.h"
+
QV4::Compiler::StringTableGenerator::StringTableGenerator()
{
clear();
@@ -396,6 +399,7 @@ QV4::CompiledData::Unit QV4::Compiler::JSUnitGenerator::generateHeader(QV4::Comp
unit.flags |= module->unitFlags;
unit.version = QV4_DATA_STRUCTURE_VERSION;
unit.qtVersion = QT_VERSION;
+ qstrcpy(unit.libraryVersionHash, QML_COMPILE_HASH);
memset(unit.md5Checksum, 0, sizeof(unit.md5Checksum));
memset(unit.dependencyMD5Checksum, 0, sizeof(unit.dependencyMD5Checksum));