From e1df15a7b98c994c0a39e6a2cb610531e75518d9 Mon Sep 17 00:00:00 2001 From: mlangkabel Date: Tue, 8 May 2018 11:13:10 +0200 Subject: [PATCH] ui: disable re-pre-filling of indexed header paths for compilation database sourcegroups (issue #579) * disable re-pre-filling of indexed header paths if these are empty when showing settings of a cdb sourgroup * fixed indexed header path were not regarded when deciding if project settings have been updated --- src/lib/settings/SourceGroupSettingsCxxCdb.cpp | 3 ++- .../window/project_wizzard/QtProjectWizzardContentPaths.cpp | 5 ----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/lib/settings/SourceGroupSettingsCxxCdb.cpp b/src/lib/settings/SourceGroupSettingsCxxCdb.cpp index dea2f967..a6cc2638 100644 --- a/src/lib/settings/SourceGroupSettingsCxxCdb.cpp +++ b/src/lib/settings/SourceGroupSettingsCxxCdb.cpp @@ -40,7 +40,8 @@ bool SourceGroupSettingsCxxCdb::equals(std::shared_ptr othe return ( otherCxxCdb && SourceGroupSettingsCxx::equals(other) && - m_compilationDatabasePath == otherCxxCdb->m_compilationDatabasePath + m_compilationDatabasePath == otherCxxCdb->m_compilationDatabasePath && + utility::isPermutation(m_indexedHeaderPaths, otherCxxCdb->m_indexedHeaderPaths) ); } diff --git a/src/lib_gui/qt/window/project_wizzard/QtProjectWizzardContentPaths.cpp b/src/lib_gui/qt/window/project_wizzard/QtProjectWizzardContentPaths.cpp index 2298141a..8a44ec13 100644 --- a/src/lib_gui/qt/window/project_wizzard/QtProjectWizzardContentPaths.cpp +++ b/src/lib_gui/qt/window/project_wizzard/QtProjectWizzardContentPaths.cpp @@ -334,11 +334,6 @@ void QtProjectWizzardContentPathsCDBHeader::load() { if (std::shared_ptr cdbSettings = std::dynamic_pointer_cast(m_settings)) { - if (cdbSettings->getIndexedHeaderPaths().empty()) - { - cdbSettings->setIndexedHeaderPaths(getIndexedPathsDerivedFromCDB(cdbSettings)); - } - m_list->setPaths(cdbSettings->getIndexedHeaderPaths()); } }