Minor optimization. If collection id is not remove we don't need to call

theses lines
wilder-work
Montel Laurent 9 years ago
parent 84a2e86ef1
commit 88eb29215e
  1. 9
      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);
}
}
}

Loading…
Cancel
Save