aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml.pro
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2017-09-07 13:02:57 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2017-09-07 13:37:35 +0000
commitaff417321d0aad5da462a63b103b82bc19809841 (patch)
tree3a05c4d25c6a605acc0e49f41a0815cee8931f3f /src/qml/qml.pro
parent161159bfec511112daa7ad0fe1d2375edbf41401 (diff)
Fix crashes in QML apps when upgrading Qt snapshots
When upgrading from one Qt snapshot to another, we may not end up bumping the Qt version. However we do need to re-generate QML cache files. Therefore let's encode the commit hash of declarative in the checksums. Task-number: QTBUG-62302 Change-Id: Ia597fcbe05ea2d32664da2572a1b35c624490095 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src/qml/qml.pro')
-rw-r--r--src/qml/qml.pro13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/qml/qml.pro b/src/qml/qml.pro
index be3956bb61..e9d7dcbd2d 100644
--- a/src/qml/qml.pro
+++ b/src/qml/qml.pro
@@ -16,6 +16,19 @@ gcc:isEqual(QT_ARCH, "mips"): QMAKE_CXXFLAGS += -fno-reorder-blocks
DEFINES += QT_NO_FOREACH
+tagFile=$$PWD/../../.tag
+tag=
+exists($$tagFile) {
+ tag=$$cat($$tagFile, singleline)
+ QMAKE_INTERNAL_INCLUDED_FILES += $$tagFile
+}
+!equals(tag, "$${LITERAL_DOLLAR}Format:%H$${LITERAL_DOLLAR}") {
+ DEFINES += QML_COMPILE_HASH="$$tag"
+} else:exists($$PWD/../../.git) {
+ commit=$$system(git describe --tags --always --long --dirty)
+ DEFINES += QML_COMPILE_HASH="$$commit"
+}
+
exists("qqml_enable_gcov") {
QMAKE_CXXFLAGS = -fprofile-arcs -ftest-coverage -fno-elide-constructors
LIBS_PRIVATE += -lgcov