Don't use the QRegExp methods that modify the object [QtWidgets]
authorThiago Macieira <thiago.macieira@intel.com>
Fri, 20 Apr 2012 12:59:30 +0000 (14:59 +0200)
committerQt by Nokia <qt-info@nokia.com>
Wed, 25 Apr 2012 18:15:32 +0000 (20:15 +0200)
commit6624151c6a8772a3f01a291f744ea72b469106fc
treebdd1ba126da722b6967eecf7fd90b1830b810792
parent066da57a122de26e8a71ab1eaca0ea205c876bdf
Don't use the QRegExp methods that modify the object [QtWidgets]

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: I44cc44b75b3da10c5ece97cb6315c2c425327dc0
Reviewed-by: Alexis Menard <alexis.menard@openbossa.org>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
src/widgets/dialogs/qfilesystemmodel.cpp