Fix qmake -project

qmake -project was always outputting a project with subdirs template, because
Option::h_moc_mod was not being properly read, causing addFile() to misbehave.

Change-Id: I2c07aea132f9885eabf188de993b0fabfb352886
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
This commit is contained in:
Rafael Roquetto 2012-08-03 19:35:54 +02:00 committed by Qt by Nokia
parent 1db721e51a
commit 6f580d6a5a
2 changed files with 7 additions and 0 deletions

View File

@ -78,6 +78,7 @@ ProjectGenerator::init()
project->read(QMakeProject::ReadFeatures);
project->values("CONFIG").clear();
Option::postProcessProject(project);
QHash<QString, QStringList> &v = project->variables();
QString templ = Option::user_template.isEmpty() ? QString("app") : Option::user_template;

View File

@ -1518,6 +1518,12 @@ QMakeProject::read(uchar cmd)
vars = base_vars; // start with the base
}
setupProject();
} else if (cmd & ReadFeatures) {
// Even when ReadSetup is not set, but ReadFeatures is,
// we still need to process spec_pre.prf to load some
// default values and other settings.
debug_msg(1, "Processing spec_pre (but skipping actual spec): %s", vars["CONFIG"].join("::").toLatin1().constData());
doProjectInclude("spec_pre", IncludeFlagFeature, vars);
}
for (QHash<QString, QStringList>::ConstIterator it = extra_vars.constBegin();