From 8304869598812ec5204f4f2a103c73dd97640e25 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Mon, 5 May 2014 12:03:42 +0200 Subject: Fix detection of newer MinGW toolchains in configure.exe This fixes a regression in the new MinGW packages that are now built with mkspec win32-g++-4.6: Since we failed to detect this as a MinGW mkspec we missed to check for headers in all relevant paths, which disabled windowsxp, windosvista styles by default. This commit does not apply to Qt 5, similar issues there are being fixed independently. [ChangeLog][Windows] configure.exe now detects newer MinGW versions correctly, enabling windowsxp and windowsvista styles by default. Task-number: QTBUG-38706 Change-Id: Ib4e7af69e8040aaa28940f501cce5572588d4378 Reviewed-by: Leena Miettinen Reviewed-by: Oswald Buddenhagen Reviewed-by: Friedemann Kleint --- tools/configure/configureapp.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 8546573..d052dae 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -2177,7 +2177,7 @@ bool Configure::findFile(const QString &fileName) { const QString file = fileName.toLower(); const QString pathEnvVar = QString::fromLocal8Bit(getenv("PATH")); - const QString mingwPath = dictionary["QMAKESPEC"].endsWith("-g++") ? + const QString mingwPath = dictionary["QMAKESPEC"].contains("-g++") ? findFileInPaths("g++.exe", pathEnvVar) : QString(); QString paths; @@ -2249,7 +2249,7 @@ QString Configure::defaultTo(const QString &option) // By default we do not want to compile OCI driver when compiling with // MinGW, due to lack of such support from Oracle. It prob. wont work. // (Customer may force the use though) - if (dictionary["QMAKESPEC"].endsWith("-g++") + if (dictionary["QMAKESPEC"].contains("-g++") && option == "SQL_OCI") return "no"; -- cgit v0.12