Don't use the QRegExp methods that modify the object [QtGui]
authorThiago Macieira <thiago.macieira@intel.com>
Fri, 20 Apr 2012 12:59:30 +0000 (14:59 +0200)
committerQt by Nokia <qt-info@nokia.com>
Tue, 24 Apr 2012 17:36:55 +0000 (19:36 +0200)
commit092118855ba47a0061e5b54198c49c3ad05b5aed
tree0c8279ca66b389979b02d37620a4866f21daf7da
parentfd7e1cef9cc06a2e36d98942c6e929ee5589952e
Don't use the QRegExp methods that modify the object [QtGui]

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: If119e06221ca99e57c5ad1a1d4cc6468e9f68c7b
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
src/gui/text/qtextdocument.cpp
src/gui/util/qvalidator.cpp
tests/auto/other/lancelot/paintcommands.cpp