ui: fixes in project setup and indexing

* allow to ignore missing paths in project setup
* button to remove missing paths in project setup
* fixed progress dialog stays on empty project indexing
* don't unblock ui between indexin steps
This commit is contained in:
Eberhard Graether
2017-12-20 22:48:37 +01:00
parent bfa43df491
commit f849c9d01d
11 changed files with 73 additions and 30 deletions
+14 -4
View File
@@ -148,7 +148,7 @@ void Project::load()
}
}
void Project::refresh(DialogView* dialogView, RefreshMode refreshMode)
void Project::refresh(RefreshMode refreshMode, DialogView* dialogView)
{
if (m_state == PROJECT_STATE_NOT_LOADED)
{
@@ -274,7 +274,7 @@ void Project::refresh(DialogView* dialogView, RefreshMode refreshMode)
}
else
{
buildIndex(info);
buildIndex(info, dialogView);
}
}
@@ -296,11 +296,15 @@ RefreshInfo Project::getRefreshInfo(RefreshMode mode) const
}
}
void Project::buildIndex(const RefreshInfo& info)
void Project::buildIndex(const RefreshInfo& info, DialogView* dialogView)
{
if (info.mode == REFRESH_NONE || (!info.filesToClear.size() && !info.filesToIndex.size()))
{
if (!m_hasGUI)
if (m_hasGUI)
{
dialogView->hideDialogs();
}
else
{
MessageFinishedParsing().dispatch();
}
@@ -312,6 +316,8 @@ void Project::buildIndex(const RefreshInfo& info)
MessageStatus("Preparing Indexing", false, true).dispatch();
MessageClearErrorCount().dispatch();
dialogView->showUnknownProgressDialog("Preparing Indexing", "Setting up Indexers");
if (info.mode == REFRESH_ALL_FILES)
{
m_storage->clear();
@@ -426,6 +432,10 @@ void Project::buildIndex(const RefreshInfo& info)
)
);
}
else
{
dialogView->hideUnknownProgressDialog();
}
taskSequential->addTask(std::make_shared<TaskFinishParsing>(m_storage.get(), m_storageCache));