diff options
| author | Linus Jahn <lnj@kaidan.im> | 2022-10-02 21:07:49 +0200 |
|---|---|---|
| committer | Linus Jahn <lnj@kaidan.im> | 2022-10-02 23:01:13 +0200 |
| commit | e06057c4699fd439529aa91f3b36e40df7a8c05b (patch) | |
| tree | 7bf853479ae26ea07c8cf53f96546d98cf129b1d /src/client/QXmppFileSharingManager.h | |
| parent | 2fe061ae4a5485201ecc79b163a2a3771d8f5be4 (diff) | |
| download | qxmpp-e06057c4699fd439529aa91f3b36e40df7a8c05b.tar.gz | |
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.
Diffstat (limited to 'src/client/QXmppFileSharingManager.h')
| -rw-r--r-- | src/client/QXmppFileSharingManager.h | 8 |
1 files changed, 5 insertions, 3 deletions
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<QXmppFileUploadPrivate> 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(); |
