summaryrefslogtreecommitdiffstats
path: root/mkspecs
diff options
context:
space:
mode:
authorJonathan Liu <net147@gmail.com>2013-06-06 02:42:13 (GMT)
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-06-06 15:44:45 (GMT)
commitb5f252a7564e5b51689ca3a95125eabaec4ffea4 (patch)
tree4c1219e28320b51835a4d5de536b7ef765239da7 /mkspecs
parentd1f391b1bb75b0f466e93f818674dde2e9135f36 (diff)
downloadQt-b5f252a7564e5b51689ca3a95125eabaec4ffea4.zip
Qt-b5f252a7564e5b51689ca3a95125eabaec4ffea4.tar.gz
Qt-b5f252a7564e5b51689ca3a95125eabaec4ffea4.tar.bz2
Don't overwrite QMAKE_QT_CONFIG with empty value
If the mkspec sets QMAKE_QT_CONFIG, QMAKE_QT_CONFIG may be overwritten with an empty value from .qmake.cache. Avoid this by first checking if the value from .qmake.cache is not empty before assigning it to QMAKE_QT_CONFIG. This was already addressed differently in Qt 5. Change-Id: I95fa630139b8798156a2fb15d0dde630a0a53a0a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Diffstat (limited to 'mkspecs')
-rw-r--r--mkspecs/features/qt_config.prf6
1 files changed, 5 insertions, 1 deletions
diff --git a/mkspecs/features/qt_config.prf b/mkspecs/features/qt_config.prf
index fc14cdd..e059b7e 100644
--- a/mkspecs/features/qt_config.prf
+++ b/mkspecs/features/qt_config.prf
@@ -1,7 +1,11 @@
# This file is loaded by the mkspecs, before .qmake.cache has been loaded.
# Consequently, we have to do some stunts to get values out of the cache.
-exists($$_QMAKE_CACHE_):QMAKE_QT_CONFIG = $$fromfile($$_QMAKE_CACHE_, QMAKE_QT_CONFIG)
+exists($$_QMAKE_CACHE_) {
+ qdd = $$fromfile($$_QMAKE_CACHE_, QMAKE_QT_CONFIG)
+ !isEmpty(qdd): QMAKE_QT_CONFIG = $$qdd
+ unset(qdd)
+}
isEmpty(QMAKE_QT_CONFIG)|!exists($$QMAKE_QT_CONFIG) {
qdd = $$QT_BUILD_TREE
isEmpty(qdd):exists($$_QMAKE_CACHE_): qdd = $$fromfile($$_QMAKE_CACHE_, QT_BUILD_TREE)