diff options
author | Robert C. Helling <helling@atdotde.de> | 2015-04-29 22:17:59 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-04-29 14:01:14 -0700 |
commit | 66ac97d7adf5b47cf1a6cedab7b74fa1dc387558 (patch) | |
tree | 8f27c9224a545ffcbcb5bae59b56556e29ccde66 /qt-ui/mainwindow.cpp | |
parent | 5fe8919424acae8abaf9a8fe9bc5ee3e93b7f758 (diff) | |
download | subsurface-66ac97d7adf5b47cf1a6cedab7b74fa1dc387558.tar.gz |
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>
Diffstat (limited to 'qt-ui/mainwindow.cpp')
-rw-r--r-- | qt-ui/mainwindow.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index e22f34035..23f9551f1 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -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 |