diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2017-07-27 12:06:30 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2017-07-27 12:34:14 +0000 |
commit | 51b922687ec9e5faff21e5d1c814270d2a12b30a (patch) | |
tree | de92b9886dd1e76a6c3f31f4e69046968d88ae77 | |
parent | ff1eb8f5865475b8e161fd81c82ca891264de4ff (diff) |
Fix false positive in change tracking code
We needlessly re-resolved under certain circumstances (namely, when the
"resolve" command was used and no explicit profile was given).
Change-Id: I0e0d106059e2c32d441e1c13152a7d9b07448b32
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
-rw-r--r-- | src/lib/corelib/buildgraph/buildgraphloader.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/corelib/buildgraph/buildgraphloader.cpp b/src/lib/corelib/buildgraph/buildgraphloader.cpp index e7c93c6fd..ff85f2536 100644 --- a/src/lib/corelib/buildgraph/buildgraphloader.cpp +++ b/src/lib/corelib/buildgraph/buildgraphloader.cpp @@ -921,6 +921,8 @@ void BuildGraphLoader::replaceFileDependencyWithArtifact(const ResolvedProductPt bool BuildGraphLoader::checkConfigCompatibility() { const TopLevelProjectConstPtr restoredProject = m_result.loadedProject; + if (m_parameters.topLevelProfile().isEmpty()) + m_parameters.setTopLevelProfile(restoredProject->profile()); if (!m_parameters.overrideBuildGraphData()) { if (!m_parameters.overriddenValues().isEmpty() && m_parameters.overriddenValues() != restoredProject->overriddenValues) { @@ -929,8 +931,7 @@ bool BuildGraphLoader::checkConfigCompatibility() "you really want to rebuild with the new properties.")); } m_parameters.setOverriddenValues(restoredProject->overriddenValues); - if (!m_parameters.topLevelProfile().isEmpty() - && m_parameters.topLevelProfile() != restoredProject->profile()) { + if (m_parameters.topLevelProfile() != restoredProject->profile()) { throw ErrorInfo(Tr::tr("The current profile is '%1', but profile '%2' was used " "when last building for configuration '%3'. Use the " "'resolve' command if you really want to rebuild with a " |