From 456f721917d07b3dd4259c324ff216f90bd32139 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 20 Oct 2015 10:08:39 +0200 Subject: tests/auto/corelib: Remove some placeholder formatting. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use QByteArray/QString addition instead in loops and for test row names. Change-Id: Ieffb429efdc14aa5932b3fcdef5a18e13a62d35f Reviewed-by: Jędrzej Nowacki --- tests/auto/corelib/tools/qregexp/tst_qregexp.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'tests/auto/corelib/tools/qregexp') diff --git a/tests/auto/corelib/tools/qregexp/tst_qregexp.cpp b/tests/auto/corelib/tools/qregexp/tst_qregexp.cpp index 23259e520f..1d8b719d16 100644 --- a/tests/auto/corelib/tools/qregexp/tst_qregexp.cpp +++ b/tests/auto/corelib/tools/qregexp/tst_qregexp.cpp @@ -1370,12 +1370,14 @@ void tst_QRegExp::escapeSequences() { QString perlSyntaxSpecialChars("0123456789afnrtvbBdDwWsSx\\|[]{}()^$?+*"); QString w3cXmlSchema11SyntaxSpecialChars("cCiIpP"); // as well as the perl ones + QString pattern = QLatin1String("\\?"); for (int i = ' '; i <= 127; ++i) { QLatin1Char c(i); if (perlSyntaxSpecialChars.indexOf(c) == -1) { - QRegExp rx(QString("\\%1").arg(c), Qt::CaseSensitive, QRegExp::RegExp); + pattern[1] = c; + QRegExp rx(pattern, Qt::CaseSensitive, QRegExp::RegExp); // we'll never have c == 'a' since it's a special character - QString s = QString("aaa%1aaa").arg(c); + const QString s = QLatin1String("aaa") + c + QLatin1String("aaa"); QCOMPARE(rx.indexIn(s), 3); rx.setPatternSyntax(QRegExp::RegExp2); -- cgit v1.2.3