ExtensionSystem: Port PluginManager to QRegularExpression

Task-number: QTCREATORBUG-24098
Change-Id: Idd52e7fe37c8ea8937af7123755b324dd326bb16
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2020-06-09 12:31:01 +02:00
parent 22dd01ef61
commit 8efe0df9dc

View File

@@ -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);