qmakeprojectmanager: check .pro file when building

A .pro file mismatch between the generated Makefile and what
should be generated was checked only at import.
Always check that (ant thus warn ifs one ends up in that situation)

Change-Id: I73436845ec82d6598ab13f446c655b644c0e6b3f
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
Fawzi Mohamed
2014-01-23 12:09:11 +01:00
parent a8ea0a0736
commit 70cecb52a4

View File

@@ -341,6 +341,14 @@ QmakeBuildConfiguration::MakefileState QmakeBuildConfiguration::compareToImportF
BaseQtVersion *version = QtKitInformation::qtVersion(target()->kit());
if (!version)
return MakefileForWrongProject;
if (QtSupport::QtVersionManager::makefileIsFor(makefile, qs->project()->projectFilePath())
!= QtSupport::QtVersionManager::SameProject) {
if (debug) {
qDebug() << "different profile used to generate the Makefile:"
<< makefile << " expected profile:" << qs->project()->projectFilePath();
}
return MakefileIncompatible;
}
if (version->qmakeCommand() == qmakePath) {
// same qtversion
QPair<BaseQtVersion::QmakeBuildConfigs, QString> result =