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>
This commit is contained in:
parent
ced029e87d
commit
dd7befcfd8
@ -1712,9 +1712,6 @@ QMakeProject::doProjectInclude(QString file, uchar flags, QHash<QString, QString
|
|||||||
warn_msg(WarnParser, "%s:%d: QtScript support disabled for %s.",
|
warn_msg(WarnParser, "%s:%d: QtScript support disabled for %s.",
|
||||||
pi.file.toLatin1().constData(), pi.line_no, orig_file.toLatin1().constData());
|
pi.file.toLatin1().constData(), pi.line_no, orig_file.toLatin1().constData());
|
||||||
} else {
|
} else {
|
||||||
QStack<ScopeBlock> sc = scope_blocks;
|
|
||||||
IteratorBlock *it = iterator;
|
|
||||||
FunctionBlock *fu = function;
|
|
||||||
if(flags & (IncludeFlagNewProject|IncludeFlagNewParser)) {
|
if(flags & (IncludeFlagNewProject|IncludeFlagNewParser)) {
|
||||||
// The "project's variables" are used in other places (eg. export()) so it's not
|
// 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
|
// possible to use "place" everywhere. Instead just set variables and grab them later
|
||||||
@ -1730,12 +1727,15 @@ QMakeProject::doProjectInclude(QString file, uchar flags, QHash<QString, QString
|
|||||||
}
|
}
|
||||||
place = proj.variables();
|
place = proj.variables();
|
||||||
} else {
|
} else {
|
||||||
|
QStack<ScopeBlock> sc = scope_blocks;
|
||||||
|
IteratorBlock *it = iterator;
|
||||||
|
FunctionBlock *fu = function;
|
||||||
parsed = read(file, place);
|
parsed = read(file, place);
|
||||||
}
|
|
||||||
iterator = it;
|
iterator = it;
|
||||||
function = fu;
|
function = fu;
|
||||||
scope_blocks = sc;
|
scope_blocks = sc;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if(parsed) {
|
if(parsed) {
|
||||||
if(place["QMAKE_INTERNAL_INCLUDED_FILES"].indexOf(orig_file) == -1)
|
if(place["QMAKE_INTERNAL_INCLUDED_FILES"].indexOf(orig_file) == -1)
|
||||||
place["QMAKE_INTERNAL_INCLUDED_FILES"].append(orig_file);
|
place["QMAKE_INTERNAL_INCLUDED_FILES"].append(orig_file);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user