summaryrefslogtreecommitdiff
path: root/src/plugins/qtsupport/baseqtversion.cpp
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@qt.io>2017-01-10 12:14:15 +0100
committerTim Jenssen <tim.jenssen@qt.io>2017-01-11 09:27:11 +0000
commit3c41e2c09ba9fad3386a97de1f2008e8ad588dc7 (patch)
tree8b386534cea3908c7427ceb0fb467f3226106be8 /src/plugins/qtsupport/baseqtversion.cpp
parentae0e15fad066c0fc7e88180b0ad5029ea9025cad (diff)
downloadqt-creator-3c41e2c09ba9fad3386a97de1f2008e8ad588dc7.tar.gz
QtSupport: Convert to QRegularExpression
Change-Id: If9d407eb189c45ee81e6c73f37a93df6218c791a Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Diffstat (limited to 'src/plugins/qtsupport/baseqtversion.cpp')
-rw-r--r--src/plugins/qtsupport/baseqtversion.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/plugins/qtsupport/baseqtversion.cpp b/src/plugins/qtsupport/baseqtversion.cpp
index 459e07dd07..6644a8d134 100644
--- a/src/plugins/qtsupport/baseqtversion.cpp
+++ b/src/plugins/qtsupport/baseqtversion.cpp
@@ -55,7 +55,7 @@
#include <QFuture>
#include <QCoreApplication>
#include <QProcess>
-#include <QRegExp>
+#include <QRegularExpression>
using namespace Core;
using namespace QtSupport;
@@ -1513,10 +1513,11 @@ FileName BaseQtVersion::mkspecFromVersionInfo(const QHash<QString, QString> &ver
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) {
+ const QRegularExpression rex(QLatin1String("\\binclude\\(([^)]+)/qmake\\.conf\\)"));
+ const QRegularExpressionMatch match = rex.match(QString::fromLocal8Bit(f2.readAll()));
+ if (match.hasMatch()) {
possibleFullPath = mkspecFullPath.toString() + QLatin1Char('/')
- + rex.cap(1);
+ + match.captured(1);
}
}
// We sometimes get a mix of different slash styles here...