summaryrefslogtreecommitdiffstats
path: root/qmake/generators/makefile.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2020-04-15 10:52:51 +0200
committerLars Knoll <lars.knoll@qt.io>2020-05-06 09:57:40 +0200
commitadf829e65d0837c043dbfdfaba49dd145debe954 (patch)
treec45291cbe4ff82b9ec2d5f2ae008066b839dfd1a /qmake/generators/makefile.cpp
parent56a7984a90992371cd7f54a061dcc791e6f22cfd (diff)
Add a QRegularExpression::fromWildcard() convenience method
Simplify constructing QRegularExpression objects from a glob pattern. Change-Id: I06f60b1dfea3da969e2474dedd44b6ca5d456d7d Reviewed-by: Simon Hausmann <hausmann@gmail.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'qmake/generators/makefile.cpp')
-rw-r--r--qmake/generators/makefile.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
index 1622a4b856..f27bb242a2 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
@@ -2169,8 +2169,7 @@ MakefileGenerator::writeExtraVariables(QTextStream &t)
const ProValueMap &vars = project->variables();
const ProStringList &exports = project->values("QMAKE_EXTRA_VARIABLES");
for (ProStringList::ConstIterator exp_it = exports.begin(); exp_it != exports.end(); ++exp_it) {
- auto pattern = QRegularExpression::wildcardToRegularExpression((*exp_it).toQString());
- QRegularExpression rx(pattern, QRegularExpression::CaseInsensitiveOption);
+ auto rx = QRegularExpression::fromWildcard((*exp_it).toQString(), Qt::CaseInsensitive);
for (ProValueMap::ConstIterator it = vars.begin(); it != vars.end(); ++it) {
if (rx.match(it.key().toQString()).hasMatch())
outlist << ("EXPORT_" + it.key() + " = " + it.value().join(' '));