forked from qt-creator/qt-creator
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:
@@ -1003,10 +1003,11 @@ static QStringList matchingTestFunctions(const QStringList &testFunctions,
|
|||||||
testFunctionName = testFunctionName.left(index);
|
testFunctionName = testFunctionName.left(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
const QRegExp regExp(testFunctionName, Qt::CaseSensitive, QRegExp::Wildcard);
|
const QRegularExpression regExp(
|
||||||
|
QRegularExpression::wildcardToRegularExpression(testFunctionName));
|
||||||
QStringList matchingFunctions;
|
QStringList matchingFunctions;
|
||||||
for (const QString &testFunction : testFunctions) {
|
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
|
// If the specified test data is invalid, the QTest framework will
|
||||||
// print a reasonable error message for us.
|
// print a reasonable error message for us.
|
||||||
matchingFunctions.append(testFunction + testDataSuffix);
|
matchingFunctions.append(testFunction + testDataSuffix);
|
||||||
|
Reference in New Issue
Block a user