Commit 499d145e authored by Karthik Periagaram's avatar Karthik Periagaram Committed by Kai Uwe Broulik
Browse files

Label job notifications with destination file name

If a destination file name is present, it is a better label for a job
than the source file name. This is particularly true for web downloads
where the source file name may be a gibberish base64 string while the
destination file name would be selected by the user.

If there is no destination file name, we fall back to using the source
file name.

BUG: 396744

Differential Revision:
parent 172bb819
......@@ -38,6 +38,7 @@ Column {
readonly property string labelName0: getData(, "labelName0", '')
readonly property string labelName1: getData(, "labelName1", '')
readonly property string labelFileName0: getData(, "labelFileName0", '')
readonly property string labelFileName1: getData(, "labelFileName1", '')
readonly property string label0: getData(, "label0", '')
readonly property string label1: getData(, "label1", '')
readonly property bool isSuspended: getData(, "state", '') === "suspended"
......@@ -66,7 +67,7 @@ Column {
Layout.fillWidth: true
elide: Text.ElideMiddle
text: {
var label = labelFileName0;
var label = labelFileName1 || labelFileName0;
var lastSlashIdx = label.lastIndexOf("/");
return label.slice(lastSlashIdx + 1);
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