Removed multiple dialog steps in Source Group setup (issue #723) (#913)

* removed QtSourceGroupWizard, QtSourceGroupWizardPage and context types
* removed isInForm flag of QtProjectWizardContent
* added check of empty source paths
* set project window as parent for message boxes, so they don't get hidden behind main window
* fixed issues when removing and duplicating source groups
* updated project setup tests to no steps
This commit is contained in:
Eberhard Gräther
2020-02-10 20:00:36 +01:00
committed by GitHub
parent 7f9f098c70
commit 260f1227bc
51 changed files with 485 additions and 1010 deletions
@@ -12,7 +12,8 @@ QtProjectWizardContentPathsHeaderSearchGlobal::QtProjectWizardContentPathsHeader
: QtProjectWizardContentPaths(
std::shared_ptr<SourceGroupSettings>(),
window,
QtPathListBox::SELECTION_POLICY_DIRECTORIES_ONLY)
QtPathListBox::SELECTION_POLICY_DIRECTORIES_ONLY,
true)
{
setTitleString("Global Include Paths");
setHelpString(
@@ -72,7 +73,7 @@ bool QtProjectWizardContentPathsHeaderSearchGlobal::check()
if (compilerHeaderPaths.size())
{
QMessageBox msgBox;
QMessageBox msgBox(m_window);
msgBox.setText("Multiple Compiler Headers");
msgBox.setInformativeText(
"Your Global Include Paths contain other paths that hold C/C++ compiler headers, "
@@ -112,6 +113,33 @@ void QtProjectWizardContentPathsHeaderSearchGlobal::detectedPaths(const std::vec
void QtProjectWizardContentPathsHeaderSearchGlobal::setPaths(const std::vector<FilePath>& paths)
{
// check data change to avoid UI update that messes with the scroll position
{
std::vector<FilePath> currentPaths = m_list->getPathsAsDisplayed();
if (currentPaths.size())
{
currentPaths.erase(currentPaths.begin());
}
if (currentPaths.size() == paths.size())
{
bool same = true;
for (size_t i = 0; i < paths.size(); ++i)
{
if (currentPaths[i] != paths[i])
{
same = false;
break;
}
}
if (same)
{
return;
}
}
}
m_list->setPaths({});
m_list->addPaths({ResourcePaths::getCxxCompilerHeaderPath()}, true);
m_list->addPaths(paths);