diff --git a/core/device.cpp b/core/device.cpp index 103cca963..26c67474b 100644 --- a/core/device.cpp +++ b/core/device.cpp @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include #include @@ -359,7 +359,7 @@ void Device::privateReceivedPackage(const NetworkPackage& np) kDebug(debugArea()) << "Pair request"; KNotification* notification = new KNotification("pingReceived"); //KNotification::Persistent - notification->setPixmap(KIcon("dialog-information").pixmap(48, 48)); + notification->setPixmap(QIcon::fromTheme("dialog-information").pixmap(48, 48)); notification->setComponentName("kdeconnect"); notification->setTitle("KDE Connect"); notification->setText(i18n("Pairing request from %1", m_deviceName)); diff --git a/fileitemactionplugin/sendfileitemaction.cpp b/fileitemactionplugin/sendfileitemaction.cpp index 89c04f81c..bae8732a0 100644 --- a/fileitemactionplugin/sendfileitemaction.cpp +++ b/fileitemactionplugin/sendfileitemaction.cpp @@ -29,7 +29,7 @@ #include #include -#include +#include #include #include diff --git a/interfaces/devicesmodel.cpp b/interfaces/devicesmodel.cpp index bef9db4f3..1d2b767f3 100644 --- a/interfaces/devicesmodel.cpp +++ b/interfaces/devicesmodel.cpp @@ -24,7 +24,7 @@ #include #include -#include +#include #include @@ -151,7 +151,7 @@ QVariant DevicesModel::data(const QModelIndex& index, int role) const bool paired = device->isPaired(); bool reachable = device->isReachable(); QString icon = reachable? (paired? "user-online" : "user-busy") : "user-offline"; - return KIcon(icon).pixmap(32, 32); + return QIcon::fromTheme(icon).pixmap(32, 32); } case IdModelRole: return QString(device->id()); diff --git a/interfaces/notificationsmodel.cpp b/interfaces/notificationsmodel.cpp index 088165b01..48d982b41 100644 --- a/interfaces/notificationsmodel.cpp +++ b/interfaces/notificationsmodel.cpp @@ -24,7 +24,7 @@ #include #include -#include +#include #include @@ -157,7 +157,7 @@ QVariant NotificationsModel::data(const QModelIndex& index, int role) const //FIXME: This function gets called lots of times, producing lots of dbus calls. Add a cache. switch (role) { case IconModelRole: - return KIcon("device-notifier").pixmap(32, 32); + return QIcon::fromTheme("device-notifier").pixmap(32, 32); case IdModelRole: return notification->internalId(); case NameModelRole: diff --git a/plugins/battery/batteryplugin.cpp b/plugins/battery/batteryplugin.cpp index 35148cc91..034d068e8 100644 --- a/plugins/battery/batteryplugin.cpp +++ b/plugins/battery/batteryplugin.cpp @@ -21,7 +21,7 @@ #include "batteryplugin.h" #include -#include +#include #include #include @@ -72,7 +72,7 @@ bool BatteryPlugin::receivePackage(const NetworkPackage& np) if ( thresholdEvent == ThresholdBatteryLow && !isCharging ) { KNotification* notification = new KNotification("batteryLow"); - notification->setPixmap(KIcon("battery-040").pixmap(48, 48)); + notification->setPixmap(QIcon::fromTheme("battery-040").pixmap(48, 48)); notification->setComponentName("kdeconnect"); notification->setTitle(i18nc("device name: low battery", "%1: low battery", device()->name())); notification->setText(i18n("Battery at %1%", currentCharge)); diff --git a/plugins/notifications/notificationsdbusinterface.cpp b/plugins/notifications/notificationsdbusinterface.cpp index 5d32f7cee..7c4b08aee 100644 --- a/plugins/notifications/notificationsdbusinterface.cpp +++ b/plugins/notifications/notificationsdbusinterface.cpp @@ -23,7 +23,7 @@ #include #include -#include +#include #include #include @@ -77,7 +77,7 @@ void NotificationsDbusInterface::processPackage(const NetworkPackage& np) //Do not show updates to existent notification nor answers to a initialization request if (!mInternalIdToPublicId.contains(noti->internalId()) && !np.get("requestAnswer", false)) { KNotification* notification = new KNotification("notification", KNotification::CloseOnTimeout, this); - notification->setPixmap(KIcon("preferences-desktop-notification").pixmap(48, 48)); + notification->setPixmap(QIcon::fromTheme("preferences-desktop-notification").pixmap(48, 48)); notification->setComponentName("kdeconnect"); notification->setTitle(mDevice->name()); notification->setText(noti->appName() + ": " + noti->ticker()); diff --git a/plugins/notifications/notificationsplugin.cpp b/plugins/notifications/notificationsplugin.cpp index c90b50467..277f54a5e 100644 --- a/plugins/notifications/notificationsplugin.cpp +++ b/plugins/notifications/notificationsplugin.cpp @@ -20,8 +20,6 @@ #include "notificationsplugin.h" -#include - #include #include "notificationsdbusinterface.h" diff --git a/plugins/ping/pingplugin.cpp b/plugins/ping/pingplugin.cpp index 7a2f496d8..ee97eec07 100644 --- a/plugins/ping/pingplugin.cpp +++ b/plugins/ping/pingplugin.cpp @@ -21,7 +21,7 @@ #include "pingplugin.h" #include -#include +#include #include #include @@ -45,7 +45,7 @@ PingPlugin::~PingPlugin() bool PingPlugin::receivePackage(const NetworkPackage& np) { KNotification* notification = new KNotification("pingReceived"); //KNotification::Persistent - notification->setPixmap(KIcon("dialog-ok").pixmap(48, 48)); + notification->setPixmap(QIcon::fromTheme("dialog-ok").pixmap(48, 48)); notification->setComponentName("kdeconnect"); notification->setTitle(device()->name()); notification->setText(np.get("message",i18n("Ping!"))); //This can be a source of spam diff --git a/plugins/share/shareplugin.cpp b/plugins/share/shareplugin.cpp index ae4888aef..1768f0fce 100644 --- a/plugins/share/shareplugin.cpp +++ b/plugins/share/shareplugin.cpp @@ -21,7 +21,7 @@ #include "shareplugin.h" #include -#include +#include #include #include #include @@ -130,7 +130,7 @@ void SharePlugin::finished(KJob* job) FileTransferJob* transferJob = (FileTransferJob*)job; KNotification* notification = new KNotification("pingReceived"); //KNotification::Persistent - notification->setPixmap(KIcon(error? "edit-delete" : "dialog-ok").pixmap(48, 48)); + notification->setPixmap(QIcon::fromTheme(error? "edit-delete" : "dialog-ok").pixmap(48, 48)); notification->setComponentName("kdeconnect"); notification->setTitle(i18n("Transfer finished")); notification->setText(transferJob->destination().fileName()); diff --git a/plugins/telephony/telephonyplugin.cpp b/plugins/telephony/telephonyplugin.cpp index c2bda721b..8ffc4b353 100644 --- a/plugins/telephony/telephonyplugin.cpp +++ b/plugins/telephony/telephonyplugin.cpp @@ -21,7 +21,7 @@ #include "telephonyplugin.h" #include -#include +#include #include @@ -69,7 +69,7 @@ KNotification* TelephonyPlugin::createNotification(const NetworkPackage& np) kDebug(debugArea()) << "Creating notification with type:" << type; KNotification* notification = new KNotification(type, KNotification::CloseOnTimeout, this); //, KNotification::Persistent - notification->setPixmap(KIcon(icon).pixmap(48, 48)); + notification->setPixmap(QIcon::fromTheme(icon).pixmap(48, 48)); notification->setComponentName("kdeconnect"); notification->setTitle(title); notification->setText(content);