give load()/include() with target and infile()/$$fromfile() a clean environment

load()/include() with a target namespace would inherit the current
context. however, if you source a project with all bells and whistles,
this makes completely no sense and may be actually counterproductive.

infile()/$$fromfile() would have interited only the functions from the
current context. that was only a hack to support abusing them.

Change-Id: I2e992b923d9e5b0e5056001ca49b35de573abc63
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
This commit is contained in:
Oswald Buddenhagen 2012-02-21 22:23:48 +01:00 committed by Qt by Nokia
parent deb3c134b5
commit a91c997238
2 changed files with 3 additions and 1 deletions

2
dist/changes-5.0.0 vendored
View File

@ -203,6 +203,8 @@ information about a particular change.
- qmake
* Projects which explicitly set an empty TARGET are considered broken now.
* The makespec and .qmake.cache do not see build pass specific variables any more.
* load()/include() with a target namespace and infile()/$$fromfile() now start with
an entirely pristine context.
* Configure's -sysroot and -hostprefix are now handled slightly differently.
The QT_INSTALL_... properties are now automatically prefixed with the sysroot;
the raw values are available as QT_RAW_INSTALL_... and the sysroot as QT_SYSROOT.

View File

@ -1633,7 +1633,7 @@ QMakeProject::doProjectInclude(QString file, uchar flags, QHash<QString, QString
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
QMakeProject proj(this, &place);
QMakeProject proj(prop);
if(flags & IncludeFlagNewParser) {
parsed = proj.read(file, proj.variables()); // parse just that file (fromfile, infile)
} else {