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
+8
View File
@@ -2,6 +2,7 @@
#include "utility/AppPath.h"
#include "utility/logging/FileLogger.h"
#include "utility/messaging/type/indexing/MessageIndexingStatus.h"
#include "utility/scheduling/Blackboard.h"
#include "utility/UserPaths.h"
#include "utility/utilityApp.h"
@@ -298,4 +299,11 @@ void TaskBuildIndex::updateIndexingDialog(
Application::getInstance()->getDialogView(DialogView::UseCase::INDEXING)->updateIndexingDialog(
m_indexingFileCount, indexedSourceFileCount, sourceFileCount, sourcePaths);
int progress = 0;
if (sourceFileCount)
{
progress = indexedSourceFileCount * 100 / sourceFileCount;
}
MessageIndexingStatus(true, progress).dispatch();
}