summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2012-02-03 18:28:54 +0100
committerQt by Nokia <qt-info@nokia.com>2012-02-28 09:12:30 +0100
commitdd7befcfd84a9a648fa467dda3fe45988bfc5604 (patch)
treed613cfead5ec012feeeaa1734a14dbb6fd719b58
parentced029e87d9bf4b0d7f526d8e611c0e1e8c56a45 (diff)
scope context saving more minimally
no point in saving the context when we are not actually modifying the current context. Change-Id: Id6f51a163e86bdf402aa0713737b655db68e7ee8 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com> Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
-rw-r--r--qmake/project.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/qmake/project.cpp b/qmake/project.cpp
index 3546ac9877..eb07dea654 100644
--- a/qmake/project.cpp
+++ b/qmake/project.cpp
@@ -1712,9 +1712,6 @@ QMakeProject::doProjectInclude(QString file, uchar flags, QHash<QString, QString
warn_msg(WarnParser, "%s:%d: QtScript support disabled for %s.",
pi.file.toLatin1().constData(), pi.line_no, orig_file.toLatin1().constData());
} else {
- QStack<ScopeBlock> sc = scope_blocks;
- IteratorBlock *it = iterator;
- FunctionBlock *fu = function;
if(flags & (IncludeFlagNewProject|IncludeFlagNewParser)) {
// The "project's variables" are used in other places (eg. export()) so it's not
// possible to use "place" everywhere. Instead just set variables and grab them later
@@ -1730,11 +1727,14 @@ QMakeProject::doProjectInclude(QString file, uchar flags, QHash<QString, QString
}
place = proj.variables();
} else {
+ QStack<ScopeBlock> sc = scope_blocks;
+ IteratorBlock *it = iterator;
+ FunctionBlock *fu = function;
parsed = read(file, place);
+ iterator = it;
+ function = fu;
+ scope_blocks = sc;
}
- iterator = it;
- function = fu;
- scope_blocks = sc;
}
if(parsed) {
if(place["QMAKE_INTERNAL_INCLUDED_FILES"].indexOf(orig_file) == -1)