aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4compileddata_p.h
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/qv4compileddata_p.h
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/qv4compileddata_p.h')
-rw-r--r--src/qml/compiler/qv4compileddata_p.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/qml/compiler/qv4compileddata_p.h b/src/qml/compiler/qv4compileddata_p.h
index 49360bc3f1..1df9d6794f 100644
--- a/src/qml/compiler/qv4compileddata_p.h
+++ b/src/qml/compiler/qv4compileddata_p.h
@@ -72,7 +72,7 @@
QT_BEGIN_NAMESPACE
// Bump this whenever the compiler data structures change in an incompatible way.
-#define QV4_DATA_STRUCTURE_VERSION 0x18
+#define QV4_DATA_STRUCTURE_VERSION 0x19
class QIODevice;
class QQmlPropertyCache;
@@ -688,6 +688,8 @@ struct Unit
quint32_le unitSize; // Size of the Unit and any depending data.
// END DO NOT CHANGE THESE FIELDS EVER
+ char libraryVersionHash[48];
+
char md5Checksum[16]; // checksum of all bytes following this field.
void generateChecksum();
@@ -793,7 +795,7 @@ struct Unit
}
};
-static_assert(sizeof(Unit) == 144, "Unit structure needs to have the expected size to be binary compatible on disk when generated by host compiler and loaded by target");
+static_assert(sizeof(Unit) == 192, "Unit structure needs to have the expected size to be binary compatible on disk when generated by host compiler and loaded by target");
struct TypeReference
{