From 236c6a2d04928291877ee992ccfa4fd9e51d5149 Mon Sep 17 00:00:00 2001 From: Carl Schwan Date: Wed, 16 Nov 2022 21:08:23 +0100 Subject: [PATCH] Fix opending dir UrlHelper doesn't return anything so it is useless to check the return value in a if condition Signed-off-by: Carl Schwan --- src/neochatroom.cpp | 2 +- src/qml/Component/Timeline/FileDelegate.qml | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/neochatroom.cpp b/src/neochatroom.cpp index 205985bed..5065b65e7 100644 --- a/src/neochatroom.cpp +++ b/src/neochatroom.cpp @@ -1251,6 +1251,6 @@ bool NeoChatRoom::downloadTempFile(const QString &eventId) return false; } - downloadFile(eventId, file.fileName()); + downloadFile(eventId, QUrl::fromLocalFile(file.fileName())); return true; } diff --git a/src/qml/Component/Timeline/FileDelegate.qml b/src/qml/Component/Timeline/FileDelegate.qml index 9d34df954..a6f0b1c86 100644 --- a/src/qml/Component/Timeline/FileDelegate.qml +++ b/src/qml/Component/Timeline/FileDelegate.qml @@ -29,8 +29,7 @@ TimelineContainer { } function openSavedFile() { - if (UrlHelper.openUrl(progressInfo.localPath)) return; - if (UrlHelper.openUrl(progressInfo.localDir)) return; + UrlHelper.openUrl(progressInfo.localPath); } innerObject: RowLayout {