Commit b09312ad authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇

[DownloadJob] Set destUrl and total amount

Will eventually allow us to show a nice finished notification.

CCBUG: 404182
CCBUG: 402144

Differential Revision: https://phabricator.kde.org/D19589
parent 3f68b88c
......@@ -98,7 +98,11 @@ void DownloadJob::update(const QJsonObject &payload)
it = payload.constFind(QStringLiteral("filename"));
if (it != end) {
m_destination = QUrl::fromLocalFile(it->toString());
const QUrl destination = QUrl::fromLocalFile(it->toString());
setProperty("destUrl", destination.toString(QUrl::RemoveFilename | QUrl::StripTrailingSlash));
m_destination = destination;
descriptionDirty = true;
}
......@@ -112,6 +116,8 @@ void DownloadJob::update(const QJsonObject &payload)
setProcessedAmount(Bytes, it->toDouble());
}
setTotalAmount(Files, 1);
it = payload.constFind(QStringLiteral("paused"));
if (it != end) {
const bool paused = it->toBool();
......
Markdown is supported
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