From 02fd748f4108b0c91f2b7ec5d544159c72ad43e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=80lex=20Fiestas?= Date: Mon, 22 Sep 2014 00:16:39 +0200 Subject: [PATCH] Interfaces no longer depend on kdelibs4support Also since fileitemactionplugin was using them (and inhering kdelibs4support) not we have tu explicitly link against it in there. --- fileitemactionplugin/CMakeLists.txt | 2 +- interfaces/CMakeLists.txt | 3 ++- interfaces/devicesmodel.cpp | 10 ++++++---- interfaces/notificationsmodel.cpp | 9 ++++----- 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/fileitemactionplugin/CMakeLists.txt b/fileitemactionplugin/CMakeLists.txt index bd543665b..53c84d34c 100644 --- a/fileitemactionplugin/CMakeLists.txt +++ b/fileitemactionplugin/CMakeLists.txt @@ -2,6 +2,6 @@ add_definitions(-DTRANSLATION_DOMAIN="kdeconnect-fileitemaction") include_directories(${CMAKE_SOURCE_DIR}) add_library(kdeconnectfiletiemaction MODULE sendfileitemaction.cpp) -target_link_libraries(kdeconnectfiletiemaction KF5::KIOWidgets kdeconnectinterfaces) +target_link_libraries(kdeconnectfiletiemaction KF5::KIOWidgets KF5::I18n KF5::KDELibs4Support kdeconnectinterfaces) install(TARGETS kdeconnectfiletiemaction DESTINATION ${PLUGIN_INSTALL_DIR}) install(FILES kdeconnectsendfile.desktop DESTINATION ${SERVICES_INSTALL_DIR}) diff --git a/interfaces/CMakeLists.txt b/interfaces/CMakeLists.txt index ec59957e0..bf2662f2e 100644 --- a/interfaces/CMakeLists.txt +++ b/interfaces/CMakeLists.txt @@ -71,7 +71,8 @@ add_dependencies(kdeconnectinterfaces target_link_libraries(kdeconnectinterfaces Qt5::Core Qt5::DBus - KF5::KDELibs4Support + Qt5::Gui + KF5::ConfigCore ) configure_file(KDEConnectConfig.cmake.in ${CMAKE_BINARY_DIR}/interfaces/KDEConnectConfig.cmake @ONLY) diff --git a/interfaces/devicesmodel.cpp b/interfaces/devicesmodel.cpp index 1d2b767f3..7f210a48b 100644 --- a/interfaces/devicesmodel.cpp +++ b/interfaces/devicesmodel.cpp @@ -19,18 +19,20 @@ */ #include "devicesmodel.h" +#include "interfaces_debug.h" +#include #include #include #include #include -#include - #include "dbusinterfaces.h" // #include "modeltest.h" +Q_LOGGING_CATEGORY(KDECONNECT_INTERFACES, "kdeconnect.interfaces"); + DevicesModel::DevicesModel(QObject *parent) : QAbstractListModel(parent) , m_dbusInterface(new DaemonDbusInterface(this)) @@ -106,7 +108,7 @@ void DevicesModel::refreshDeviceList() } if (!m_dbusInterface->isValid()) { - kDebug(debugArea()) << "dbus interface not valid"; + qCDebug(KDECONNECT_INTERFACES) << "dbus interface not valid"; return; } @@ -116,7 +118,7 @@ void DevicesModel::refreshDeviceList() QDBusPendingReply pendingDeviceIds = m_dbusInterface->devices(onlyReachable, onlyPaired); pendingDeviceIds.waitForFinished(); if (pendingDeviceIds.isError()) { - kDebug(debugArea()) << pendingDeviceIds.error(); + qCDebug(KDECONNECT_INTERFACES) << pendingDeviceIds.error(); return; } diff --git a/interfaces/notificationsmodel.cpp b/interfaces/notificationsmodel.cpp index 48d982b41..0aad0b84e 100644 --- a/interfaces/notificationsmodel.cpp +++ b/interfaces/notificationsmodel.cpp @@ -19,18 +19,17 @@ */ #include "notificationsmodel.h" +#include "interfaces_debug.h" +#include #include #include #include #include -#include - //#include "modeltest.h" - NotificationsModel::NotificationsModel(QObject* parent) : QAbstractListModel(parent) , m_dbusInterface(0) @@ -112,14 +111,14 @@ void NotificationsModel::refreshNotificationList() } if (!m_dbusInterface->isValid()) { - kDebug(debugArea()) << "dbus interface not valid"; + qCDebug(KDECONNECT_INTERFACES) << "dbus interface not valid"; return; } QDBusPendingReply pendingNotificationIds = m_dbusInterface->activeNotifications(); pendingNotificationIds.waitForFinished(); if (pendingNotificationIds.isError()) { - kDebug(debugArea()) << pendingNotificationIds.error(); + qCDebug(KDECONNECT_INTERFACES) << pendingNotificationIds.error(); return; } const QStringList& notificationIds = pendingNotificationIds.value();