Don't use the QRegExp methods that modify the object
authorThiago Macieira <thiago.macieira@intel.com>
Mon, 23 Apr 2012 14:29:18 +0000 (16:29 +0200)
committerQt by Nokia <qt-info@nokia.com>
Tue, 24 Apr 2012 12:39:38 +0000 (14:39 +0200)
commitc1623a0d42c9869e5a1d04081e7660722a863de5
tree17a58be3a4c80b143add805b7ff8218daab61106
parentc18f589a757b2c4cb8c5e66a92f34ac005223cfe
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 <dangelog@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
14 files changed:
src/xmlpatterns/data/qabstractdatetime_p.h
src/xmlpatterns/data/qabstractduration_p.h
src/xmlpatterns/data/qderivedstring_p.h
src/xmlpatterns/functions/qpatternmatchingfns.cpp
src/xmlpatterns/functions/qpatternplatform.cpp
src/xmlpatterns/functions/qpatternplatform_p.h
src/xmlpatterns/parser/qquerytransformparser.cpp
src/xmlpatterns/parser/querytransformparser.ypp
src/xmlpatterns/schema/qxsdschemachecker.cpp
src/xmlpatterns/schema/qxsdschemaparser.cpp
src/xmlpatterns/schema/qxsdtypechecker.cpp
tests/auto/qxmlquery/tst_qxmlquery.cpp
tests/auto/xmlpatterns/tst_xmlpatterns.cpp
tools/xmlpatterns/qapplicationargumentparser.cpp