ui: add progress dialog for "show source files" button
This commit is contained in:
@@ -67,6 +67,8 @@ void QtDialogView::hideUnknownProgressDialog()
|
|||||||
setUIBlocked(false);
|
setUIBlocked(false);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
setParentWindow(nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void QtDialogView::showProgressDialog(const std::string& title, const std::string& message, int progress)
|
void QtDialogView::showProgressDialog(const std::string& title, const std::string& message, int progress)
|
||||||
@@ -110,6 +112,8 @@ void QtDialogView::hideProgressDialog()
|
|||||||
setUIBlocked(false);
|
setUIBlocked(false);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
setParentWindow(nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -218,6 +222,8 @@ void QtDialogView::hideDialogs()
|
|||||||
setUIBlocked(false);
|
setUIBlocked(false);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
setParentWindow(nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
int QtDialogView::confirm(const std::string& message, const std::vector<std::string>& options)
|
int QtDialogView::confirm(const std::string& message, const std::vector<std::string>& options)
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
#include "settings/SourceGroupSettingsJava.h"
|
#include "settings/SourceGroupSettingsJava.h"
|
||||||
#include "utility/file/FileManager.h"
|
#include "utility/file/FileManager.h"
|
||||||
#include "utility/messaging/type/MessageStatus.h"
|
#include "utility/messaging/type/MessageStatus.h"
|
||||||
|
#include "utility/ScopedFunctor.h"
|
||||||
#include "utility/utilityMaven.h"
|
#include "utility/utilityMaven.h"
|
||||||
|
|
||||||
QtProjectWizzardContentPath::QtProjectWizzardContentPath(std::shared_ptr<SourceGroupSettings> settings, QtProjectWizzardWindow* window)
|
QtProjectWizzardContentPath::QtProjectWizzardContentPath(std::shared_ptr<SourceGroupSettings> settings, QtProjectWizzardWindow* window)
|
||||||
@@ -226,8 +227,12 @@ std::vector<std::string> QtProjectWizzardContentPathSourceMaven::getFileNames()
|
|||||||
|
|
||||||
std::vector<std::string> list;
|
std::vector<std::string> list;
|
||||||
std::shared_ptr<DialogView> dialogView = Application::getInstance()->getDialogView();
|
std::shared_ptr<DialogView> dialogView = Application::getInstance()->getDialogView();
|
||||||
std::dynamic_pointer_cast<QtDialogView>(dialogView)->setParentWindow(m_window);
|
|
||||||
|
|
||||||
|
ScopedFunctor scopedFunctor([&dialogView](){
|
||||||
|
dialogView->hideUnknownProgressDialog();
|
||||||
|
});
|
||||||
|
|
||||||
|
std::dynamic_pointer_cast<QtDialogView>(dialogView)->setParentWindow(m_window);
|
||||||
dialogView->showUnknownProgressDialog("Preparing Project", "Maven\nGenerating Source Files");
|
dialogView->showUnknownProgressDialog("Preparing Project", "Maven\nGenerating Source Files");
|
||||||
const bool success = utility::mavenGenerateSources(mavenPath, mavenProjectRoot);
|
const bool success = utility::mavenGenerateSources(mavenPath, mavenProjectRoot);
|
||||||
if (!success)
|
if (!success)
|
||||||
@@ -268,13 +273,10 @@ std::vector<std::string> QtProjectWizzardContentPathSourceMaven::getFileNames()
|
|||||||
list.push_back(path.str());
|
list.push_back(path.str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
dialogView->hideUnknownProgressDialog();
|
|
||||||
std::dynamic_pointer_cast<QtDialogView>(dialogView)->setParentWindow(nullptr);
|
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QtProjectWizzardContentPathDependenciesMaven::QtProjectWizzardContentPathDependenciesMaven(
|
QtProjectWizzardContentPathDependenciesMaven::QtProjectWizzardContentPathDependenciesMaven(
|
||||||
std::shared_ptr<SourceGroupSettings> settings, QtProjectWizzardWindow* window
|
std::shared_ptr<SourceGroupSettings> settings, QtProjectWizzardWindow* window
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -176,6 +176,15 @@ void QtProjectWizzardContentPathsSource::save()
|
|||||||
|
|
||||||
std::vector<std::string> QtProjectWizzardContentPathsSource::getFileNames() const
|
std::vector<std::string> QtProjectWizzardContentPathsSource::getFileNames() const
|
||||||
{
|
{
|
||||||
|
std::shared_ptr<DialogView> dialogView = Application::getInstance()->getDialogView();
|
||||||
|
|
||||||
|
ScopedFunctor scopedFunctor([&dialogView](){
|
||||||
|
dialogView->hideUnknownProgressDialog();
|
||||||
|
});
|
||||||
|
|
||||||
|
std::dynamic_pointer_cast<QtDialogView>(dialogView)->setParentWindow(m_window);
|
||||||
|
dialogView->showUnknownProgressDialog("Processing", "Gathering Source Files");
|
||||||
|
|
||||||
FileManager fileManager;
|
FileManager fileManager;
|
||||||
fileManager.update(
|
fileManager.update(
|
||||||
m_settings->getSourcePathsExpandedAndAbsolute(),
|
m_settings->getSourcePathsExpandedAndAbsolute(),
|
||||||
@@ -390,16 +399,13 @@ void QtProjectWizzardContentPathsHeaderSearch::validateButtonClicked()
|
|||||||
std::vector<IncludeDirective> unresolvedIncludes;
|
std::vector<IncludeDirective> unresolvedIncludes;
|
||||||
{
|
{
|
||||||
std::shared_ptr<DialogView> dialogView = Application::getInstance()->getDialogView();
|
std::shared_ptr<DialogView> dialogView = Application::getInstance()->getDialogView();
|
||||||
std::dynamic_pointer_cast<QtDialogView>(dialogView)->setParentWindow(m_window);
|
|
||||||
ScopedFunctor dialogParentResetter([&dialogView](){
|
|
||||||
std::dynamic_pointer_cast<QtDialogView>(dialogView)->setParentWindow(nullptr);
|
|
||||||
});
|
|
||||||
|
|
||||||
std::vector<FilePath> sourceFilePaths;
|
std::vector<FilePath> sourceFilePaths;
|
||||||
std::vector<FilePath> indexedFilePaths;
|
std::vector<FilePath> indexedFilePaths;
|
||||||
std::vector<FilePath> headerSearchPaths;
|
std::vector<FilePath> headerSearchPaths;
|
||||||
|
|
||||||
{
|
{
|
||||||
|
std::dynamic_pointer_cast<QtDialogView>(dialogView)->setParentWindow(m_window);
|
||||||
dialogView->showUnknownProgressDialog("Processing", "Gathering Source Files");
|
dialogView->showUnknownProgressDialog("Processing", "Gathering Source Files");
|
||||||
ScopedFunctor dialogHider([&dialogView](){
|
ScopedFunctor dialogHider([&dialogView](){
|
||||||
dialogView->hideUnknownProgressDialog();
|
dialogView->hideUnknownProgressDialog();
|
||||||
@@ -422,6 +428,7 @@ void QtProjectWizzardContentPathsHeaderSearch::validateButtonClicked()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
std::dynamic_pointer_cast<QtDialogView>(dialogView)->setParentWindow(m_window);
|
||||||
ScopedFunctor dialogHider([&dialogView](){
|
ScopedFunctor dialogHider([&dialogView](){
|
||||||
dialogView->hideProgressDialog();
|
dialogView->hideProgressDialog();
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user