Commit 4f99bc3c authored by Nicolas Fella's avatar Nicolas Fella
Browse files

Set amount in files for receiving file

This enables the nice finished notification with actions
parent 89fc0bc9
......@@ -156,6 +156,8 @@ void ReceiveFileJob::slotAccept()
m_targetPath = FileReceiverSettings::self()->saveUrl().adjusted(QUrl::StripTrailingSlash);
m_targetPath.setPath(m_targetPath.path() + QLatin1Char('/') + m_transfer->name());
setTotalAmount(Files, 1);
Q_EMIT description(this, i18n("Receiving file over Bluetooth"),
QPair<QString, QString>(i18nc("File transfer origin", "From"), m_deviceName),
QPair<QString, QString>(i18nc("File transfer destination", "To"), m_targetPath.toDisplayString()));
......@@ -188,6 +190,8 @@ void ReceiveFileJob::moveFinished(KJob *job)
setProcessedAmount(Files, 1);
// Delay emitResult to make sure notification is displayed even
// for very small files that are received instantly
QTimer::singleShot(500, this, [this]() {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment