From 0cf0ec3da5c96adc3f37d19929dd89ab4b2182a5 Mon Sep 17 00:00:00 2001 From: houchengqiu Date: Fri, 26 Jan 2024 13:11:12 +0800 Subject: [PATCH] fix: Improve the function of batch exporting images Improve the function of batch exporting images Log: Improve the function of batch exporting images Bug: https://pms.uniontech.com/bug-view-237179.html --- src/album/controller/exporter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/album/controller/exporter.cpp b/src/album/controller/exporter.cpp index 376c19a58..9f91f8d2d 100644 --- a/src/album/controller/exporter.cpp +++ b/src/album/controller/exporter.cpp @@ -73,7 +73,7 @@ void Exporter::exportAlbum(const QStringList &albumPaths, const QString &albumna exportDialog.setDirectory(QStandardPaths::standardLocations(QStandardPaths::PicturesLocation).at(0)); if (exportDialog.exec() == QDialog::Accepted) { - QString exportdir = exportDialog.directory().absolutePath(); + QString exportdir = exportDialog.selectedFiles().at(0); QDir dir; dir.mkdir(exportdir + "/" + albumname); @@ -117,7 +117,7 @@ void Exporter::popupDialogSaveImage(const QStringList &imagePaths) exportDialog.setDirectory(QStandardPaths::standardLocations(QStandardPaths::PicturesLocation).at(0)); if (exportDialog.exec() == QDialog::Accepted) { - QString exportdir = exportDialog.directory().absolutePath(); + QString exportdir = exportDialog.selectedFiles().at(0); int failcount = 0; bool bnewpath = false;