From 8efe0df9dc1fc8bea9a304fb79bf282111121ca1 Mon Sep 17 00:00:00 2001 From: hjk Date: Tue, 9 Jun 2020 12:31:01 +0200 Subject: [PATCH] ExtensionSystem: Port PluginManager to QRegularExpression Task-number: QTCREATORBUG-24098 Change-Id: Idd52e7fe37c8ea8937af7123755b324dd326bb16 Reviewed-by: Christian Stenger --- src/libs/extensionsystem/pluginmanager.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/libs/extensionsystem/pluginmanager.cpp b/src/libs/extensionsystem/pluginmanager.cpp index 424ffb464bd..015a9384c98 100644 --- a/src/libs/extensionsystem/pluginmanager.cpp +++ b/src/libs/extensionsystem/pluginmanager.cpp @@ -1003,10 +1003,11 @@ static QStringList matchingTestFunctions(const QStringList &testFunctions, testFunctionName = testFunctionName.left(index); } - const QRegExp regExp(testFunctionName, Qt::CaseSensitive, QRegExp::Wildcard); + const QRegularExpression regExp( + QRegularExpression::wildcardToRegularExpression(testFunctionName)); QStringList matchingFunctions; for (const QString &testFunction : testFunctions) { - if (regExp.exactMatch(testFunction)) { + if (regExp.match(testFunction).hasMatch()) { // If the specified test data is invalid, the QTest framework will // print a reasonable error message for us. matchingFunctions.append(testFunction + testDataSuffix);