From e06057c4699fd439529aa91f3b36e40df7a8c05b Mon Sep 17 00:00:00 2001 From: Linus Jahn Date: Sun, 2 Oct 2022 21:07:49 +0200 Subject: FileUpload/Download: Use result() getter instead of signal parameter The signal parameter does not work with immediately finishing uploads/downloads (i.e. when an error happened while starting). The user can't handle the result in that case. --- src/client/QXmppFileSharingManager.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/client/QXmppFileSharingManager.h') diff --git a/src/client/QXmppFileSharingManager.h b/src/client/QXmppFileSharingManager.h index 6224cf40..589a6c38 100644 --- a/src/client/QXmppFileSharingManager.h +++ b/src/client/QXmppFileSharingManager.h @@ -51,13 +51,14 @@ public: bool isFinished() const; quint64 bytesTransferred() const; quint64 bytesTotal() const; + Result result() const; - Q_SIGNAL void finished(QXmppFileUpload::Result); + Q_SIGNAL void finished(); private: QXmppFileUpload(); - void reportFinished(Result); + void reportFinished(); std::unique_ptr d; friend class QXmppFileSharingManager; @@ -100,8 +101,9 @@ public: bool isFinished() const; quint64 bytesTransferred() const; quint64 bytesTotal() const; + Result result() const; - Q_SIGNAL void finished(QXmppFileDownload::Result); + Q_SIGNAL void finished(); private: QXmppFileDownload(); -- cgit v1.2.3