diff options
-rw-r--r-- | desktop-widgets/mainwindow.cpp | 2 | ||||
-rw-r--r-- | subsurface-core/qthelper.cpp | 5 | ||||
-rw-r--r-- | subsurface-core/qthelper.h | 2 |
3 files changed, 4 insertions, 5 deletions
diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp index ca36cb75c..a3d6c4333 100644 --- a/desktop-widgets/mainwindow.cpp +++ b/desktop-widgets/mainwindow.cpp @@ -592,7 +592,7 @@ void learnImageDirs(QStringList dirnames) { QList<QFuture<void> > futures; foreach (QString dir, dirnames) { - futures << QtConcurrent::run(learnImages, QDir(dir), 10, false); + futures << QtConcurrent::run(learnImages, QDir(dir), 10); } DivePictureModel::instance()->updateDivePicturesWhenDone(futures); } diff --git a/subsurface-core/qthelper.cpp b/subsurface-core/qthelper.cpp index 72221eacf..7c67e0993 100644 --- a/subsurface-core/qthelper.cpp +++ b/subsurface-core/qthelper.cpp @@ -1129,14 +1129,13 @@ extern "C" void cache_picture(struct picture *picture) QtConcurrent::run(hashPicture, picture); } -void learnImages(const QDir dir, int max_recursions, bool recursed) +void learnImages(const QDir dir, int max_recursions) { - QDir current(dir); QStringList filters, files; if (max_recursions) { foreach (QString dirname, dir.entryList(QStringList(), QDir::NoDotAndDotDot | QDir::Dirs)) { - learnImages(QDir(dir.filePath(dirname)), max_recursions - 1, true); + learnImages(QDir(dir.filePath(dirname)), max_recursions - 1); } } diff --git a/subsurface-core/qthelper.h b/subsurface-core/qthelper.h index 09073e25b..3a5ef60e4 100644 --- a/subsurface-core/qthelper.h +++ b/subsurface-core/qthelper.h @@ -23,7 +23,7 @@ void read_hashes(); void write_hashes(); void updateHash(struct picture *picture); QByteArray hashFile(const QString filename); -void learnImages(const QDir dir, int max_recursions, bool recursed); +void learnImages(const QDir dir, int max_recursions); void add_hash(const QString filename, QByteArray hash); void hashPicture(struct picture *picture); QString localFilePath(const QString originalFilename); |