diff options
| author | Linus Jahn <lnj@kaidan.im> | 2022-10-02 02:58:35 +0200 |
|---|---|---|
| committer | Linus Jahn <lnj@kaidan.im> | 2022-10-02 23:01:13 +0200 |
| commit | d11198502e3bbc7838443147a6dc729f5d1b597d (patch) | |
| tree | d734e722d75b37691ca3c756a1d7c741cfbc7f9a /src/client/QXmppFileSharingManager.cpp | |
| parent | b871f6d3557c20fc7d1456e5080c33ea90795c84 (diff) | |
FileTransfer: Require some functions to be const
Diffstat (limited to 'src/client/QXmppFileSharingManager.cpp')
| -rw-r--r-- | src/client/QXmppFileSharingManager.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/client/QXmppFileSharingManager.cpp b/src/client/QXmppFileSharingManager.cpp index 370b3094..30c0ac1e 100644 --- a/src/client/QXmppFileSharingManager.cpp +++ b/src/client/QXmppFileSharingManager.cpp @@ -52,7 +52,7 @@ class UploadImpl : public QXmppUpload { Q_OBJECT public: - float progress() override { return calculateProgress(m_bytesSent, m_bytesTotal); } + float progress() const override { return calculateProgress(m_bytesSent, m_bytesTotal); } void cancel() override { if (m_providerUpload) { @@ -61,9 +61,9 @@ public: m_metadataFuture.cancel(); m_hashesFuture.cancel(); } - bool isFinished() override { return m_finished; } - quint64 bytesTransferred() override { return m_bytesSent; } - quint64 bytesTotal() override { return m_bytesTotal; } + bool isFinished() const override { return m_finished; } + quint64 bytesTransferred() const override { return m_bytesSent; } + quint64 bytesTotal() const override { return m_bytesTotal; } void reportFinished(Result result) { @@ -86,16 +86,16 @@ public: class DownloadImpl : public QXmppDownload { - float progress() override { return calculateProgress(m_bytesReceived, m_bytesTotal); } + float progress() const override { return calculateProgress(m_bytesReceived, m_bytesTotal); } void cancel() override { if (m_providerDownload) { m_providerDownload->cancel(); } } - bool isFinished() override { return m_finished; } - quint64 bytesTransferred() override { return m_bytesReceived; } - quint64 bytesTotal() override { return m_bytesTotal; } + bool isFinished() const override { return m_finished; } + quint64 bytesTransferred() const override { return m_bytesReceived; } + quint64 bytesTotal() const override { return m_bytesTotal; } public: void reportProgress(quint64 bytesReceived, quint64 bytesTotal) |
