From 2538a6a3e60db49933e0d9d8a95b56c78397441c Mon Sep 17 00:00:00 2001 From: Nicolas Fella Date: Mon, 11 Mar 2019 18:15:47 +0100 Subject: [PATCH] QtGui is not needed in interfaces --- interfaces/CMakeLists.txt | 1 - interfaces/devicesmodel.cpp | 5 ----- interfaces/devicesmodel.h | 1 - interfaces/notificationsmodel.cpp | 4 ---- interfaces/notificationsmodel.h | 1 - 5 files changed, 12 deletions(-) diff --git a/interfaces/CMakeLists.txt b/interfaces/CMakeLists.txt index 16cd51daa..31187e448 100644 --- a/interfaces/CMakeLists.txt +++ b/interfaces/CMakeLists.txt @@ -66,7 +66,6 @@ generate_export_header(kdeconnectinterfaces EXPORT_FILE_NAME ${CMAKE_CURRENT_BIN target_link_libraries(kdeconnectinterfaces LINK_PUBLIC - Qt5::Gui Qt5::DBus LINK_PRIVATE KF5::ConfigCore diff --git a/interfaces/devicesmodel.cpp b/interfaces/devicesmodel.cpp index baafd3feb..d09de8642 100644 --- a/interfaces/devicesmodel.cpp +++ b/interfaces/devicesmodel.cpp @@ -26,7 +26,6 @@ #include #include #include -#include #include #include "dbusinterfaces.h" @@ -253,10 +252,6 @@ QVariant DevicesModel::data(const QModelIndex& index, int role) const switch (role) { case Qt::SizeHintRole: return QSize(0, 32); - case IconModelRole: { - QString icon = data(index, IconNameRole).toString(); - return QIcon::fromTheme(icon); - } case IdModelRole: return device->id(); case NameModelRole: diff --git a/interfaces/devicesmodel.h b/interfaces/devicesmodel.h index 00b98c4b0..bd53fae4e 100644 --- a/interfaces/devicesmodel.h +++ b/interfaces/devicesmodel.h @@ -22,7 +22,6 @@ #define DEVICESMODEL_H #include -#include #include #include "interfaces/kdeconnectinterfaces_export.h" diff --git a/interfaces/notificationsmodel.cpp b/interfaces/notificationsmodel.cpp index 8857bf3f8..a3e5b4b03 100644 --- a/interfaces/notificationsmodel.cpp +++ b/interfaces/notificationsmodel.cpp @@ -24,8 +24,6 @@ #include #include -#include - //#include "modeltest.h" //In older Qt released, qAsConst isnt available @@ -184,8 +182,6 @@ 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 QIcon::fromTheme(QStringLiteral("device-notifier")); case IdModelRole: return notification->internalId(); case NameModelRole: diff --git a/interfaces/notificationsmodel.h b/interfaces/notificationsmodel.h index 9da5830c2..ca55cee47 100644 --- a/interfaces/notificationsmodel.h +++ b/interfaces/notificationsmodel.h @@ -23,7 +23,6 @@ #include #include -#include #include #include "interfaces/dbusinterfaces.h"