diff options
author | Samuel Gaist <samuel.gaist@idiap.ch> | 2019-06-10 21:34:38 +0200 |
---|---|---|
committer | Samuel Gaist <samuel.gaist@idiap.ch> | 2019-06-10 21:34:38 +0200 |
commit | 0389a459bbfe710767bdd50b7faf0e8808619286 (patch) | |
tree | 22138ce5abb759b638bcbb8226d6e5a54b2b8988 /tests/auto | |
parent | cc843c36ea71b78fc4b9b3af5119ff4c020edebb (diff) |
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 <marc.mutz@kdab.com>
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
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 <qstandardpaths.h> #include <qfileinfo.h> #include <qsysinfo.h> -#include <qregexp.h> +#include <qregularexpression.h> #if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) # include <qt_windows.h> #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() |