diff options
author | Oswald Buddenhagen <oswald.buddenhagen@digia.com> | 2013-01-31 11:26:11 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-02-01 10:23:26 +0100 |
commit | f9725ce9c2d16474ca47ab6ac25f5df748b12ab5 (patch) | |
tree | 0f25be349995ce445f3a55c6e4cd65b23c6b7593 /tools | |
parent | 0debd5dd487e979ff80dac5cd762d457eee5caf4 (diff) |
avoid that we accidentally initialize XQMAKESPEC to an empty string
there is plenty of tests which rely on the non-presence of the variable,
rather than it being empty.
Task-number: QTBUG-29400
Change-Id: Ifa8aa68192750521869767e2d4d3796794f4d8f2
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/configure/configureapp.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 2a9c1ecb71..0212b62017 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -1528,12 +1528,12 @@ void Configure::desc(const char *mark_option, const char *mark, const char *opti */ void Configure::applySpecSpecifics() { - if (!dictionary[ "XQMAKESPEC" ].isEmpty()) { + if (dictionary.contains("XQMAKESPEC")) { //Disable building tools, docs and translations when cross compiling. nobuildParts << "docs" << "translations" << "tools"; } - if (dictionary[ "XQMAKESPEC" ].startsWith("wince")) { + if (dictionary.value("XQMAKESPEC").startsWith("wince")) { dictionary[ "STYLE_WINDOWSXP" ] = "no"; dictionary[ "STYLE_WINDOWSVISTA" ] = "no"; dictionary[ "STYLE_FUSION" ] = "no"; @@ -1558,7 +1558,7 @@ void Configure::applySpecSpecifics() dictionary[ "MMX" ] = "yes"; dictionary[ "IWMMXT" ] = "yes"; } - } else if (dictionary[ "XQMAKESPEC" ].startsWith("linux")) { //TODO actually wrong. + } else if (dictionary.value("XQMAKESPEC").startsWith("linux")) { //TODO actually wrong. //TODO dictionary[ "STYLE_WINDOWSXP" ] = "no"; dictionary[ "STYLE_WINDOWSVISTA" ] = "no"; @@ -2307,7 +2307,7 @@ bool Configure::verifyConfiguration() << "Disabling the ANGLE backend." << endl; prompt = true; } - if ((dictionary["OPENGL_ES_2"] == "yes") && (dictionary.value("XQMAKESPEC").isEmpty())) { + if ((dictionary["OPENGL_ES_2"] == "yes") && !dictionary.contains("XQMAKESPEC")) { cout << endl << "WARNING: Using OpenGL ES 2.0 without ANGLE." << endl << "Specify -opengl desktop to use Open GL." << endl << "The build will most likely fail." << endl; @@ -3055,7 +3055,7 @@ void Configure::generateQConfigPri() configStream << "QT_HOST_ARCH = " << dictionary["QT_HOST_ARCH"] << endl; configStream << "QT_CPU_FEATURES = " << dictionary["QT_CPU_FEATURES"] << endl; configStream << "QT_HOST_CPU_FEATURES = " << dictionary["QT_HOST_CPU_FEATURES"] << endl; - if (!dictionary["XQMAKESPEC"].isEmpty() && !dictionary["XQMAKESPEC"].startsWith("wince")) { + if (dictionary.contains("XQMAKESPEC") && !dictionary["XQMAKESPEC"].startsWith("wince")) { // FIXME: add detection configStream << "QMAKE_DEFAULT_LIBDIRS = /lib /usr/lib" << endl; configStream << "QMAKE_DEFAULT_INCDIRS = /usr/include /usr/local/include" << endl; |