logic: background indexing (issue #175)

* allow hiding of indexing dialogs to browse loaded project while indexing
* show indexing status in status bar while indexing
* use different dialog views for different use cases to avoid state collisions
* fixed error label in status bar jittering while indexing
* show hand cursors for clickable elements in status bar
* indexing is not interrupted on pressing ESC while in hidden
* disable error table and error label while indexing
* refactored indexing messages
* forbid indexing and changing project while indexing
* don't show indexing status messages in status bar when indexing in the background
* allow tasks to run in the background

fortune cookie message = A journey is waiting for you.
This commit is contained in:
Eberhard Graether
2018-07-10 11:42:58 +02:00
parent 6bbb44309d
commit ad325ac974
76 changed files with 875 additions and 448 deletions
@@ -730,14 +730,15 @@ void QtProjectWizzardContentPathsHeaderSearch::validateIncludesButtonClicked()
{
std::vector<IncludeDirective> unresolvedIncludes;
{
std::shared_ptr<DialogView> dialogView = Application::getInstance()->getDialogView();
QtDialogView* dialogView = dynamic_cast<QtDialogView*>(
Application::getInstance()->getDialogView(DialogView::UseCase::PROJECT_SETUP).get());
std::set<FilePath> sourceFilePaths;
std::vector<FilePath> indexedFilePaths;
std::vector<FilePath> headerSearchPaths;
{
std::dynamic_pointer_cast<QtDialogView>(dialogView)->setParentWindow(m_window);
dialogView->setParentWindow(m_window);
dialogView->showUnknownProgressDialog(L"Processing", L"Gathering Source Files");
ScopedFunctor dialogHider([&dialogView](){
dialogView->hideUnknownProgressDialog();
@@ -761,7 +762,7 @@ void QtProjectWizzardContentPathsHeaderSearch::validateIncludesButtonClicked()
}
}
{
std::dynamic_pointer_cast<QtDialogView>(dialogView)->setParentWindow(m_window);
dialogView->setParentWindow(m_window);
ScopedFunctor dialogHider([&dialogView](){
dialogView->hideProgressDialog();
});
@@ -773,8 +774,9 @@ void QtProjectWizzardContentPathsHeaderSearch::validateIncludesButtonClicked()
log2(sourceFilePaths.size()),
[&](const float progress)
{
Application::getInstance()->getDialogView()->showProgressDialog(
L"Processing", std::to_wstring(int(progress * sourceFilePaths.size())) + L" Files", int(progress * 100.0f)
dialogView->showProgressDialog(
L"Processing", std::to_wstring(int(progress * sourceFilePaths.size())) + L" Files",
int(progress * 100.0f)
);
}
);
@@ -802,7 +804,8 @@ void QtProjectWizzardContentPathsHeaderSearch::finishedSelectDetectIncludesRootP
{
std::set<FilePath> detectedHeaderSearchPaths;
{
std::shared_ptr<QtDialogView> dialogView = std::dynamic_pointer_cast<QtDialogView>(Application::getInstance()->getDialogView());
QtDialogView* dialogView = dynamic_cast<QtDialogView*>(
Application::getInstance()->getDialogView(DialogView::UseCase::PROJECT_SETUP).get());
std::set<FilePath> sourceFilePaths;
std::vector<FilePath> headerSearchPaths;
@@ -841,8 +844,9 @@ void QtProjectWizzardContentPathsHeaderSearch::finishedSelectDetectIncludesRootP
log2(sourceFilePaths.size()),
[&](const float progress)
{
Application::getInstance()->getDialogView()->showProgressDialog(
L"Processing", std::to_wstring(int(progress * sourceFilePaths.size())) + L" Files", int(progress * 100.0f)
dialogView->showProgressDialog(
L"Processing", std::to_wstring(int(progress * sourceFilePaths.size())) + L" Files",
int(progress * 100.0f)
);
}
);