From 88eb29215e2d8fccc64dacc1b207bd7e435c53f3 Mon Sep 17 00:00:00 2001 From: Montel Laurent Date: Sat, 8 Apr 2017 10:37:10 +0200 Subject: [PATCH] Minor optimization. If collection id is not remove we don't need to call theses lines --- src/searchdialog/incompleteindexdialog.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/searchdialog/incompleteindexdialog.cpp b/src/searchdialog/incompleteindexdialog.cpp index d23f052fd..69192d6bc 100644 --- a/src/searchdialog/incompleteindexdialog.cpp +++ b/src/searchdialog/incompleteindexdialog.cpp @@ -220,11 +220,10 @@ void IncompleteIndexDialog::slotCurrentlyIndexingCollectionChanged(qlonglong col const int idx = mIndexingQueue.indexOf(colId); if (idx > -1) { mIndexingQueue.removeAll(idx); - } - - mProgressDialog->setValue(mProgressDialog->maximum() - mIndexingQueue.size()); + mProgressDialog->setValue(mProgressDialog->maximum() - mIndexingQueue.size()); - if (mIndexingQueue.isEmpty()) { - QTimer::singleShot(1000, this, &IncompleteIndexDialog::accept); + if (mIndexingQueue.isEmpty()) { + QTimer::singleShot(1000, this, &IncompleteIndexDialog::accept); + } } }