[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
This commit is contained in:
parent
995a3e2425
commit
a787b692f6
1 changed files with 2 additions and 1 deletions
|
@ -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";
|
||||
|
|
Loading…
Reference in a new issue