summaryrefslogtreecommitdiffstats
path: root/mkspecs
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2012-09-13 16:44:49 (GMT)
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-10-17 11:06:53 (GMT)
commit8dc5f5f28f3fb65c82151e319ca4309a82eee074 (patch)
tree59455c44d1b7b72990b1620aa657cf9614b31c61 /mkspecs
parenta051b9c523e0bfba38453dfa7bf13092a0dcf0e2 (diff)
downloadQt-8dc5f5f28f3fb65c82151e319ca4309a82eee074.zip
Qt-8dc5f5f28f3fb65c82151e319ca4309a82eee074.tar.gz
Qt-8dc5f5f28f3fb65c82151e319ca4309a82eee074.tar.bz2
optimize loading of qconfig.pri & qdevice.pri somewhat
avoid some expensive operations. note that this uses exists() where !isEmpty() would be more intuitive, but isEmpty() does not work on magic variables in qt4. Change-Id: I904463eb1021d208c21fc602af3228350756ed4b Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'mkspecs')
-rw-r--r--mkspecs/features/device_config.prf2
-rw-r--r--mkspecs/features/qt_config.prf8
2 files changed, 5 insertions, 5 deletions
diff --git a/mkspecs/features/device_config.prf b/mkspecs/features/device_config.prf
index 7da3fe5..aa0aa50 100644
--- a/mkspecs/features/device_config.prf
+++ b/mkspecs/features/device_config.prf
@@ -1,5 +1,5 @@
# Load generated qdevice.pri
-isEmpty(QT_BUILD_TREE): QT_BUILD_TREE = $$fromfile($$_QMAKE_CACHE_, QT_BUILD_TREE)
+isEmpty(QT_BUILD_TREE):exists($$_QMAKE_CACHE_): QT_BUILD_TREE = $$fromfile($$_QMAKE_CACHE_, QT_BUILD_TREE)
isEmpty(QT_BUILD_TREE): QT_BUILD_TREE = $$[QT_INSTALL_DATA]
DEVICE_PRI = $$QT_BUILD_TREE/mkspecs/qdevice.pri
diff --git a/mkspecs/features/qt_config.prf b/mkspecs/features/qt_config.prf
index de1cac4..4575f4a 100644
--- a/mkspecs/features/qt_config.prf
+++ b/mkspecs/features/qt_config.prf
@@ -3,11 +3,11 @@
exists($$_QMAKE_CACHE_):QMAKE_QT_CONFIG = $$fromfile($$_QMAKE_CACHE_, QMAKE_QT_CONFIG)
isEmpty(QMAKE_QT_CONFIG)|!exists($$QMAKE_QT_CONFIG) {
- !isEmpty(QT_BUILD_TREE):QMAKE_QT_CONFIG = $$QT_BUILD_TREE/mkspecs/qconfig.pri
- else:exists($$_QMAKE_CACHE_):infile($$_QMAKE_CACHE_, QT_BUILD_TREE):QMAKE_QT_CONFIG = $$fromfile($$_QMAKE_CACHE_, QT_BUILD_TREE)/mkspecs/qconfig.pri
- else:exists($$[QT_INSTALL_DATA]/mkspecs/qconfig.pri):QMAKE_QT_CONFIG = $$[QT_INSTALL_DATA]/mkspecs/qconfig.pri
+ isEmpty(QT_BUILD_TREE):exists($$_QMAKE_CACHE_): QT_BUILD_TREE = $$fromfile($$_QMAKE_CACHE_, QT_BUILD_TREE)
+ isEmpty(QT_BUILD_TREE): QT_BUILD_TREE = $$[QT_INSTALL_DATA]
+ QMAKE_QT_CONFIG = $$QT_BUILD_TREE/mkspecs/qconfig.pri
}
-!exists($$QMAKE_QT_CONFIG)|!include($$QMAKE_QT_CONFIG, "", true) {
+!include($$QMAKE_QT_CONFIG, "", true) {
debug(1, "Cannot load qconfig.pri!")
} else {
debug(1, "Loaded .qconfig.pri from ($$QMAKE_QT_CONFIG)")