QbsProjectManager: Only update project nodes etc if necessary.

That is, if qbs::Project::projectData() has changed. There are still
some false positives left (e.g. the project nodes will also update if
only the file paths of executables have changed), but we can deal with
those later.

Change-Id: Ifa18903aba41c21769bfe4cd0e4f6004f1a94f11
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
This commit is contained in:
Christian Kandeler
2014-07-17 12:33:03 +02:00
parent 01addecb8d
commit 35940f16e4
2 changed files with 6 additions and 1 deletions

View File

@@ -291,8 +291,12 @@ void QbsProject::handleQbsParsingDone(bool success)
if (success) {
m_qbsProject = m_qbsProjectParser->qbsProject();
const qbs::ProjectData &projectData = m_qbsProject.projectData();
QTC_CHECK(m_qbsProject.isValid());
readQbsData();
if (projectData != m_projectData) {
m_projectData = projectData;
readQbsData();
}
} else {
m_qbsUpdateFutureInterface->reportCanceled();
}

View File

@@ -146,6 +146,7 @@ private:
const QString m_projectName;
const QString m_fileName;
qbs::Project m_qbsProject;
qbs::ProjectData m_projectData;
QSet<Core::IDocument *> m_qbsDocuments;
QbsRootProjectNode *m_rootProjectNode;