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:
@@ -167,7 +167,10 @@ void TaskBuildIndex::terminate()
|
||||
|
||||
void TaskBuildIndex::handleMessage(MessageInterruptTasks* message)
|
||||
{
|
||||
m_interrupted = true;
|
||||
if (!Application::getInstance()->getDialogView(DialogView::UseCase::INDEXING)->dialogsHidden())
|
||||
{
|
||||
m_interrupted = true;
|
||||
}
|
||||
}
|
||||
|
||||
void TaskBuildIndex::runIndexerProcess(int processId, const std::wstring& logFilePath)
|
||||
@@ -291,18 +294,8 @@ void TaskBuildIndex::updateIndexingDialog(
|
||||
blackboard->get("indexed_source_file_count", indexedSourceFileCount);
|
||||
}
|
||||
|
||||
if (!sourcePaths.empty())
|
||||
{
|
||||
std::vector<std::wstring> stati;
|
||||
for (const FilePath& path : sourcePaths)
|
||||
{
|
||||
m_indexingFileCount++;
|
||||
stati.push_back(L"[" + std::to_wstring(m_indexingFileCount) + L"/" + std::to_wstring(sourceFileCount) + L"] Indexing file: " + path.wstr());
|
||||
}
|
||||
MessageStatus(stati, false, true).dispatch();
|
||||
}
|
||||
m_indexingFileCount += sourcePaths.size();
|
||||
|
||||
Application::getInstance()->getDialogView()->updateIndexingDialog(
|
||||
m_indexingFileCount, indexedSourceFileCount, sourceFileCount, (sourcePaths.empty() ? FilePath() : sourcePaths.back())
|
||||
);
|
||||
Application::getInstance()->getDialogView(DialogView::UseCase::INDEXING)->updateIndexingDialog(
|
||||
m_indexingFileCount, indexedSourceFileCount, sourceFileCount, sourcePaths);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user