diff --git a/autotests/ecmatest.cpp b/autotests/ecmatest.cpp --- a/autotests/ecmatest.cpp +++ b/autotests/ecmatest.cpp @@ -190,7 +190,7 @@ QWARN(errmsg.constData()); } else { expectedBroken = QString::fromLatin1(brokenF.readAll().constData()).split(QLatin1Char('\n')) - .filter(QRegExp("^[^#].*")); + .filter(QRegularExpression(QStringLiteral("^[^#].*"))); } } diff --git a/autotests/kjsapitest.cpp b/autotests/kjsapitest.cpp --- a/autotests/kjsapitest.cpp +++ b/autotests/kjsapitest.cpp @@ -26,6 +26,8 @@ #include "qtest.h" +#include + class KJSApiTest : public QObject { Q_OBJECT @@ -123,8 +125,8 @@ QVERIFY(!norm.isEmpty()); QStringList lines = norm.split('\n'); QVERIFY(lines.size() >= 2); // ### imprecise - int fooLine = lines.indexOf(QRegExp(" *foo\\(\\);")); - int barLine = lines.indexOf(QRegExp(" *bar\\(\\);")); + int fooLine = lines.indexOf(QRegularExpression(QStringLiteral(" *foo\\(\\);"))); + int barLine = lines.indexOf(QRegularExpression(QStringLiteral(" *bar\\(\\);"))); QVERIFY(fooLine >= 0); QVERIFY(barLine > fooLine); }