[network/ruqola] src/widgets/misc: Fix open correct file/folder
Laurent Montel <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git commit 8a9dc221bdf2ee0c5a945dd146c6d32211e4de72 by Laurent Montel.
Committed on 13/08/2026 at 18:57.
Pushed by mlaurent into branch 'master'.
Fix open correct file/folder
M +6 -3 src/widgets/misc/messageattachmentdownloadandsavejob.cpp
https://invent.kde.org/network/ruqola/-/commit/8a9dc221bdf2ee0c5a945dd146c6d32211e4de72
diff --git a/src/widgets/misc/messageattachmentdownloadandsavejob.cpp b/src/widgets/misc/messageattachmentdownloadandsavejob.cpp
index 00aab97978..5f6101474c 100644
--- a/src/widgets/misc/messageattachmentdownloadandsavejob.cpp
+++ b/src/widgets/misc/messageattachmentdownloadandsavejob.cpp
@@ -22,16 +22,19 @@ MessageAttachmentDownloadAndSaveJob::~MessageAttachmentDownloadAndSaveJob() = de
void MessageAttachmentDownloadAndSaveJob::slotDownloadDone(const QString &path)
{
switch (mInfo.actionType) {
- case MessageAttachmentDownloadAndSaveJob::ActionType::DownloadAndSave:
+ case MessageAttachmentDownloadAndSaveJob::ActionType::DownloadAndSave: {
#if TEXTADDONSWIDGETS_VERSION >= QT_VERSION_CHECK(2, 1, 43)
- if (!TextAddonsWidgets::SaveFileUtils::saveFile(mInfo.parentWidget, path, saveFileString())) {
+ const QString file = TextAddonsWidgets::SaveFileUtils::saveFile(mInfo.parentWidget, path, saveFileString());
+ if (file.isEmpty()) {
return;
}
#else
TextAddonsWidgets::SaveFileUtils::saveFile(mInfo.parentWidget, path, saveFileString());
+ const QString file = path;
#endif
- Q_EMIT mRocketChatAccount->openSavedFileFolderDone({QUrl::fromLocalFile(path)}, RocketChatAccount::FileType::File);
+ Q_EMIT mRocketChatAccount->openSavedFileFolderDone({QUrl::fromLocalFile(file)}, RocketChatAccount::FileType::File);
break;
+ }
case MessageAttachmentDownloadAndSaveJob::ActionType::DownloadOnly:
Q_EMIT attachmentFileDownloadDone(path);
break;