From 2d228849394993bdd8db6760f30532f975730433 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Blin?= <sebastien.blin@savoirfairelinux.com> Date: Fri, 22 Oct 2021 17:02:18 -0400 Subject: [PATCH] messagesadapter: remove useless method openFile is unused Change-Id: I991ccf489f742f87dda4af206766956b95772fa5 --- src/messagesadapter.cpp | 9 --------- src/messagesadapter.h | 5 +++-- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/src/messagesadapter.cpp b/src/messagesadapter.cpp index 39d377e3c..479aff2e7 100644 --- a/src/messagesadapter.cpp +++ b/src/messagesadapter.cpp @@ -178,15 +178,6 @@ MessagesAdapter::deleteInteraction(const QString& interactionId) ->clearInteractionFromConversation(lrcInstance_->get_selectedConvUid(), interactionId); } -void -MessagesAdapter::openFile(const QString& arg) -{ - QUrl fileUrl("file:///" + arg); - if (!QDesktopServices::openUrl(fileUrl)) { - qDebug() << "Couldn't open file: " << fileUrl; - } -} - void MessagesAdapter::openUrl(const QString& url) { diff --git a/src/messagesadapter.h b/src/messagesadapter.h index 7049e0b5a..e6717ef4c 100644 --- a/src/messagesadapter.h +++ b/src/messagesadapter.h @@ -96,7 +96,6 @@ protected: Q_INVOKABLE void acceptFile(const QString& arg); Q_INVOKABLE void cancelFile(const QString& arg); Q_INVOKABLE void openUrl(const QString& url); - Q_INVOKABLE void openFile(const QString& arg); Q_INVOKABLE void openDirectory(const QString& arg); Q_INVOKABLE void retryInteraction(const QString& interactionId); Q_INVOKABLE void deleteInteraction(const QString& interactionId); @@ -106,7 +105,9 @@ protected: Q_INVOKABLE QVariantMap getMediaInfo(const QString& msg); Q_INVOKABLE bool isRemoteImage(const QString& msg); Q_INVOKABLE QString getFormattedTime(const quint64 timestamp); - Q_INVOKABLE void parseMessageUrls(const QString& messageId, const QString& msg, bool showPreview); + Q_INVOKABLE void parseMessageUrls(const QString& messageId, + const QString& msg, + bool showPreview); Q_INVOKABLE void onPaste(); Q_INVOKABLE QString getStatusString(int status); Q_INVOKABLE QVariantMap getTransferStats(const QString& messageId, int); -- GitLab