mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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
1 changed files with 5 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue