summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/tools/qregexp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-10-20 10:08:39 +0200
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-10-22 03:54:29 +0000
commit456f721917d07b3dd4259c324ff216f90bd32139 (patch)
treefbc30a9a04ab5be9fc6b332a16910e2cf7fc24d9 /tests/auto/corelib/tools/qregexp
parentacdd4850a485a0cb8f8f0502cafd65a9f214b2a9 (diff)
tests/auto/corelib: Remove some placeholder formatting.
Use QByteArray/QString addition instead in loops and for test row names. Change-Id: Ieffb429efdc14aa5932b3fcdef5a18e13a62d35f Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
Diffstat (limited to 'tests/auto/corelib/tools/qregexp')
-rw-r--r--tests/auto/corelib/tools/qregexp/tst_qregexp.cpp6
1 files changed, 4 insertions, 2 deletions
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);