// Set the notification text.
fileDownloadNotificationPointer->setText(i18nc("Downloading notification text", "Downloading %1", saveFileName));
+ // Get the download icon from the theme.
+ QIcon downloadIcon = QIcon::fromTheme(QLatin1String("download"), QIcon::fromTheme(QLatin1String("document-save")));
+
// Set the notification icon.
- fileDownloadNotificationPointer->setIconName(QLatin1String("download"));
+ fileDownloadNotificationPointer->setIconName(downloadIcon.name());
// Set the action list cancel button.
fileDownloadNotificationPointer->setActions(QStringList({i18nc("Download notification action","Cancel")}));
- // Set the notification to display indefinitely.
- fileDownloadNotificationPointer->setFlags(KNotification::Persistent);
-
// Prevent the notification from being autodeleted if it is closed. Otherwise, the updates to the notification below cause a crash.
fileDownloadNotificationPointer->setAutoDelete(false);