Don't use the QRegExp methods that modify the object [Linguist]
authorThiago Macieira <thiago.macieira@intel.com>
Mon, 23 Apr 2012 15:47:03 +0000 (17:47 +0200)
committerQt by Nokia <qt-info@nokia.com>
Wed, 25 Apr 2012 16:09:46 +0000 (18:09 +0200)
commite68cbe6a7d61611dc048edd82cfba716b443a474
treed193b351f51d68395ac718dc4eb640997a4f997b
parent8f66084ab51bfbbef64d0cf2f615808099c78811
Don't use the QRegExp methods that modify the object [Linguist]

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: I181d37fd98b00550dd98d418a33183a4bde0c532
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
src/linguist/shared/profileevaluator.cpp
src/linguist/shared/ts.cpp
src/linguist/shared/xliff.cpp