diff options
author | Christian Kandeler <christian.kandeler@theqtcompany.com> | 2014-11-14 10:04:36 +0100 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@theqtcompany.com> | 2014-11-14 12:32:16 +0100 |
commit | 620ded809355d43b00723349539171618e8e668e (patch) | |
tree | 526e9dcd98d2d494c88c5dee42276ba74f01594e /src/plugins/qtsupport | |
parent | 1635e53ea232a7de43576ae240aa4f46df54e708 (diff) | |
download | qt-creator-620ded809355d43b00723349539171618e8e668e.tar.gz |
QtSupport: Fix mkspec detection for Qt4/MinGW.
This is a workaround for QTBUG-28792.
Change-Id: I6a6de3a44569563e6013a388875035bda9772bed
Task-number: QBS-703
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
Diffstat (limited to 'src/plugins/qtsupport')
-rw-r--r-- | src/plugins/qtsupport/baseqtversion.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/plugins/qtsupport/baseqtversion.cpp b/src/plugins/qtsupport/baseqtversion.cpp index 0acdc2adfb..2780ab16db 100644 --- a/src/plugins/qtsupport/baseqtversion.cpp +++ b/src/plugins/qtsupport/baseqtversion.cpp @@ -61,6 +61,7 @@ #include <QFuture> #include <QCoreApplication> #include <QProcess> +#include <QRegExp> using namespace Core; using namespace QtSupport; @@ -1399,6 +1400,13 @@ FileName BaseQtVersion::mkspecFromVersionInfo(const QHash<QString, QString> &ver const QList<QByteArray> &temp = line.split('='); if (temp.size() == 2) { QString possibleFullPath = QString::fromLocal8Bit(temp.at(1).trimmed().constData()); + if (possibleFullPath.contains(QLatin1Char('$'))) { // QTBUG-28792 + const QRegExp rex(QLatin1String("\\binclude\\(([^)]+)/qmake\\.conf\\)")); + if (rex.indexIn(QString::fromLocal8Bit(f2.readAll())) != -1) { + possibleFullPath = mkspecFullPath.toString() + QLatin1Char('/') + + rex.cap(1); + } + } // We sometimes get a mix of different slash styles here... possibleFullPath = possibleFullPath.replace(QLatin1Char('\\'), QLatin1Char('/')); if (QFileInfo::exists(possibleFullPath)) // Only if the path exists |