Commit 88a1a9fb authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇

Update description before processing job state or error

This ensures the description is correct when the job finishes
parent 832a1882
......@@ -146,6 +146,10 @@ void DownloadJob::update(const QJsonObject &payload)
emitSpeed(speed);
}
if (descriptionDirty) {
updateDescription();
}
const QString error = payload.value(QStringLiteral("error")).toString();
if (!error.isEmpty()) {
if (error == QLatin1String("USER_CANCELED")
......@@ -212,10 +216,6 @@ void DownloadJob::update(const QJsonObject &payload)
return;
}
}
if (descriptionDirty) {
updateDescription();
}
}
void DownloadJob::updateDescription()
......
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