diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2012-04-20 14:59:30 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-04-23 19:20:19 +0200 |
commit | fd63acdc8339db18521867b183ef3dcc1cefb5ef (patch) | |
tree | ad2964cc98a00ce4ea887f2f82b45f267d84522b | |
parent | 3da8a33a62219bb6fd1bb46e253e151f1bc8a3bd (diff) |
Don't use the QRegExp methods that modify the object [qmake]
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: I6b2d2530238a7e04b44859664a2962f2f466ee30
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
-rw-r--r-- | qmake/project.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/qmake/project.cpp b/qmake/project.cpp index c491e9b1b7..9716237f90 100644 --- a/qmake/project.cpp +++ b/qmake/project.cpp @@ -2085,7 +2085,7 @@ QMakeProject::doProjectExpand(QString func, QList<QStringList> args_list, dirs.append(""); } - const QRegExp regex(r, Qt::CaseSensitive, QRegExp::Wildcard); + QRegExp regex(r, Qt::CaseSensitive, QRegExp::Wildcard); for(int d = 0; d < dirs.count(); d++) { QString dir = dirs[d]; if (!dir.isEmpty() && !dir.endsWith(QLatin1Char('/'))) |