src: avoid indexing slowdown on macOS by not using unknown progress for progressbar in status bar

This commit is contained in:
Eberhard Graether
2018-07-24 03:36:27 +02:00
parent 0fc670bcd7
commit ac31bb6779
14 changed files with 34 additions and 67 deletions
+2 -2
View File
@@ -24,6 +24,7 @@
#include "utility/messaging/type/error/MessageErrorCountClear.h"
#include "utility/messaging/type/indexing/MessageIndexingFinished.h"
#include "utility/messaging/type/indexing/MessageIndexingStarted.h"
#include "utility/messaging/type/indexing/MessageIndexingStatus.h"
#include "utility/messaging/type/MessageRefresh.h"
#include "utility/messaging/type/MessageStatus.h"
#include "utility/scheduling/TaskDecoratorRepeat.h"
@@ -398,6 +399,7 @@ void Project::buildIndex(const RefreshInfo& info, std::shared_ptr<DialogView> di
MessageErrorCountClear().dispatch();
dialogView->showUnknownProgressDialog(L"Preparing Indexing", L"Setting up Indexers");
MessageIndexingStatus(true, 0).dispatch();
m_storageCache->clear();
m_storageCache->setSubject(m_storage.get());
@@ -417,7 +419,6 @@ void Project::buildIndex(const RefreshInfo& info, std::shared_ptr<DialogView> di
bool hideable = m_state == PROJECT_STATE_LOADED || m_state == PROJECT_STATE_OUTDATED;
dialogView->setDialogsHideable(hideable);
dialogView->setUpdateIndexingStatus(true);
if (info.mode != REFRESH_ALL_FILES && (info.filesToClear.size() || info.nonIndexedFilesToClear.size()))
{
@@ -560,7 +561,6 @@ void Project::buildIndex(const RefreshInfo& info, std::shared_ptr<DialogView> di
taskSequential->addTask(std::make_shared<TaskLambda>([dialogView, this]() {
m_isIndexing = false;
dialogView->setDialogsHideable(false);
dialogView->setUpdateIndexingStatus(false);
MessageIndexingFinished().dispatch();
}));