Display a notification while image hashing is ongoing.
Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
5fe8919424
commit
66ac97d7ad
@ -330,6 +330,7 @@ void learnImageDirs(QStringList dirnames)
|
||||
|
||||
void MainWindow::on_actionHash_images_triggered()
|
||||
{
|
||||
QFuture<void> future;
|
||||
QFileDialog dialog(this, tr("Traverse image directories"), lastUsedDir(), filter());
|
||||
dialog.setFileMode(QFileDialog::Directory);
|
||||
dialog.setViewMode(QFileDialog::Detail);
|
||||
@ -340,7 +341,10 @@ void MainWindow::on_actionHash_images_triggered()
|
||||
dirnames = dialog.selectedFiles();
|
||||
if (dirnames.isEmpty())
|
||||
return;
|
||||
QtConcurrent::run(learnImageDirs,dirnames);
|
||||
future = QtConcurrent::run(learnImageDirs,dirnames);
|
||||
MainWindow::instance()->getNotificationWidget()->showNotification(tr("Scanning images...(this can take a while)"), KMessageWidget::Information);
|
||||
MainWindow::instance()->getNotificationWidget()->setFuture(future);
|
||||
|
||||
}
|
||||
|
||||
ProfileWidget2 *MainWindow::graphics() const
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user