From a787b692f6bc0cbb841903addfb6d9f92800b44b Mon Sep 17 00:00:00 2001 From: Nicolas Fella Date: Mon, 13 May 2019 12:49:58 +0200 Subject: [PATCH] [FileTransferJob] Set file amount Summary: This tells the new notification system that we're copying a file and lets it show a better summary. Test Plan: {F6821356} Is the composite job stuff already merged? That probably needs adjusting too Reviewers: #plasma, nicolasfella Reviewed By: nicolasfella Subscribers: kdeconnect Tags: #kde_connect Differential Revision: https://phabricator.kde.org/D21182 --- core/filetransferjob.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/filetransferjob.cpp b/core/filetransferjob.cpp index 525c89860..76baeb1a8 100644 --- a/core/filetransferjob.cpp +++ b/core/filetransferjob.cpp @@ -82,6 +82,7 @@ void FileTransferJob::startTransfer() return; setProcessedAmount(Bytes, 0); + setTotalAmount(Files, 1); Q_EMIT description(this, i18n("Receiving file over KDE Connect"), { i18nc("File transfer origin", "From"), m_from }, { i18nc("File transfer destination", "To"), m_destination.toLocalFile() }); @@ -125,7 +126,7 @@ void FileTransferJob::transferFinished() //TODO: MD5-check the file if (m_size == m_written) { qCDebug(KDECONNECT_CORE) << "Finished transfer" << m_destination; - + setProcessedAmount(Files, 1); emitResult(); } else { qCDebug(KDECONNECT_CORE) << "Received incomplete file ("<< m_written << "/" << m_size << "bytes ), deleting";