logic: Fixed refreshing when source paths were removed

* Define exit state for TaskRepeatWhileSuccess
* Added TaskFinishParsing to end of parsing task sequence
* Also measure time spend clearing files in total index time
This commit is contained in:
Eberhard Graether
2016-09-29 14:58:45 +02:00
parent e5cd905670
commit 3dffd55f75
15 changed files with 202 additions and 80 deletions
+6
View File
@@ -2,6 +2,8 @@
#include "component/view/DialogView.h"
#include "data/PersistentStorage.h"
#include "utility/scheduling/Blackboard.h"
#include "utility/utility.h"
TaskCleanStorage::TaskCleanStorage(
PersistentStorage* storage, const std::vector<FilePath>& filePaths, DialogView* dialogView
@@ -15,6 +17,8 @@ TaskCleanStorage::TaskCleanStorage(
void TaskCleanStorage::doEnter(std::shared_ptr<Blackboard> blackboard)
{
m_dialogView->showProgressDialog("Clearing Files", std::to_string(m_filePaths.size()) + " Files");
m_start = utility::durationStart();
}
Task::TaskState TaskCleanStorage::doUpdate(std::shared_ptr<Blackboard> blackboard)
@@ -28,6 +32,8 @@ Task::TaskState TaskCleanStorage::doUpdate(std::shared_ptr<Blackboard> blackboar
void TaskCleanStorage::doExit(std::shared_ptr<Blackboard> blackboard)
{
blackboard->set("clear_time", utility::duration(m_start));
m_dialogView->hideProgressDialog();
}