From 4690a9a25d984090e33e8aa44d0fb9bc0c27fce8 Mon Sep 17 00:00:00 2001 From: fuzzelhjb Date: Fri, 31 Jan 2020 14:08:38 +0100 Subject: [PATCH] Check specific vs config (#2513) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add support for selected Visual Studio configurations in the UI and the project file * skip VS configurations that don't match the one in the project file * rename xml tags * disable selected VS config textbox if all VS configs should be analyzed * on importing a VS project/solution also read all configurations * add QListWidget for VS configurations * auto select these configs that were loaded from the cppcheck file * fine tune UI and handling if no VS solution/project is used Co-authored-by: Daniel Marjamäki --- gui/projectfiledialog.cpp | 5 +++++ gui/projectfiledialog.ui | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gui/projectfiledialog.cpp b/gui/projectfiledialog.cpp index 19ab3c173..3357d117b 100644 --- a/gui/projectfiledialog.cpp +++ b/gui/projectfiledialog.cpp @@ -340,7 +340,10 @@ void ProjectFileDialog::loadFromProjectFile(const ProjectFile *projectFile) } } else + { + mUI.mListVsConfigs->clear(); mUI.mListVsConfigs->setEnabled(false); + } } @@ -460,6 +463,8 @@ void ProjectFileDialog::updatePathsAndDefines() mUI.mBtnIncludeDown->setEnabled(!importProject); mUI.mChkAllVsConfigs->setEnabled(fileName.endsWith(".sln") || fileName.endsWith(".vcxproj")); mUI.mListVsConfigs->setEnabled(fileName.endsWith(".sln") || fileName.endsWith(".vcxproj")); + if(!mUI.mListVsConfigs->isEnabled()) + mUI.mListVsConfigs->clear(); } void ProjectFileDialog::clearImportProject() diff --git a/gui/projectfiledialog.ui b/gui/projectfiledialog.ui index 1e748d27c..0ea3476fc 100644 --- a/gui/projectfiledialog.ui +++ b/gui/projectfiledialog.ui @@ -7,7 +7,7 @@ 0 0 888 - 573 + 546