diff --git a/kded/notification.cpp b/kded/notification.cpp --- a/kded/notification.cpp +++ b/kded/notification.cpp @@ -30,7 +30,6 @@ #include #include -#include #include #include @@ -336,7 +335,7 @@ connect(notify, &KNotification::closed, this, &Notification::notificationClosed); notify->setProperty("uni", device->uni()); notify->setComponentName(QStringLiteral("networkmanagement")); - notify->setPixmap(QIcon::fromTheme(QStringLiteral("dialog-warning")).pixmap(KIconLoader::SizeHuge)); + notify->setIconName(QStringLiteral("dialog-warning")); notify->setTitle(identifier); notify->setText(text); notify->sendEvent(); diff --git a/libs/editor/connectioneditorbase.cpp b/libs/editor/connectioneditorbase.cpp --- a/libs/editor/connectioneditorbase.cpp +++ b/libs/editor/connectioneditorbase.cpp @@ -55,7 +55,6 @@ #include #include -#include #include #include #include @@ -465,7 +464,7 @@ notification->setComponentName("networkmanagement"); notification->setTitle(i18n("Failed to get secrets for %1", watcher->property("connection").toString())); notification->setText(reply.error().message()); - notification->setPixmap(QIcon::fromTheme("dialog-warning").pixmap(KIconLoader::SizeHuge)); + notification->setIconName(QStringLiteral("dialog-warning")); notification->sendEvent(); } diff --git a/libs/handler.cpp b/libs/handler.cpp --- a/libs/handler.cpp +++ b/libs/handler.cpp @@ -57,7 +57,6 @@ #include #include #include -#include #include #define AGENT_SERVICE "org.kde.kded5" @@ -126,7 +125,7 @@ notification->setComponentName("networkmanagement"); notification->setTitle(con->name()); notification->setText(i18n("Missing VPN plugin")); - notification->setPixmap(QIcon::fromTheme("dialog-warning").pixmap(KIconLoader::SizeHuge)); + notification->setIconName(QStringLiteral("dialog-warning")); notification->sendEvent(); return; } @@ -641,7 +640,7 @@ if (notification) { notification->setComponentName("networkmanagement"); notification->setText(error); - notification->setPixmap(QIcon::fromTheme("dialog-warning").pixmap(KIconLoader::SizeHuge)); + notification->setIconName(QStringLiteral("dialog-warning")); notification->sendEvent(); } } else { @@ -671,7 +670,7 @@ if (notification) { notification->setComponentName("networkmanagement"); notification->setTitle(watcher->property("connection").toString()); - notification->setPixmap(QIcon::fromTheme("dialog-information").pixmap(KIconLoader::SizeHuge)); + notification->setIconName(QStringLiteral("dialog-information")); notification->sendEvent(); } }