diff options
Diffstat (limited to 'src/lib/corelib/buildgraph/buildgraphloader.cpp')
-rw-r--r-- | src/lib/corelib/buildgraph/buildgraphloader.cpp | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/lib/corelib/buildgraph/buildgraphloader.cpp b/src/lib/corelib/buildgraph/buildgraphloader.cpp index a2f18bda8..b5a57afa5 100644 --- a/src/lib/corelib/buildgraph/buildgraphloader.cpp +++ b/src/lib/corelib/buildgraph/buildgraphloader.cpp @@ -336,16 +336,11 @@ void BuildGraphLoader::trackProjectChanges() bool BuildGraphLoader::hasEnvironmentChanged(const TopLevelProjectConstPtr &restoredProject) const { - for (QHash<QString, QString>::ConstIterator it = restoredProject->usedEnvironment.constBegin(); - it != restoredProject->usedEnvironment.constEnd(); ++it) { - const QString var = it.key(); - const QString oldValue = it.value(); - const QString newValue = m_environment.value(var); - if (newValue != oldValue) { - m_logger.qbsDebug() << QString::fromLatin1("Environment variable '%1' changed " - "from '%2' to '%3'. Must re-resolve project.").arg(var, oldValue, newValue); - return true; - } + if (m_environment != restoredProject->environment) { + m_logger.qbsDebug() << "Set of environment variables changed. Must re-resolve project."; + m_logger.qbsTrace() << "old: " << restoredProject->environment.toStringList() << "\nnew:" + << m_environment.toStringList(); + return true; } return false; } |