aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2018-02-15 22:14:42 -0800
committerThiago Macieira <thiago.macieira@intel.com>2018-02-21 21:30:10 +0000
commitc9398266d804d570f305590df9481028c9880175 (patch)
treea3346850881f789f274f277ff046161e267a361e /src/qml/compiler
parente4bea7805a229d3625f110f844d908e2abe790b5 (diff)
Move the QML_COMPILE_HASH macro definition from the command-line
If it's in the command-line, it is added to the precompiled header, which won't be regenerated if the macro changed. Instead, let's create a header that can be #included only in the file it needs to. Since qmldevtools compiles the file that has this new #include, we need to ensure it was created before the module is compiled. Change-Id: I940917d6763842499b18fffd1513b9c64cd98387 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/compiler')
-rw-r--r--src/qml/compiler/qv4compileddata.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/qml/compiler/qv4compileddata.cpp b/src/qml/compiler/qv4compileddata.cpp
index 86200d7df7..05869c3287 100644
--- a/src/qml/compiler/qv4compileddata.cpp
+++ b/src/qml/compiler/qv4compileddata.cpp
@@ -65,6 +65,9 @@
#include <QCryptographicHash>
#include <QSaveFile>
+// generated by qmake:
+#include "qml_compile_hash_p.h"
+
#include <algorithm>
#if defined(QT_BUILD_INTERNAL)
@@ -703,10 +706,8 @@ static QByteArray ownLibraryChecksum()
libraryChecksum = hash.result();
}
}
-#elif defined(QML_COMPILE_HASH)
- libraryChecksum = QByteArray(QT_STRINGIFY(QML_COMPILE_HASH));
#else
- // Not implemented.
+ libraryChecksum = QByteArray(QML_COMPILE_HASH);
#endif
return libraryChecksum;
}