From 51f77e9e8eafa17de68153220685bf4961072aa3 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Fri, 7 Feb 2014 12:37:35 +0100 Subject: Fix detection of mingw gcc >=4.6 Make sure that the version check works for gcc e.g. from mingw-builds, which contains spaces in the version info, e.g. g++ (i686-posix-dwarf, Built by MinGW-W64 project) 4.8.2 In Qt 5, support for MinGW-gcc versions older than 4.6 was dropped. Change-Id: Idac5fb3a8cd01200558032ea1bd997e30f0e8b8b Reviewed-by: Oswald Buddenhagen Reviewed-by: Joerg Bornemann Reviewed-by: Friedemann Kleint --- tools/configure/environment.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/configure/environment.cpp b/tools/configure/environment.cpp index 7331e031b1..0c9c500691 100644 --- a/tools/configure/environment.cpp +++ b/tools/configure/environment.cpp @@ -260,7 +260,7 @@ bool Environment::detectExecutable(const QString &executable) int Environment::detectGPlusPlusVersion(const QString &executable, bool *is64bit) { - QRegExp regexp(QLatin1String("[gG]\\+\\+[\\.exEX]{0,4} ([^\\s]+) (\\d+)\\.(\\d+)\\.(\\d+)")); + QRegExp regexp(QLatin1String("[gG]\\+\\+[\\.exEX]{0,4} ([^\\n]+) (\\d+)\\.(\\d+)\\.(\\d+)")); QString stdOut = readProcessStandardOutput(executable + QLatin1String(" --version")); if (regexp.indexIn(stdOut) != -1) { const QString compiler = regexp.cap(1); -- cgit v1.2.1