From f9725ce9c2d16474ca47ab6ac25f5df748b12ab5 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 31 Jan 2013 11:26:11 +0100 Subject: 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 --- tools/configure/configureapp.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tools') 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; -- cgit v1.2.3