From fd63acdc8339db18521867b183ef3dcc1cefb5ef Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 20 Apr 2012 14:59:30 +0200 Subject: 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 --- qmake/project.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 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('/'))) -- cgit v1.2.3