From e3a6c3257eef4a692d39507da7659efb18b1117e Mon Sep 17 00:00:00 2001 From: Eberhard Graether Date: Mon, 9 Oct 2017 21:38:04 +0200 Subject: [PATCH] ui: Removed include check validation for cdb source groups --- src/lib_cxx/project/IncludeValidation.cpp | 9 +++++++-- .../QtProjectWizzardContentPaths.cpp | 14 +++++++++----- .../project_wizzard/QtProjectWizzardContentPaths.h | 2 ++ 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/src/lib_cxx/project/IncludeValidation.cpp b/src/lib_cxx/project/IncludeValidation.cpp index f27b96d0..b384130f 100644 --- a/src/lib_cxx/project/IncludeValidation.cpp +++ b/src/lib_cxx/project/IncludeValidation.cpp @@ -46,14 +46,19 @@ std::vector IncludeValidation::getUnresolvedIncludeDirectives( while (!unprocessedFilePaths.empty()) { - std::transform(unprocessedFilePaths.begin(), unprocessedFilePaths.end(), std::inserter(processedFilePaths, processedFilePaths.begin()), [](const FilePath& p){ return p.str(); }); + std::transform( + unprocessedFilePaths.begin(), unprocessedFilePaths.end(), + std::inserter(processedFilePaths, processedFilePaths.begin()), + [](const FilePath& p){ return p.str(); } + ); std::set tempUnprocessedFilePaths; for (const FilePath& filePath: unprocessedFilePaths) { for (const IncludeDirective& includeDirective: getIncludeDirectives(filePath)) { - const FilePath resolvedIncludePath = resolveIncludeDirective(includeDirective, headerSearchDirectories); + const FilePath resolvedIncludePath = + resolveIncludeDirective(includeDirective, headerSearchDirectories).canonical(); if (resolvedIncludePath.empty()) { unresolvedIncludeDirectives.insert(includeDirective); diff --git a/src/lib_gui/qt/window/project_wizzard/QtProjectWizzardContentPaths.cpp b/src/lib_gui/qt/window/project_wizzard/QtProjectWizzardContentPaths.cpp index 09f43d42..159d4d7f 100644 --- a/src/lib_gui/qt/window/project_wizzard/QtProjectWizzardContentPaths.cpp +++ b/src/lib_gui/qt/window/project_wizzard/QtProjectWizzardContentPaths.cpp @@ -354,6 +354,7 @@ QtProjectWizzardContentPathsHeaderSearch::QtProjectWizzardContentPathsHeaderSear ) : QtProjectWizzardContentPaths(settings, window) , m_showValidationResultFunctor(std::bind(&QtProjectWizzardContentPathsHeaderSearch::showValidationResult, this, std::placeholders::_1)) + , m_isCdb(isCDB) { setTitleString(isCDB ? "Additional Include Paths" : "Include Paths"); setHelpString( @@ -375,12 +376,15 @@ void QtProjectWizzardContentPathsHeaderSearch::populate(QGridLayout* layout, int { QtProjectWizzardContentPaths::populate(layout, row); - QPushButton* button = new QPushButton("validate include directives"); - button->setObjectName("windowButton"); - connect(button, &QPushButton::clicked, this, &QtProjectWizzardContentPathsHeaderSearch::validateButtonClicked); + if (!m_isCdb) + { + QPushButton* button = new QPushButton("validate include directives"); + button->setObjectName("windowButton"); + connect(button, &QPushButton::clicked, this, &QtProjectWizzardContentPathsHeaderSearch::validateButtonClicked); - layout->addWidget(button, row, QtProjectWizzardWindow::BACK_COL, Qt::AlignRight | Qt::AlignTop); - row++; + layout->addWidget(button, row, QtProjectWizzardWindow::BACK_COL, Qt::AlignRight | Qt::AlignTop); + row++; + } } void QtProjectWizzardContentPathsHeaderSearch::load() diff --git a/src/lib_gui/qt/window/project_wizzard/QtProjectWizzardContentPaths.h b/src/lib_gui/qt/window/project_wizzard/QtProjectWizzardContentPaths.h index e6a2a0b1..ab9747bb 100644 --- a/src/lib_gui/qt/window/project_wizzard/QtProjectWizzardContentPaths.h +++ b/src/lib_gui/qt/window/project_wizzard/QtProjectWizzardContentPaths.h @@ -119,6 +119,8 @@ private slots: private: void showValidationResult(const std::vector& unresolvedIncludes); QtThreadedFunctor> m_showValidationResultFunctor; + + bool m_isCdb; }; class QtProjectWizzardContentPathsHeaderSearchGlobal