From c1623a0d42c9869e5a1d04081e7660722a863de5 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 23 Apr 2012 16:29:18 +0200 Subject: Don't use the QRegExp methods that modify the object QRegExp matching methods modify the object, which we don't want to. In particular, when we receive a QRegExp from the user or we store in a context that might require thread-safety, make sure we make a copy before using it. QRegularExpression has no such shortcoming. Task-number: QTBUG-25064 Change-Id: I2c4d5f4b60d6b3569568103cd7107cd2adaa3ae8 Reviewed-by: Giuseppe D'Angelo Reviewed-by: Lars Knoll --- tests/auto/xmlpatterns/tst_xmlpatterns.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/auto/xmlpatterns/tst_xmlpatterns.cpp') diff --git a/tests/auto/xmlpatterns/tst_xmlpatterns.cpp b/tests/auto/xmlpatterns/tst_xmlpatterns.cpp index abae5d8..29efbe4 100644 --- a/tests/auto/xmlpatterns/tst_xmlpatterns.cpp +++ b/tests/auto/xmlpatterns/tst_xmlpatterns.cpp @@ -182,7 +182,7 @@ void tst_XmlPatterns::xquerySupport() { /* There's a wide range of different version strings used. For * instance, "4.4.0-rc1". */ - const QRegExp removeVersion(QLatin1String(" Qt \\d\\.\\d.*")); + QRegExp removeVersion(QLatin1String(" Qt \\d\\.\\d.*")); QVERIFY(removeVersion.isValid()); QCOMPARE(QString(fixedStderr).remove(removeVersion) + QChar('|'), rawExpectedStdErr + QChar('|')); } -- cgit v1.2.1