Commit 5ba3ad8b authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇
Browse files

[Notifications] Only get descriptionUrl() when actually used

Only for a single file, or in the rare fallback case
parent 3a1e2393
......@@ -159,7 +159,6 @@ QString JobPrivate::text() const
return m_infoMessage;
}
const QString currentFileName = descriptionUrl().fileName();
const QString destUrlString = prettyDestUrl();
if (m_totalFiles == 0) {
......@@ -172,6 +171,7 @@ QString JobPrivate::text() const
return i18ncp("Copying n files", "%1 file", "%1 files", m_processedFiles);
}
} else if (m_totalFiles == 1) {
const QString currentFileName = descriptionUrl().fileName();
if (!destUrlString.isEmpty()) {
if (!currentFileName.isEmpty()) {
return i18nc("Copying file to location", "%1 to %2", currentFileName, destUrlString);
......@@ -203,7 +203,7 @@ QString JobPrivate::text() const
}
qCInfo(NOTIFICATIONMANAGER) << "Failed to generate job text for job with following properties:";
qCInfo(NOTIFICATIONMANAGER) << " processedFiles =" << m_processedFiles << ", totalFiles =" << m_totalFiles << ", current file name =" << currentFileName
qCInfo(NOTIFICATIONMANAGER) << " processedFiles =" << m_processedFiles << ", totalFiles =" << m_totalFiles << ", current file name =" << descriptionUrl().fileName()
<< ", destination url string =" << destUrlString;
qCInfo(NOTIFICATIONMANAGER) << "label1 =" << m_descriptionLabel1 << ", value1 =" << m_descriptionValue1 << ", label2 =" << m_descriptionLabel2
<< ", value2 =" << m_descriptionValue2;
......
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