From 35940f16e41377dbf7a38a76085aad36113ac5a7 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Thu, 17 Jul 2014 12:33:03 +0200 Subject: [PATCH] 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 --- src/plugins/qbsprojectmanager/qbsproject.cpp | 6 +++++- src/plugins/qbsprojectmanager/qbsproject.h | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/plugins/qbsprojectmanager/qbsproject.cpp b/src/plugins/qbsprojectmanager/qbsproject.cpp index 682c65395bd..d9f7bc6a504 100644 --- a/src/plugins/qbsprojectmanager/qbsproject.cpp +++ b/src/plugins/qbsprojectmanager/qbsproject.cpp @@ -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(); } diff --git a/src/plugins/qbsprojectmanager/qbsproject.h b/src/plugins/qbsprojectmanager/qbsproject.h index ab86c24074a..c2dde5d5a68 100644 --- a/src/plugins/qbsprojectmanager/qbsproject.h +++ b/src/plugins/qbsprojectmanager/qbsproject.h @@ -146,6 +146,7 @@ private: const QString m_projectName; const QString m_fileName; qbs::Project m_qbsProject; + qbs::ProjectData m_projectData; QSet m_qbsDocuments; QbsRootProjectNode *m_rootProjectNode;