logic: Fixed issues when indexing via CLI (issue #718)

* show proper error message in console when project configuration has issues
* quit when project configuration is wrong
* show indexing progress as self-updating percentage
This commit is contained in:
Eberhard Graether
2019-08-26 16:34:54 +02:00
parent 5a97c88a69
commit 733ef0ea04
8 changed files with 43 additions and 57 deletions
+4 -2
View File
@@ -516,8 +516,9 @@ void Project::buildIndex(RefreshInfo info, std::shared_ptr<DialogView> dialogVie
}
}
taskSequential->addTask(std::make_shared<TaskSetValue<int>>(
"source_file_count", indexerCommandProvider->size() + customIndexerCommandProvider->size()));
size_t sourceFileCount = indexerCommandProvider->size() + customIndexerCommandProvider->size();
taskSequential->addTask(std::make_shared<TaskSetValue<int>>("source_file_count", sourceFileCount));
taskSequential->addTask(std::make_shared<TaskSetValue<int>>("indexed_source_file_count", 0));
taskSequential->addTask(std::make_shared<TaskSetValue<bool>>("interrupted_indexing", false));
taskSequential->addTask(std::make_shared<TaskSetValue<float>>("index_time", 0.0f));
@@ -673,6 +674,7 @@ void Project::buildIndex(RefreshInfo info, std::shared_ptr<DialogView> dialogVie
Task::dispatch(TabId::app(), taskSequential);
m_refreshStage = RefreshStageType::INDEXING;
MessageStatus(L"Starting Indexing: " + std::to_wstring(sourceFileCount) + L" source files", false, true).dispatch();
MessageIndexingStarted().dispatch();
}