From 0389a459bbfe710767bdd50b7faf0e8808619286 Mon Sep 17 00:00:00 2001 From: Samuel Gaist Date: Mon, 10 Jun 2019 21:34:38 +0200 Subject: test: migrate QStandardPaths tests to QRegularExpression This is part of the migration of qtbase from QRexExp to QRegularExpression. Task-number: QTBUG-72587 Change-Id: Ie89641601763ff41eee5356a4b5ddee7ef810fbc Reviewed-by: Marc Mutz --- tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp') diff --git a/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp b/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp index 155f5b953d..56d924dcc6 100644 --- a/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp +++ b/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp @@ -32,7 +32,7 @@ #include #include #include -#include +#include #if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) # include #endif @@ -566,7 +566,8 @@ void tst_qstandardpaths::testAllWritableLocations() void tst_qstandardpaths::testCleanPath() { - const QRegExp filter(QStringLiteral("\\\\")); +#if QT_CONFIG(regularexpression) + const QRegularExpression filter(QStringLiteral("\\\\")); QVERIFY(filter.isValid()); for (int i = 0; i <= QStandardPaths::GenericCacheLocation; ++i) { const QStringList paths = QStandardPaths::standardLocations(QStandardPaths::StandardLocation(i)); @@ -574,6 +575,9 @@ void tst_qstandardpaths::testCleanPath() qPrintable(QString::fromLatin1("Backslash found in %1 %2") .arg(i).arg(paths.join(QLatin1Char(','))))); } +#else + QSKIP("regularexpression feature disabled"); +#endif } void tst_qstandardpaths::testXdgPathCleanup() -- cgit v1.2.3