Skip to content

Commit

Permalink
Move a QRegExp out of a deeply nested loop
Browse files Browse the repository at this point in the history
This helps alleviate a performance issues where by building iOS based
projects takes a significantly longer amount of time than it should.

Task-number: QTBUG-59136
Change-Id: I77ae12f507725ceb11106b484d73bb7d46e0845c
Reviewed-by: Oswald Buddenhagen <[email protected]>
  • Loading branch information
jakepetroules authored and jaheikk committed Nov 23, 2017
1 parent 4be50ec commit 36984dc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions qmake/generators/makefile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2164,9 +2164,9 @@ MakefileGenerator::writeExtraVariables(QTextStream &t)
ProStringList outlist;
const ProValueMap &vars = project->variables();
const ProStringList &exports = project->values("QMAKE_EXTRA_VARIABLES");
for (ProValueMap::ConstIterator it = vars.begin(); it != vars.end(); ++it) {
for (ProStringList::ConstIterator exp_it = exports.begin(); exp_it != exports.end(); ++exp_it) {
QRegExp rx((*exp_it).toQString(), Qt::CaseInsensitive, QRegExp::Wildcard);
for (ProStringList::ConstIterator exp_it = exports.begin(); exp_it != exports.end(); ++exp_it) {
QRegExp rx((*exp_it).toQString(), Qt::CaseInsensitive, QRegExp::Wildcard);
for (ProValueMap::ConstIterator it = vars.begin(); it != vars.end(); ++it) {
if (rx.exactMatch(it.key().toQString()))
outlist << ("EXPORT_" + it.key() + " = " + it.value().join(' '));
}
Expand Down

0 comments on commit 36984dc

Please sign in to comment.