Use ecm_qt_declare_logging_category to declare the logging categories

This automatizes the generation of logging categories so a
kdeconnect-kde.categories is generated and installed to
/usr/share/qlogging-categories5/ so kdebugsettings can use it.

Also, sets the default logging level to Warning. So now the logs
of users won't be filled with debug messages but they can
modify the configuration easily with kdebugsettings.
This commit is contained in:
Antonio Larrosa 2020-05-26 18:55:47 +02:00
parent 8bf49850f1
commit 1d36164230
99 changed files with 328 additions and 318 deletions

View file

@ -20,6 +20,7 @@ include(KDECMakeSettings)
include(ECMAddTests) include(ECMAddTests)
include(ECMSetupVersion) include(ECMSetupVersion)
include(ECMInstallIcons) include(ECMInstallIcons)
include(ECMQtDeclareLoggingCategory)
include(FeatureSummary) include(FeatureSummary)
include(GenerateExportHeader) include(GenerateExportHeader)
if (NOT SAILFISHOS) if (NOT SAILFISHOS)
@ -124,4 +125,6 @@ if(BUILD_TESTING)
add_subdirectory(tests) add_subdirectory(tests)
endif() endif()
ecm_qt_install_logging_categories(EXPORT kdeconnect-kde FILE kdeconnect-kde.categories SORT DESTINATION "${KDE_INSTALL_LOGGINGCATEGORIESDIR}")
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES) feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)

View file

@ -1,5 +1,13 @@
add_definitions(-DTRANSLATION_DOMAIN=\"kdeconnect-core\") add_definitions(-DTRANSLATION_DOMAIN=\"kdeconnect-core\")
set(debug_file_SRCS)
ecm_qt_declare_logging_category(
debug_file_SRCS HEADER kdeconnect_debug.h
IDENTIFIER KDECONNECT_CORE CATEGORY_NAME kdeconnect.core
DEFAULT_SEVERITY Warning
EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (core)")
set(KDECONNECT_PRIVATE_DBUS_ADDR unix:tmpdir=/tmp) set(KDECONNECT_PRIVATE_DBUS_ADDR unix:tmpdir=/tmp)
if(WIN32) if(WIN32)
set(KDECONNECT_PRIVATE_DBUS_ADDR tcp:host=localhost,port=0) set(KDECONNECT_PRIVATE_DBUS_ADDR tcp:host=localhost,port=0)
@ -39,6 +47,7 @@ set(kdeconnectcore_SRCS
device.cpp device.cpp
core_debug.cpp core_debug.cpp
notificationserverinfo.cpp notificationserverinfo.cpp
${debug_file_SRCS}
) )
add_library(kdeconnectcore ${kdeconnectcore_SRCS}) add_library(kdeconnectcore ${kdeconnectcore_SRCS})

View file

@ -20,8 +20,6 @@
#include "core_debug.h" #include "core_debug.h"
Q_LOGGING_CATEGORY(KDECONNECT_CORE, "kdeconnect.core")
#if defined(__GNU_LIBRARY__) #if defined(__GNU_LIBRARY__)
#include <execinfo.h> #include <execinfo.h>
#include <stdlib.h> #include <stdlib.h>

View file

@ -21,11 +21,8 @@
#ifndef CORE_DEBUG_H #ifndef CORE_DEBUG_H
#define CORE_DEBUG_H #define CORE_DEBUG_H
#include <QLoggingCategory>
#include "kdeconnectcore_export.h" #include "kdeconnectcore_export.h"
#include "kdeconnect_debug.h"
KDECONNECTCORE_EXPORT Q_DECLARE_LOGGING_CATEGORY(KDECONNECT_CORE)
void logBacktrace(); void logBacktrace();

View file

@ -1,6 +1,13 @@
add_definitions(-DTRANSLATION_DOMAIN="kdeconnect-kded") add_definitions(-DTRANSLATION_DOMAIN="kdeconnect-kded")
add_executable(kdeconnectd kdeconnectd.cpp) set(debug_file_SRCS)
ecm_qt_declare_logging_category(
debug_file_SRCS HEADER kdeconnectd_debug.h
IDENTIFIER KDECONNECT_DAEMON CATEGORY_NAME kdeconnect.daemon
DEFAULT_SEVERITY Warning
EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (daemon)")
add_executable(kdeconnectd kdeconnectd.cpp ${debug_file_SRCS})
target_include_directories(kdeconnectd PUBLIC ${CMAKE_BINARY_DIR}) target_include_directories(kdeconnectd PUBLIC ${CMAKE_BINARY_DIR})
target_link_libraries(kdeconnectd kdeconnectcore KF5::KIOWidgets KF5::DBusAddons KF5::Notifications KF5::I18n Qt5::Widgets) target_link_libraries(kdeconnectd kdeconnectcore KF5::KIOWidgets KF5::DBusAddons KF5::Notifications KF5::I18n Qt5::Widgets)

View file

@ -21,7 +21,6 @@
#include <QApplication> #include <QApplication>
#include <QNetworkAccessManager> #include <QNetworkAccessManager>
#include <QTimer> #include <QTimer>
#include <QLoggingCategory>
#include <QCommandLineOption> #include <QCommandLineOption>
#include <QCommandLineParser> #include <QCommandLineParser>
#include <QDBusMessage> #include <QDBusMessage>
@ -42,9 +41,7 @@
#include "core/device.h" #include "core/device.h"
#include "core/backends/pairinghandler.h" #include "core/backends/pairinghandler.h"
#include "kdeconnect-version.h" #include "kdeconnect-version.h"
#include "kdeconnectd_debug.h"
Q_DECLARE_LOGGING_CATEGORY(KDECONNECT_DAEMON)
Q_LOGGING_CATEGORY(KDECONNECT_DAEMON, "kdeconnect.daemon")
class DesktopDaemon : public Daemon class DesktopDaemon : public Daemon
{ {

View file

@ -1,6 +1,13 @@
add_definitions(-DTRANSLATION_DOMAIN="kdeconnect-fileitemaction") add_definitions(-DTRANSLATION_DOMAIN="kdeconnect-fileitemaction")
add_library(kdeconnectfileitemaction MODULE sendfileitemaction.cpp) set(debug_file_SRCS)
ecm_qt_declare_logging_category(
debug_file_SRCS HEADER kdeconnect_fileitemaction_debug.h
IDENTIFIER KDECONNECT_FILEITEMACTION CATEGORY_NAME kdeconnect.fileitemaction
DEFAULT_SEVERITY Warning
EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (fileitemaction)")
add_library(kdeconnectfileitemaction MODULE sendfileitemaction.cpp ${debug_file_SRCS})
target_link_libraries( target_link_libraries(
kdeconnectfileitemaction kdeconnectfileitemaction
KF5::KIOWidgets KF5::KIOWidgets

View file

@ -37,9 +37,9 @@
#include <dbushelper.h> #include <dbushelper.h>
K_PLUGIN_CLASS_WITH_JSON(SendFileItemAction, "kdeconnectsendfile.json") #include "kdeconnect_fileitemaction_debug.h"
Q_LOGGING_CATEGORY(KDECONNECT_FILEITEMACTION, "kdeconnect.fileitemaction") K_PLUGIN_CLASS_WITH_JSON(SendFileItemAction, "kdeconnectsendfile.json")
SendFileItemAction::SendFileItemAction(QObject* parent, const QVariantList& ): KAbstractFileItemActionPlugin(parent) SendFileItemAction::SendFileItemAction(QObject* parent, const QVariantList& ): KAbstractFileItemActionPlugin(parent)
{ {

View file

@ -23,13 +23,11 @@
#include <KFileItemListProperties> #include <KFileItemListProperties>
#include <KAbstractFileItemActionPlugin> #include <KAbstractFileItemActionPlugin>
#include <QLoggingCategory>
class QAction; class QAction;
class KFileItemListProperties; class KFileItemListProperties;
class QWidget; class QWidget;
Q_DECLARE_LOGGING_CATEGORY(KDECONNECT_FILEITEMACTION)
class SendFileItemAction : public KAbstractFileItemActionPlugin class SendFileItemAction : public KAbstractFileItemActionPlugin
{ {
Q_OBJECT Q_OBJECT

View file

@ -10,6 +10,19 @@ function(geninterface source_h output_h)
set(libkdeconnect_SRC ${libkdeconnect_SRC} PARENT_SCOPE) set(libkdeconnect_SRC ${libkdeconnect_SRC} PARENT_SCOPE)
endfunction() endfunction()
set(debug_files_SRCS)
ecm_qt_declare_logging_category(
debug_files_SRCS HEADER interfaces_conversation_message_debug.h
IDENTIFIER CONVERSATION_MESSAGE_LOGGING_CATEGORY CATEGORY_NAME kdeconnect.interfaces.conversationmessage
DEFAULT_SEVERITY Warning
EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (conversation message)")
ecm_qt_declare_logging_category(
debug_files_SRCS HEADER interfaces_debug.h
IDENTIFIER KDECONNECT_INTERFACES CATEGORY_NAME kdeconnect.interfaces
DEFAULT_SEVERITY Warning
EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (interfaces)")
set(libkdeconnect_SRC set(libkdeconnect_SRC
dbusinterfaces.cpp dbusinterfaces.cpp
devicesmodel.cpp devicesmodel.cpp
@ -20,6 +33,7 @@ set(libkdeconnect_SRC
remotesinksmodel.cpp remotesinksmodel.cpp
devicespluginfilterproxymodel.cpp devicespluginfilterproxymodel.cpp
# modeltest.cpp # modeltest.cpp
${debug_files_SRCS}
) )
geninterface(${PROJECT_SOURCE_DIR}/core/daemon.h daemoninterface) geninterface(${PROJECT_SOURCE_DIR}/core/daemon.h daemoninterface)

View file

@ -20,10 +20,9 @@
#include "conversationmessage.h" #include "conversationmessage.h"
#include <QLoggingCategory>
#include <QVariantMap> #include <QVariantMap>
Q_LOGGING_CATEGORY(CONVERSATION_MESSAGE_LOGGING_CATEGORY, "kdeconnect.interfaces.conversationmessage") #include "interfaces_conversation_message_debug.h"
ConversationMessage::ConversationMessage(const QVariantMap& args) ConversationMessage::ConversationMessage(const QVariantMap& args)
: m_eventField(args[QStringLiteral("event")].toInt()), : m_eventField(args[QStringLiteral("event")].toInt()),

View file

@ -22,12 +22,9 @@
#define PLUGINS_TELEPHONY_CONVERSATIONMESSAGE_H_ #define PLUGINS_TELEPHONY_CONVERSATIONMESSAGE_H_
#include <QDBusMetaType> #include <QDBusMetaType>
#include <QLoggingCategory>
#include "kdeconnectinterfaces_export.h" #include "kdeconnectinterfaces_export.h"
Q_DECLARE_LOGGING_CATEGORY(CONVERSATION_MESSAGE_LOGGING_CATEGORY)
class ConversationAddress; class ConversationAddress;
class KDECONNECTINTERFACES_EXPORT ConversationMessage class KDECONNECTINTERFACES_EXPORT ConversationMessage

View file

@ -32,7 +32,7 @@
#include <dbushelper.h> #include <dbushelper.h>
// #include "modeltest.h" // #include "modeltest.h"
Q_LOGGING_CATEGORY(KDECONNECT_INTERFACES, "kdeconnect.interfaces"); #include "interfaces_debug.h"
static QString createId() { return QCoreApplication::instance()->applicationName()+QString::number(QCoreApplication::applicationPid()); } static QString createId() { return QCoreApplication::instance()->applicationName()+QString::number(QCoreApplication::applicationPid()); }

View file

@ -1,28 +0,0 @@
/**
* Copyright 2014 Alejandro Fiestas Olivares <afiestas@kde.org>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License or (at your option) version 3 or any later version
* accepted by the membership of KDE e.V. (or its successor approved
* by the membership of KDE e.V.), which shall act as a proxy
* defined in Section 14 of version 3 of the license.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef KDECONNECT_INTERFACES_DEBUG_H
#define KDECONNECT_INTERFACES_DEBUG_H
#include <QLoggingCategory>
Q_DECLARE_LOGGING_CATEGORY(KDECONNECT_INTERFACES)
#endif //KDECONNECT_INTERFACES_DEBUG_H

View file

@ -19,7 +19,6 @@
*/ */
#include "notificationsmodel.h" #include "notificationsmodel.h"
#include "interfaces_debug.h"
#include <QDebug> #include <QDebug>
#include <QIcon> #include <QIcon>
@ -30,6 +29,7 @@
//In older Qt released, qAsConst isnt available //In older Qt released, qAsConst isnt available
#include "core/qtcompat_p.h" #include "core/qtcompat_p.h"
#include "interfaces_debug.h"
NotificationsModel::NotificationsModel(QObject* parent) NotificationsModel::NotificationsModel(QObject* parent)
: QAbstractListModel(parent) : QAbstractListModel(parent)

View file

@ -1,8 +1,16 @@
include_directories(${CMAKE_SOURCE_DIR}) include_directories(${CMAKE_SOURCE_DIR})
add_definitions(-DTRANSLATION_DOMAIN="kdeconnect-kio") add_definitions(-DTRANSLATION_DOMAIN="kdeconnect-kio")
set(debug_file_SRCS)
ecm_qt_declare_logging_category(
debug_file_SRCS HEADER kdeconnectkio_debug.h
IDENTIFIER KDECONNECT_KIO CATEGORY_NAME kdeconnect.kio
DEFAULT_SEVERITY Warning
EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (kio)")
set(kio_kdeconnect_PART_SRCS set(kio_kdeconnect_PART_SRCS
kiokdeconnect.cpp kiokdeconnect.cpp
${debug_file_SRCS}
) )
add_library(kio_kdeconnect MODULE ${kio_kdeconnect_PART_SRCS}) add_library(kio_kdeconnect MODULE ${kio_kdeconnect_PART_SRCS})

View file

@ -29,7 +29,7 @@
#include <QDebug> #include <QDebug>
#include <QtPlugin> #include <QtPlugin>
Q_LOGGING_CATEGORY(KDECONNECT_KIO, "kdeconnect.kio") #include "kdeconnectkio_debug.h"
class KIOPluginForMetaData : public QObject class KIOPluginForMetaData : public QObject
{ {

View file

@ -22,14 +22,11 @@
#define KIOKDECONNECT_H #define KIOKDECONNECT_H
#include <QObject> #include <QObject>
#include <QLoggingCategory>
#include <kio/slavebase.h> #include <kio/slavebase.h>
#include "interfaces/dbusinterfaces.h" #include "interfaces/dbusinterfaces.h"
Q_DECLARE_LOGGING_CATEGORY(KDECONNECT_KIO)
class KioKdeconnect : public QObject, public KIO::SlaveBase class KioKdeconnect : public QObject, public KIO::SlaveBase
{ {
Q_OBJECT Q_OBJECT

View file

@ -1,6 +1,14 @@
set(debug_file_SRCS)
ecm_qt_declare_logging_category(
debug_file_SRCS HEADER plugin_battery_debug.h
IDENTIFIER KDECONNECT_PLUGIN_BATTERY CATEGORY_NAME kdeconnect.plugin.battery
DEFAULT_SEVERITY Warning
EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (plugin battery)")
set(kdeconnect_battery_SRCS set(kdeconnect_battery_SRCS
batteryplugin.cpp batteryplugin.cpp
batterydbusinterface.cpp batterydbusinterface.cpp
${debug_file_SRCS}
) )
kdeconnect_add_plugin(kdeconnect_battery JSON kdeconnect_battery.json SOURCES ${kdeconnect_battery_SRCS}) kdeconnect_add_plugin(kdeconnect_battery JSON kdeconnect_battery.json SOURCES ${kdeconnect_battery_SRCS})

View file

@ -23,6 +23,7 @@
#include <QDebug> #include <QDebug>
#include <core/device.h> #include <core/device.h>
#include "plugin_battery_debug.h"
QMap<QString, BatteryDbusInterface *> BatteryDbusInterface::s_dbusInterfaces; QMap<QString, BatteryDbusInterface *> BatteryDbusInterface::s_dbusInterfaces;

View file

@ -30,11 +30,10 @@
#include <core/daemon.h> #include <core/daemon.h>
#include "batterydbusinterface.h" #include "batterydbusinterface.h"
#include "plugin_battery_debug.h"
K_PLUGIN_CLASS_WITH_JSON(BatteryPlugin, "kdeconnect_battery.json") K_PLUGIN_CLASS_WITH_JSON(BatteryPlugin, "kdeconnect_battery.json")
Q_LOGGING_CATEGORY(KDECONNECT_PLUGIN_BATTERY, "kdeconnect.plugin.battery")
BatteryPlugin::BatteryPlugin(QObject* parent, const QVariantList& args) BatteryPlugin::BatteryPlugin(QObject* parent, const QVariantList& args)
: KdeConnectPlugin(parent, args) : KdeConnectPlugin(parent, args)
, batteryDbusInterface(new BatteryDbusInterface(device())) , batteryDbusInterface(new BatteryDbusInterface(device()))

View file

@ -21,13 +21,11 @@
#ifndef BATTERYPLUGIN_H #ifndef BATTERYPLUGIN_H
#define BATTERYPLUGIN_H #define BATTERYPLUGIN_H
#include <QLoggingCategory>
#include <core/kdeconnectplugin.h> #include <core/kdeconnectplugin.h>
#define PACKET_TYPE_BATTERY QStringLiteral("kdeconnect.battery") #define PACKET_TYPE_BATTERY QStringLiteral("kdeconnect.battery")
#define PACKET_TYPE_BATTERY_REQUEST QStringLiteral("kdeconnect.battery.request") #define PACKET_TYPE_BATTERY_REQUEST QStringLiteral("kdeconnect.battery.request")
Q_DECLARE_LOGGING_CATEGORY(KDECONNECT_PLUGIN_BATTERY)
class BatteryDbusInterface; class BatteryDbusInterface;
class BatteryPlugin class BatteryPlugin

View file

@ -1,6 +1,14 @@
set(debug_file_SRCS)
ecm_qt_declare_logging_category(
debug_file_SRCS HEADER plugin_clipboard_debug.h
IDENTIFIER KDECONNECT_PLUGIN_CLIPBOARD CATEGORY_NAME kdeconnect.plugin.clipboard
DEFAULT_SEVERITY Warning
EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (plugin clipboard)")
set(kdeconnect_clipboard_SRCS set(kdeconnect_clipboard_SRCS
clipboardplugin.cpp clipboardplugin.cpp
clipboardlistener.cpp clipboardlistener.cpp
${debug_file_SRCS}
) )
kdeconnect_add_plugin(kdeconnect_clipboard JSON kdeconnect_clipboard.json SOURCES ${kdeconnect_clipboard_SRCS}) kdeconnect_add_plugin(kdeconnect_clipboard JSON kdeconnect_clipboard.json SOURCES ${kdeconnect_clipboard_SRCS})

View file

@ -21,13 +21,12 @@
#include "clipboardplugin.h" #include "clipboardplugin.h"
#include "clipboardlistener.h" #include "clipboardlistener.h"
#include "plugin_clipboard_debug.h"
#include <KPluginFactory> #include <KPluginFactory>
K_PLUGIN_CLASS_WITH_JSON(ClipboardPlugin, "kdeconnect_clipboard.json") K_PLUGIN_CLASS_WITH_JSON(ClipboardPlugin, "kdeconnect_clipboard.json")
Q_LOGGING_CATEGORY(KDECONNECT_PLUGIN_CLIPBOARD, "kdeconnect.plugin.clipboard")
ClipboardPlugin::ClipboardPlugin(QObject* parent, const QVariantList& args) ClipboardPlugin::ClipboardPlugin(QObject* parent, const QVariantList& args)
: KdeConnectPlugin(parent, args) : KdeConnectPlugin(parent, args)
{ {

View file

@ -23,11 +23,8 @@
#include <QObject> #include <QObject>
#include <QClipboard> #include <QClipboard>
#include <QLoggingCategory>
#include <core/kdeconnectplugin.h> #include <core/kdeconnectplugin.h>
Q_DECLARE_LOGGING_CATEGORY(KDECONNECT_PLUGIN_CLIPBOARD)
/** /**
* Packet containing just clipboard contents, sent when a device updates its clipboard. * Packet containing just clipboard contents, sent when a device updates its clipboard.
* <p> * <p>

View file

@ -1,5 +1,13 @@
set(debug_file_SRCS)
ecm_qt_declare_logging_category(
debug_file_SRCS HEADER plugin_contacts_debug.h
IDENTIFIER KDECONNECT_PLUGIN_CONTACTS CATEGORY_NAME kdeconnect.plugin.contacts
DEFAULT_SEVERITY Warning
EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (plugin contacts)")
set(kdeconnect_contacts_SRCS set(kdeconnect_contacts_SRCS
contactsplugin.cpp contactsplugin.cpp
${debug_file_SRCS}
) )
kdeconnect_add_plugin(kdeconnect_contacts JSON kdeconnect_contacts.json SOURCES ${kdeconnect_contacts_SRCS}) kdeconnect_add_plugin(kdeconnect_contacts JSON kdeconnect_contacts.json SOURCES ${kdeconnect_contacts_SRCS})

View file

@ -24,16 +24,15 @@
#include <QDBusConnection> #include <QDBusConnection>
#include <QDBusMetaType> #include <QDBusMetaType>
#include <QLoggingCategory>
#include <QFile> #include <QFile>
#include <QDir> #include <QDir>
#include <QIODevice> #include <QIODevice>
#include <core/device.h> #include <core/device.h>
K_PLUGIN_CLASS_WITH_JSON(ContactsPlugin, "kdeconnect_contacts.json") #include "plugin_contacts_debug.h"
Q_LOGGING_CATEGORY(KDECONNECT_PLUGIN_CONTACTS, "kdeconnect.plugin.contacts") K_PLUGIN_CLASS_WITH_JSON(ContactsPlugin, "kdeconnect_contacts.json")
ContactsPlugin::ContactsPlugin(QObject* parent, const QVariantList& args) : ContactsPlugin::ContactsPlugin(QObject* parent, const QVariantList& args) :
KdeConnectPlugin(parent, args) KdeConnectPlugin(parent, args)

View file

@ -1,5 +1,13 @@
set(debug_file_SRCS)
ecm_qt_declare_logging_category(
debug_file_SRCS HEADER plugin_findthisdevice_debug.h
IDENTIFIER KDECONNECT_PLUGIN_FINDTHISDEVICE CATEGORY_NAME kdeconnect.plugin.findthisdevice
DEFAULT_SEVERITY Warning
EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (plugin findthisdevice)")
set(kdeconnect_findthisdevice_SRCS set(kdeconnect_findthisdevice_SRCS
findthisdeviceplugin.cpp findthisdeviceplugin.cpp
${debug_file_SRCS}
) )
kdeconnect_add_plugin(kdeconnect_findthisdevice kdeconnect_add_plugin(kdeconnect_findthisdevice
@ -22,7 +30,7 @@ endif()
set(kdeconnect_findthisdevice_config_SRCS findthisdevice_config.cpp) set(kdeconnect_findthisdevice_config_SRCS findthisdevice_config.cpp)
ki18n_wrap_ui(kdeconnect_findthisdevice_config_SRCS findthisdevice_config.ui) ki18n_wrap_ui(kdeconnect_findthisdevice_config_SRCS findthisdevice_config.ui)
add_library(kdeconnect_findthisdevice_config MODULE ${kdeconnect_findthisdevice_config_SRCS}) add_library(kdeconnect_findthisdevice_config MODULE ${kdeconnect_findthisdevice_config_SRCS} ${debug_file_SRCS})
target_link_libraries(kdeconnect_findthisdevice_config target_link_libraries(kdeconnect_findthisdevice_config
kdeconnectpluginkcm kdeconnectpluginkcm
Qt5::Multimedia Qt5::Multimedia

View file

@ -32,6 +32,7 @@
// Qt // Qt
#include <QDBusConnection> #include <QDBusConnection>
#include <QMediaPlayer> #include <QMediaPlayer>
#include "plugin_findthisdevice_debug.h"
K_PLUGIN_CLASS_WITH_JSON(FindThisDevicePlugin, "kdeconnect_findthisdevice.json") K_PLUGIN_CLASS_WITH_JSON(FindThisDevicePlugin, "kdeconnect_findthisdevice.json")

View file

@ -33,16 +33,10 @@
#include <QUrl> #include <QUrl>
#endif #endif
// Qt // Qt
#include <QLoggingCategory> #include "plugin_findthisdevice_debug.h"
#define PACKET_TYPE_FINDMYPHONE_REQUEST QStringLiteral("kdeconnect.findmyphone.request") #define PACKET_TYPE_FINDMYPHONE_REQUEST QStringLiteral("kdeconnect.findmyphone.request")
static const QLoggingCategory &KDECONNECT_PLUGIN_FINDTHISDEVICE()
{
static const QLoggingCategory category("kdeconnect.plugin.findthisdevice");
return category;
}
class FindThisDevicePlugin class FindThisDevicePlugin
: public KdeConnectPlugin : public KdeConnectPlugin
{ {

View file

@ -1,6 +1,13 @@
qt5_add_dbus_interface(lockdevice_SRCS org.freedesktop.ScreenSaver.xml screensaverdbusinterface) qt5_add_dbus_interface(lockdevice_SRCS org.freedesktop.ScreenSaver.xml screensaverdbusinterface)
kdeconnect_add_plugin(kdeconnect_lockdevice JSON kdeconnect_lockdevice.json SOURCES lockdeviceplugin.cpp ${lockdevice_SRCS}) set(debug_file_SRCS)
ecm_qt_declare_logging_category(
debug_file_SRCS HEADER plugin_lock_debug.h
IDENTIFIER KDECONNECT_PLUGIN_LOCKREMOTE CATEGORY_NAME kdeconnect.plugin.lock
DEFAULT_SEVERITY Warning
EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (plugin lockremote)")
kdeconnect_add_plugin(kdeconnect_lockdevice JSON kdeconnect_lockdevice.json SOURCES lockdeviceplugin.cpp ${lockdevice_SRCS} ${debug_file_SRCS})
target_link_libraries(kdeconnect_lockdevice target_link_libraries(kdeconnect_lockdevice
kdeconnectcore kdeconnectcore

View file

@ -24,16 +24,14 @@
#include <KPluginFactory> #include <KPluginFactory>
#include <QDebug> #include <QDebug>
#include <QLoggingCategory>
#include "screensaverdbusinterface.h" #include "screensaverdbusinterface.h"
#include "plugin_lock_debug.h"
#include <core/device.h> #include <core/device.h>
#include <dbushelper.h> #include <dbushelper.h>
K_PLUGIN_CLASS_WITH_JSON(LockDevicePlugin, "kdeconnect_lockdevice.json") K_PLUGIN_CLASS_WITH_JSON(LockDevicePlugin, "kdeconnect_lockdevice.json")
Q_LOGGING_CATEGORY(KDECONNECT_PLUGIN_LOCKREMOTE, "kdeconnect.plugin.lock")
LockDevicePlugin::LockDevicePlugin(QObject* parent, const QVariantList& args) LockDevicePlugin::LockDevicePlugin(QObject* parent, const QVariantList& args)
: KdeConnectPlugin(parent, args) : KdeConnectPlugin(parent, args)
, m_remoteLocked(false) , m_remoteLocked(false)

View file

@ -20,7 +20,14 @@ qt5_add_dbus_interface(kdeconnect_mpriscontrol_SRCS org.mpris.MediaPlayer2.xml m
endif() endif()
kdeconnect_add_plugin(kdeconnect_mpriscontrol JSON kdeconnect_mpriscontrol.json SOURCES ${kdeconnect_mpriscontrol_SRCS}) set(debug_file_SRCS)
ecm_qt_declare_logging_category(
debug_file_SRCS HEADER plugin_mpris_debug.h
IDENTIFIER KDECONNECT_PLUGIN_MPRIS CATEGORY_NAME kdeconnect.plugin.mpris
DEFAULT_SEVERITY Warning
EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (plugin mpris)")
kdeconnect_add_plugin(kdeconnect_mpriscontrol JSON kdeconnect_mpriscontrol.json SOURCES ${kdeconnect_mpriscontrol_SRCS} ${debug_file_SRCS})
if(WIN32) if(WIN32)
target_link_libraries(kdeconnect_mpriscontrol kdeconnectcore) target_link_libraries(kdeconnect_mpriscontrol kdeconnectcore)

View file

@ -20,6 +20,7 @@
#include "mpriscontrolplugin-win.h" #include "mpriscontrolplugin-win.h"
#include <core/device.h> #include <core/device.h>
#include "plugin_mpris_debug.h"
#include <KPluginFactory> #include <KPluginFactory>
@ -27,8 +28,6 @@
K_PLUGIN_CLASS_WITH_JSON(MprisControlPlugin, "kdeconnect_mpriscontrol.json") K_PLUGIN_CLASS_WITH_JSON(MprisControlPlugin, "kdeconnect_mpriscontrol.json")
Q_LOGGING_CATEGORY(KDECONNECT_PLUGIN_MPRIS, "kdeconnect.plugin.mpris")
MprisControlPlugin::MprisControlPlugin(QObject *parent, const QVariantList &args) : KdeConnectPlugin(parent, args) { } MprisControlPlugin::MprisControlPlugin(QObject *parent, const QVariantList &args) : KdeConnectPlugin(parent, args) { }
bool MprisControlPlugin::receivePacket(const NetworkPacket &np) bool MprisControlPlugin::receivePacket(const NetworkPacket &np)

View file

@ -24,14 +24,11 @@
#include <core/kdeconnectplugin.h> #include <core/kdeconnectplugin.h>
#include <QString> #include <QString>
#include <QLoggingCategory>
#define PLAYERNAME QStringLiteral("Media Player") #define PLAYERNAME QStringLiteral("Media Player")
#define PACKET_TYPE_MPRIS QStringLiteral("kdeconnect.mpris") #define PACKET_TYPE_MPRIS QStringLiteral("kdeconnect.mpris")
Q_DECLARE_LOGGING_CATEGORY(KDECONNECT_PLUGIN_MPRIS)
class MprisControlPlugin class MprisControlPlugin
: public KdeConnectPlugin : public KdeConnectPlugin
{ {

View file

@ -34,12 +34,10 @@
#include "dbusproperties.h" #include "dbusproperties.h"
#include "mprisplayer.h" #include "mprisplayer.h"
#include "mprisroot.h" #include "mprisroot.h"
#include "plugin_mpris_debug.h"
K_PLUGIN_CLASS_WITH_JSON(MprisControlPlugin, "kdeconnect_mpriscontrol.json") K_PLUGIN_CLASS_WITH_JSON(MprisControlPlugin, "kdeconnect_mpriscontrol.json")
Q_LOGGING_CATEGORY(KDECONNECT_PLUGIN_MPRIS, "kdeconnect.plugin.mpris")
MprisPlayer::MprisPlayer(const QString& serviceName, const QString& dbusObjectPath, const QDBusConnection& busConnection) MprisPlayer::MprisPlayer(const QString& serviceName, const QString& dbusObjectPath, const QDBusConnection& busConnection)
: m_serviceName(serviceName) : m_serviceName(serviceName)
, m_propertiesInterface(new OrgFreedesktopDBusPropertiesInterface(serviceName, dbusObjectPath, busConnection)) , m_propertiesInterface(new OrgFreedesktopDBusPropertiesInterface(serviceName, dbusObjectPath, busConnection))

View file

@ -23,13 +23,11 @@
#include <QString> #include <QString>
#include <QHash> #include <QHash>
#include <QLoggingCategory>
#include <QDBusServiceWatcher> #include <QDBusServiceWatcher>
#include <QSharedPointer> #include <QSharedPointer>
#include <core/kdeconnectplugin.h> #include <core/kdeconnectplugin.h>
class OrgFreedesktopDBusPropertiesInterface; class OrgFreedesktopDBusPropertiesInterface;
class OrgMprisMediaPlayer2PlayerInterface; class OrgMprisMediaPlayer2PlayerInterface;
@ -53,8 +51,6 @@ private:
#define PACKET_TYPE_MPRIS QStringLiteral("kdeconnect.mpris") #define PACKET_TYPE_MPRIS QStringLiteral("kdeconnect.mpris")
Q_DECLARE_LOGGING_CATEGORY(KDECONNECT_PLUGIN_MPRIS)
class MprisControlPlugin class MprisControlPlugin
: public KdeConnectPlugin : public KdeConnectPlugin
{ {

View file

@ -1,4 +1,11 @@
kdeconnect_add_plugin(kdeconnect_mprisremote JSON kdeconnect_mprisremote.json SOURCES mprisremoteplugin.cpp mprisremoteplayer.cpp mprisremoteplayermediaplayer2.cpp mprisremoteplayermediaplayer2player.cpp) set(debug_file_SRCS)
ecm_qt_declare_logging_category(
debug_file_SRCS HEADER plugin_mprisremote_debug.h
IDENTIFIER KDECONNECT_PLUGIN_MPRISREMOTE CATEGORY_NAME kdeconnect.plugin.mprisremote
DEFAULT_SEVERITY Warning
EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (plugin mprisremote)")
kdeconnect_add_plugin(kdeconnect_mprisremote JSON kdeconnect_mprisremote.json SOURCES mprisremoteplugin.cpp mprisremoteplayer.cpp mprisremoteplayermediaplayer2.cpp mprisremoteplayermediaplayer2player.cpp ${debug_file_SRCS})
target_link_libraries(kdeconnect_mprisremote target_link_libraries(kdeconnect_mprisremote
kdeconnectcore kdeconnectcore

View file

@ -23,13 +23,13 @@
#include <KPluginFactory> #include <KPluginFactory>
#include <QDebug> #include <QDebug>
#include <QLoggingCategory>
#include <core/device.h> #include <core/device.h>
#include "plugin_mprisremote_debug.h"
K_PLUGIN_CLASS_WITH_JSON(MprisRemotePlugin, "kdeconnect_mprisremote.json") K_PLUGIN_CLASS_WITH_JSON(MprisRemotePlugin, "kdeconnect_mprisremote.json")
Q_LOGGING_CATEGORY(KDECONNECT_PLUGIN_MPRISREMOTE, "kdeconnect.plugin.mprisremote")
MprisRemotePlugin::MprisRemotePlugin(QObject* parent, const QVariantList& args) MprisRemotePlugin::MprisRemotePlugin(QObject* parent, const QVariantList& args)
: KdeConnectPlugin(parent, args) : KdeConnectPlugin(parent, args)

View file

@ -1,8 +1,16 @@
set(debug_file_SRCS)
ecm_qt_declare_logging_category(
debug_file_SRCS HEADER plugin_notification_debug.h
IDENTIFIER KDECONNECT_PLUGIN_NOTIFICATION CATEGORY_NAME kdeconnect.plugin.notification
DEFAULT_SEVERITY Warning
EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (plugin notification)")
set(kdeconnect_notifications_SRCS set(kdeconnect_notifications_SRCS
notification.cpp notification.cpp
notificationsplugin.cpp notificationsplugin.cpp
notificationsdbusinterface.cpp notificationsdbusinterface.cpp
sendreplydialog.cpp sendreplydialog.cpp
${debug_file_SRCS}
) )
ki18n_wrap_ui(kdeconnect_notifications_SRCS sendreplydialog.ui) ki18n_wrap_ui(kdeconnect_notifications_SRCS sendreplydialog.ui)

View file

@ -19,7 +19,7 @@
*/ */
#include "notification.h" #include "notification.h"
#include "notification_debug.h" #include "plugin_notification_debug.h"
#include <KNotification> #include <KNotification>
#include <QtGlobal> #include <QtGlobal>

View file

@ -1,28 +0,0 @@
/**
* Copyright 2014 Alejandro Fiestas Olivares <afiestas@kde.org>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License or (at your option) version 3 or any later version
* accepted by the membership of KDE e.V. (or its successor approved
* by the membership of KDE e.V.), which shall act as a proxy
* defined in Section 14 of version 3 of the license.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef NOTIFICATION_DEBUG_H
#define NOTIFICATION_DEBUG_H
#include <QLoggingCategory>
Q_DECLARE_LOGGING_CATEGORY(KDECONNECT_PLUGIN_NOTIFICATION)
#endif //NOTIFICATION_DEBUG_H

View file

@ -19,7 +19,7 @@
*/ */
#include "notificationsdbusinterface.h" #include "notificationsdbusinterface.h"
#include "notification_debug.h" #include "plugin_notification_debug.h"
#include "notification.h" #include "notification.h"
#include <core/device.h> #include <core/device.h>

View file

@ -21,14 +21,12 @@
#include "notificationsplugin.h" #include "notificationsplugin.h"
#include "notificationsdbusinterface.h" #include "notificationsdbusinterface.h"
#include "notification_debug.h" #include "plugin_notification_debug.h"
#include <KPluginFactory> #include <KPluginFactory>
K_PLUGIN_CLASS_WITH_JSON(NotificationsPlugin, "kdeconnect_notifications.json") K_PLUGIN_CLASS_WITH_JSON(NotificationsPlugin, "kdeconnect_notifications.json")
Q_LOGGING_CATEGORY(KDECONNECT_PLUGIN_NOTIFICATION, "kdeconnect.plugin.notification")
NotificationsPlugin::NotificationsPlugin(QObject* parent, const QVariantList& args) NotificationsPlugin::NotificationsPlugin(QObject* parent, const QVariantList& args)
: KdeConnectPlugin(parent, args) : KdeConnectPlugin(parent, args)
{ {

View file

@ -8,9 +8,16 @@ else()
) )
endif() endif()
set(debug_file_SRCS)
ecm_qt_declare_logging_category(
debug_file_SRCS HEADER plugin_pausemusic_debug.h
IDENTIFIER KDECONNECT_PLUGIN_PAUSEMUSIC CATEGORY_NAME kdeconnect.plugin.pausemusic
DEFAULT_SEVERITY Warning
EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (plugin pausemusic)")
qt5_add_dbus_interface(kdeconnect_pausemusic_SRCS org.mpris.MediaPlayer2.Player.xml mprisplayer) qt5_add_dbus_interface(kdeconnect_pausemusic_SRCS org.mpris.MediaPlayer2.Player.xml mprisplayer)
kdeconnect_add_plugin(kdeconnect_pausemusic JSON kdeconnect_pausemusic.json SOURCES ${kdeconnect_pausemusic_SRCS}) kdeconnect_add_plugin(kdeconnect_pausemusic JSON kdeconnect_pausemusic.json SOURCES ${kdeconnect_pausemusic_SRCS} ${debug_file_SRCS})
target_link_libraries(kdeconnect_pausemusic target_link_libraries(kdeconnect_pausemusic
kdeconnectcore kdeconnectcore

View file

@ -22,11 +22,10 @@
#include "pausemusicplugin-win.h" #include "pausemusicplugin-win.h"
#include <KPluginFactory> #include <KPluginFactory>
#include "plugin_pausemusic_debug.h"
K_PLUGIN_CLASS_WITH_JSON(PauseMusicPlugin, "kdeconnect_pausemusic.json") K_PLUGIN_CLASS_WITH_JSON(PauseMusicPlugin, "kdeconnect_pausemusic.json")
Q_LOGGING_CATEGORY(KDECONNECT_PLUGIN_PAUSEMUSIC, "kdeconnect.plugin.pausemusic")
PauseMusicPlugin::PauseMusicPlugin(QObject* parent, const QVariantList& args) PauseMusicPlugin::PauseMusicPlugin(QObject* parent, const QVariantList& args)
: KdeConnectPlugin(parent, args) : KdeConnectPlugin(parent, args)
{ {

View file

@ -28,13 +28,9 @@
#include <core/kdeconnectplugin.h> #include <core/kdeconnectplugin.h>
#include <QLoggingCategory>
#include <mmdeviceapi.h> #include <mmdeviceapi.h>
#include <endpointvolume.h> #include <endpointvolume.h>
Q_DECLARE_LOGGING_CATEGORY(KDECONNECT_PLUGIN_PAUSEMUSIC)
class PauseMusicPlugin class PauseMusicPlugin
: public KdeConnectPlugin : public KdeConnectPlugin
{ {

View file

@ -29,11 +29,10 @@
//In older Qt released, qAsConst isnt available //In older Qt released, qAsConst isnt available
#include "qtcompat_p.h" #include "qtcompat_p.h"
#include "plugin_pausemusic_debug.h"
K_PLUGIN_CLASS_WITH_JSON(PauseMusicPlugin, "kdeconnect_pausemusic.json") K_PLUGIN_CLASS_WITH_JSON(PauseMusicPlugin, "kdeconnect_pausemusic.json")
Q_LOGGING_CATEGORY(KDECONNECT_PLUGIN_PAUSEMUSIC, "kdeconnect.plugin.pausemusic")
PauseMusicPlugin::PauseMusicPlugin(QObject* parent, const QVariantList& args) PauseMusicPlugin::PauseMusicPlugin(QObject* parent, const QVariantList& args)
: KdeConnectPlugin(parent, args) : KdeConnectPlugin(parent, args)
, mutedSinks() , mutedSinks()

View file

@ -27,10 +27,6 @@
#include <core/kdeconnectplugin.h> #include <core/kdeconnectplugin.h>
#include <QLoggingCategory>
Q_DECLARE_LOGGING_CATEGORY(KDECONNECT_PLUGIN_PAUSEMUSIC)
class PauseMusicPlugin class PauseMusicPlugin
: public KdeConnectPlugin : public KdeConnectPlugin
{ {

View file

@ -1,5 +1,13 @@
set(debug_file_SRCS)
ecm_qt_declare_logging_category(
debug_file_SRCS HEADER plugin_photo_debug.h
IDENTIFIER KDECONNECT_PLUGIN_PHOTO CATEGORY_NAME kdeconnect.plugin.photo
DEFAULT_SEVERITY Warning
EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (plugin photo)")
set(kdeconnect_photo_SRCS set(kdeconnect_photo_SRCS
photoplugin.cpp photoplugin.cpp
${debug_file_SRCS}
) )
kdeconnect_add_plugin(kdeconnect_photo JSON kdeconnect_photo.json SOURCES ${kdeconnect_photo_SRCS}) kdeconnect_add_plugin(kdeconnect_photo JSON kdeconnect_photo.json SOURCES ${kdeconnect_photo_SRCS})

View file

@ -23,14 +23,12 @@
#include <KPluginFactory> #include <KPluginFactory>
#include <QDebug> #include <QDebug>
#include <QLoggingCategory>
#include <core/filetransferjob.h> #include <core/filetransferjob.h>
#include "plugin_photo_debug.h"
K_PLUGIN_CLASS_WITH_JSON(PhotoPlugin, "kdeconnect_photo.json") K_PLUGIN_CLASS_WITH_JSON(PhotoPlugin, "kdeconnect_photo.json")
Q_LOGGING_CATEGORY(KDECONNECT_PLUGIN_PHOTO, "kdeconnect.plugin.photo")
PhotoPlugin::PhotoPlugin(QObject* parent, const QVariantList& args) PhotoPlugin::PhotoPlugin(QObject* parent, const QVariantList& args)
: KdeConnectPlugin(parent, args) : KdeConnectPlugin(parent, args)
{ {

View file

@ -1,5 +1,13 @@
set(debug_file_SRCS)
ecm_qt_declare_logging_category(
debug_file_SRCS HEADER plugin_ping_debug.h
IDENTIFIER KDECONNECT_PLUGIN_PING CATEGORY_NAME kdeconnect.plugin.ping
DEFAULT_SEVERITY Warning
EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (plugin ping)")
set(kdeconnect_ping_SRCS set(kdeconnect_ping_SRCS
pingplugin.cpp pingplugin.cpp
${debug_file_SRCS}
) )
kdeconnect_add_plugin(kdeconnect_ping JSON kdeconnect_ping.json SOURCES ${kdeconnect_ping_SRCS}) kdeconnect_add_plugin(kdeconnect_ping JSON kdeconnect_ping.json SOURCES ${kdeconnect_ping_SRCS})

View file

@ -25,14 +25,13 @@
#include <QDebug> #include <QDebug>
#include <QDBusConnection> #include <QDBusConnection>
#include <QLoggingCategory>
#include <core/device.h> #include <core/device.h>
#include <core/daemon.h> #include <core/daemon.h>
K_PLUGIN_CLASS_WITH_JSON(PingPlugin, "kdeconnect_ping.json") #include "plugin_ping_debug.h"
Q_LOGGING_CATEGORY(KDECONNECT_PLUGIN_PING, "kdeconnect.plugin.ping") K_PLUGIN_CLASS_WITH_JSON(PingPlugin, "kdeconnect_ping.json")
PingPlugin::PingPlugin(QObject* parent, const QVariantList& args) PingPlugin::PingPlugin(QObject* parent, const QVariantList& args)
: KdeConnectPlugin(parent, args) : KdeConnectPlugin(parent, args)

View file

@ -1,6 +1,13 @@
qt5_add_resources(presenter_SRCS assets.qrc) qt5_add_resources(presenter_SRCS assets.qrc)
kdeconnect_add_plugin(kdeconnect_presenter JSON kdeconnect_presenter.json SOURCES presenterplugin.cpp ${presenter_SRCS}) set(debug_file_SRCS)
ecm_qt_declare_logging_category(
debug_file_SRCS HEADER plugin_presenter_debug.h
IDENTIFIER KDECONNECT_PLUGIN_PRESENT CATEGORY_NAME kdeconnect.plugin.presenter
DEFAULT_SEVERITY Warning
EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (plugin presenter)")
kdeconnect_add_plugin(kdeconnect_presenter JSON kdeconnect_presenter.json SOURCES presenterplugin.cpp ${presenter_SRCS} ${debug_file_SRCS})
target_link_libraries(kdeconnect_presenter target_link_libraries(kdeconnect_presenter
kdeconnectcore kdeconnectcore
Qt5::DBus Qt5::DBus

View file

@ -25,7 +25,6 @@
#include <QDebug> #include <QDebug>
#include <QDBusConnection> #include <QDBusConnection>
#include <QLoggingCategory>
#include <QQuickView> #include <QQuickView>
#include <QQmlError> #include <QQmlError>
#include <QQuickItem> #include <QQuickItem>
@ -34,11 +33,10 @@
#include <core/device.h> #include <core/device.h>
#include <core/daemon.h> #include <core/daemon.h>
#include <QScreen> #include <QScreen>
#include "plugin_presenter_debug.h"
K_PLUGIN_CLASS_WITH_JSON(PresenterPlugin, "kdeconnect_presenter.json") K_PLUGIN_CLASS_WITH_JSON(PresenterPlugin, "kdeconnect_presenter.json")
Q_LOGGING_CATEGORY(KDECONNECT_PLUGIN_PRESENT, "kdeconnect.plugin.presenter")
class PresenterView : public QQuickView class PresenterView : public QQuickView
{ {
public: public:

View file

@ -1,7 +1,15 @@
set(debug_file_SRCS)
ecm_qt_declare_logging_category(
debug_file_SRCS HEADER plugin_remotecommands_debug.h
IDENTIFIER KDECONNECT_PLUGIN_REMOTECOMMANDS CATEGORY_NAME kdeconnect.plugin.remotecommands
DEFAULT_SEVERITY Warning
EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (plugin remotecommands)")
kdeconnect_add_plugin(kdeconnect_remotecommands JSON kdeconnect_remotecommands.json kdeconnect_add_plugin(kdeconnect_remotecommands JSON kdeconnect_remotecommands.json
SOURCES remotecommandsplugin.cpp SOURCES remotecommandsplugin.cpp ${debug_file_SRCS}
) )
target_link_libraries(kdeconnect_remotecommands target_link_libraries(kdeconnect_remotecommands
kdeconnectcore kdeconnectcore
Qt5::DBus Qt5::DBus

View file

@ -22,17 +22,15 @@
#include <KPluginFactory> #include <KPluginFactory>
#include <QLoggingCategory>
#include <core/networkpacket.h> #include <core/networkpacket.h>
#include <core/device.h> #include <core/device.h>
#include "plugin_remotecommands_debug.h"
#define PACKET_TYPE_RUNCOMMAND_REQUEST QLatin1String("kdeconnect.runcommand.request") #define PACKET_TYPE_RUNCOMMAND_REQUEST QLatin1String("kdeconnect.runcommand.request")
K_PLUGIN_CLASS_WITH_JSON(RemoteCommandsPlugin, "kdeconnect_remotecommands.json") K_PLUGIN_CLASS_WITH_JSON(RemoteCommandsPlugin, "kdeconnect_remotecommands.json")
Q_LOGGING_CATEGORY(KDECONNECT_PLUGIN_REMOTECOMMANDS, "kdeconnect.plugin.remotecommands")
RemoteCommandsPlugin::RemoteCommandsPlugin(QObject* parent, const QVariantList& args) RemoteCommandsPlugin::RemoteCommandsPlugin(QObject* parent, const QVariantList& args)
: KdeConnectPlugin(parent, args) : KdeConnectPlugin(parent, args)
, m_commands("{}") , m_commands("{}")

View file

@ -1,4 +1,11 @@
kdeconnect_add_plugin(kdeconnect_remotecontrol JSON kdeconnect_remotecontrol.json SOURCES remotecontrolplugin.cpp) set(debug_file_SRCS)
ecm_qt_declare_logging_category(
debug_file_SRCS HEADER plugin_remotecontrol_debug.h
IDENTIFIER KDECONNECT_PLUGIN_REMOTECONTROL CATEGORY_NAME kdeconnect.plugin.remotecontrol
DEFAULT_SEVERITY Warning
EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (plugin remotecontrol)")
kdeconnect_add_plugin(kdeconnect_remotecontrol JSON kdeconnect_remotecontrol.json SOURCES remotecontrolplugin.cpp ${debug_file_SRCS})
target_link_libraries(kdeconnect_remotecontrol target_link_libraries(kdeconnect_remotecontrol
kdeconnectcore kdeconnectcore

View file

@ -26,14 +26,12 @@
#include <QDebug> #include <QDebug>
#include <QDBusConnection> #include <QDBusConnection>
#include <QPoint> #include <QPoint>
#include <QLoggingCategory>
#include <core/device.h> #include <core/device.h>
#include "plugin_remotecontrol_debug.h"
K_PLUGIN_CLASS_WITH_JSON(RemoteControlPlugin, "kdeconnect_remotecontrol.json") K_PLUGIN_CLASS_WITH_JSON(RemoteControlPlugin, "kdeconnect_remotecontrol.json")
Q_LOGGING_CATEGORY(KDECONNECT_PLUGIN_REMOTECONTROL, "kdeconnect.plugin.remotecontrol")
RemoteControlPlugin::RemoteControlPlugin(QObject* parent, const QVariantList &args) RemoteControlPlugin::RemoteControlPlugin(QObject* parent, const QVariantList &args)
: KdeConnectPlugin(parent, args) : KdeConnectPlugin(parent, args)
{ {

View file

@ -1,5 +1,12 @@
set(debug_file_SRCS)
ecm_qt_declare_logging_category(
debug_file_SRCS HEADER plugin_remotekeyboard_debug.h
IDENTIFIER KDECONNECT_PLUGIN_REMOTEKEYBOARD CATEGORY_NAME kdeconnect.plugin.remotekeyboard
DEFAULT_SEVERITY Warning
EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (plugin remotekeyboard)")
kdeconnect_add_plugin(kdeconnect_remotekeyboard JSON kdeconnect_remotekeyboard.json kdeconnect_add_plugin(kdeconnect_remotekeyboard JSON kdeconnect_remotekeyboard.json
SOURCES remotekeyboardplugin.cpp) SOURCES remotekeyboardplugin.cpp ${debug_file_SRCS})
target_link_libraries(kdeconnect_remotekeyboard target_link_libraries(kdeconnect_remotekeyboard
kdeconnectcore kdeconnectcore

View file

@ -23,11 +23,10 @@
#include <QDebug> #include <QDebug>
#include <QString> #include <QString>
#include <QVariantMap> #include <QVariantMap>
#include "plugin_remotekeyboard_debug.h"
K_PLUGIN_CLASS_WITH_JSON(RemoteKeyboardPlugin, "kdeconnect_remotekeyboard.json") K_PLUGIN_CLASS_WITH_JSON(RemoteKeyboardPlugin, "kdeconnect_remotekeyboard.json")
Q_LOGGING_CATEGORY(KDECONNECT_PLUGIN_REMOTEKEYBOARD, "kdeconnect.plugin.remotekeyboard");
// Mapping of Qt::Key to internal codes, corresponds to the mapping in mousepadplugin // Mapping of Qt::Key to internal codes, corresponds to the mapping in mousepadplugin
QMap<int, int> specialKeysMap = { QMap<int, int> specialKeysMap = {
//0, // Invalid //0, // Invalid

View file

@ -23,13 +23,10 @@
#include <core/kdeconnectplugin.h> #include <core/kdeconnectplugin.h>
#include <QDBusInterface> #include <QDBusInterface>
#include <QLoggingCategory>
#include <QVariantMap> #include <QVariantMap>
struct FakeKey; struct FakeKey;
Q_DECLARE_LOGGING_CATEGORY(KDECONNECT_PLUGIN_REMOTEKEYBOARD);
#define PACKET_TYPE_MOUSEPAD_REQUEST QLatin1String("kdeconnect.mousepad.request") #define PACKET_TYPE_MOUSEPAD_REQUEST QLatin1String("kdeconnect.mousepad.request")
#define PACKET_TYPE_MOUSEPAD_ECHO QLatin1String("kdeconnect.mousepad.echo") #define PACKET_TYPE_MOUSEPAD_ECHO QLatin1String("kdeconnect.mousepad.echo")
#define PACKET_TYPE_MOUSEPAD_KEYBOARDSTATE QLatin1String("kdeconnect.mousepad.keyboardstate") #define PACKET_TYPE_MOUSEPAD_KEYBOARDSTATE QLatin1String("kdeconnect.mousepad.keyboardstate")

View file

@ -1,5 +1,13 @@
set(debug_file_SRCS)
ecm_qt_declare_logging_category(
debug_file_SRCS HEADER plugin_remotesystemvolume_debug.h
IDENTIFIER KDECONNECT_PLUGIN_REMOTESYSTEMVOLUME CATEGORY_NAME kdeconnect.plugin.remotesystemvolume
DEFAULT_SEVERITY Warning
EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (plugin remotesystemvolume)")
set(kdeconnect_remotesystemvolume_SRCS set(kdeconnect_remotesystemvolume_SRCS
remotesystemvolumeplugin.cpp remotesystemvolumeplugin.cpp
${debug_file_SRCS}
) )
kdeconnect_add_plugin(kdeconnect_remotesystemvolume JSON kdeconnect_remotesystemvolume.json SOURCES ${kdeconnect_remotesystemvolume_SRCS}) kdeconnect_add_plugin(kdeconnect_remotesystemvolume JSON kdeconnect_remotesystemvolume.json SOURCES ${kdeconnect_remotesystemvolume_SRCS})

View file

@ -25,16 +25,15 @@
#include <QDebug> #include <QDebug>
#include <QDBusConnection> #include <QDBusConnection>
#include <QLoggingCategory>
#include <QJsonArray> #include <QJsonArray>
#include <QJsonDocument> #include <QJsonDocument>
#include <core/device.h> #include <core/device.h>
#include <core/daemon.h> #include <core/daemon.h>
K_PLUGIN_CLASS_WITH_JSON(RemoteSystemVolumePlugin, "kdeconnect_remotesystemvolume.json") #include "plugin_remotesystemvolume_debug.h"
Q_LOGGING_CATEGORY(KDECONNECT_PLUGIN_REMOTESYSTEMVOLUME, "kdeconnect.plugin.remotesystemvolume") K_PLUGIN_CLASS_WITH_JSON(RemoteSystemVolumePlugin, "kdeconnect_remotesystemvolume.json")
RemoteSystemVolumePlugin::RemoteSystemVolumePlugin(QObject* parent, const QVariantList& args) RemoteSystemVolumePlugin::RemoteSystemVolumePlugin(QObject* parent, const QVariantList& args)
: KdeConnectPlugin(parent, args) : KdeConnectPlugin(parent, args)

View file

@ -1,5 +1,13 @@
set(debug_file_SRCS)
ecm_qt_declare_logging_category(
debug_file_SRCS HEADER plugin_runcommand_debug.h
IDENTIFIER KDECONNECT_PLUGIN_RUNCOMMAND CATEGORY_NAME kdeconnect.plugin.runcommand
DEFAULT_SEVERITY Warning
EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (plugin runcommand)")
set(kdeconnect_runcommand_SRCS set(kdeconnect_runcommand_SRCS
runcommandplugin.cpp runcommandplugin.cpp
${debug_file_SRCS}
) )
kdeconnect_add_plugin(kdeconnect_runcommand JSON kdeconnect_runcommand.json SOURCES ${kdeconnect_runcommand_SRCS}) kdeconnect_add_plugin(kdeconnect_runcommand JSON kdeconnect_runcommand.json SOURCES ${kdeconnect_runcommand_SRCS})

View file

@ -25,7 +25,6 @@
#include <QDBusConnection> #include <QDBusConnection>
#include <QProcess> #include <QProcess>
#include <QDir> #include <QDir>
#include <QLoggingCategory>
#include <QSettings> #include <QSettings>
#include <QJsonDocument> #include <QJsonDocument>
@ -39,6 +38,8 @@
#include <core/networkpacket.h> #include <core/networkpacket.h>
#include <core/device.h> #include <core/device.h>
#include "plugin_runcommand_debug.h"
#define PACKET_TYPE_RUNCOMMAND QStringLiteral("kdeconnect.runcommand") #define PACKET_TYPE_RUNCOMMAND QStringLiteral("kdeconnect.runcommand")
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
@ -53,8 +54,6 @@
K_PLUGIN_CLASS_WITH_JSON(RunCommandPlugin, "kdeconnect_runcommand.json") K_PLUGIN_CLASS_WITH_JSON(RunCommandPlugin, "kdeconnect_runcommand.json")
Q_LOGGING_CATEGORY(KDECONNECT_PLUGIN_RUNCOMMAND, "kdeconnect.plugin.runcommand")
RunCommandPlugin::RunCommandPlugin(QObject* parent, const QVariantList& args) RunCommandPlugin::RunCommandPlugin(QObject* parent, const QVariantList& args)
: KdeConnectPlugin(parent, args) : KdeConnectPlugin(parent, args)
{ {

View file

@ -12,7 +12,14 @@ else()
) )
endif() endif()
kdeconnect_add_plugin(kdeconnect_screensaver_inhibit JSON kdeconnect_screensaver_inhibit.json SOURCES ${kdeconnect_screensaver_inhibit_SRCS}) set(debug_file_SRCS)
ecm_qt_declare_logging_category(
debug_file_SRCS HEADER kdeconnect_screensaverinhibit_debug.h
IDENTIFIER KDECONNECT_PLUGIN_SCREENSAVERINHIBIT CATEGORY_NAME kdeconnect.plugin.screensaverinhibit
DEFAULT_SEVERITY Warning
EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (plugin screensaverinhibit)")
kdeconnect_add_plugin(kdeconnect_screensaver_inhibit JSON kdeconnect_screensaver_inhibit.json SOURCES ${kdeconnect_screensaver_inhibit_SRCS} ${debug_file_SRCS})
target_link_libraries(kdeconnect_screensaver_inhibit kdeconnectcore) target_link_libraries(kdeconnect_screensaver_inhibit kdeconnectcore)
if(NOT APPLE AND NOT WIN32) if(NOT APPLE AND NOT WIN32)

View file

@ -21,12 +21,10 @@
#include "screensaverinhibitplugin-macos.h" #include "screensaverinhibitplugin-macos.h"
#include <KPluginFactory> #include <KPluginFactory>
#include <QLoggingCategory> #include "kdeconnect_screensaverinhibit_debug.h"
K_PLUGIN_CLASS_WITH_JSON(ScreensaverInhibitPlugin, "kdeconnect_screensaver_inhibit.json") K_PLUGIN_CLASS_WITH_JSON(ScreensaverInhibitPlugin, "kdeconnect_screensaver_inhibit.json")
Q_LOGGING_CATEGORY(KDECONNECT_PLUGIN_SCREENSAVERINHIBIT, "kdeconnect.plugin.screensaverinhibit")
ScreensaverInhibitPlugin::ScreensaverInhibitPlugin(QObject* parent, const QVariantList& args) ScreensaverInhibitPlugin::ScreensaverInhibitPlugin(QObject* parent, const QVariantList& args)
: KdeConnectPlugin(parent, args), m_caffeinateProcess(nullptr) : KdeConnectPlugin(parent, args), m_caffeinateProcess(nullptr)
{ {

View file

@ -21,13 +21,11 @@
#include "screensaverinhibitplugin-win.h" #include "screensaverinhibitplugin-win.h"
#include <KPluginFactory> #include <KPluginFactory>
#include <QLoggingCategory>
#include <Windows.h> #include <Windows.h>
#include "kdeconnect_screensaverinhibit_debug.h"
K_PLUGIN_CLASS_WITH_JSON(ScreensaverInhibitPlugin, "kdeconnect_screensaver_inhibit.json") K_PLUGIN_CLASS_WITH_JSON(ScreensaverInhibitPlugin, "kdeconnect_screensaver_inhibit.json")
Q_LOGGING_CATEGORY(KDECONNECT_PLUGIN_SCREENSAVERINHIBIT, "kdeconnect.plugin.screensaverinhibit")
ScreensaverInhibitPlugin::ScreensaverInhibitPlugin(QObject* parent, const QVariantList& args) ScreensaverInhibitPlugin::ScreensaverInhibitPlugin(QObject* parent, const QVariantList& args)
: KdeConnectPlugin(parent, args) : KdeConnectPlugin(parent, args)
{ {

View file

@ -22,14 +22,12 @@
#include <KLocalizedString> #include <KLocalizedString>
#include <KPluginFactory> #include <KPluginFactory>
#include <QLoggingCategory>
#include <QDBusConnection> #include <QDBusConnection>
#include <QDBusInterface> #include <QDBusInterface>
#include "kdeconnect_screensaverinhibit_debug.h"
K_PLUGIN_CLASS_WITH_JSON(ScreensaverInhibitPlugin, "kdeconnect_screensaver_inhibit.json") K_PLUGIN_CLASS_WITH_JSON(ScreensaverInhibitPlugin, "kdeconnect_screensaver_inhibit.json")
Q_LOGGING_CATEGORY(KDECONNECT_PLUGIN_SCREENSAVERINHIBIT, "kdeconnect.plugin.screensaverinhibit")
#define INHIBIT_SERVICE QStringLiteral("org.freedesktop.ScreenSaver") #define INHIBIT_SERVICE QStringLiteral("org.freedesktop.ScreenSaver")
#define INHIBIT_INTERFACE INHIBIT_SERVICE #define INHIBIT_INTERFACE INHIBIT_SERVICE
#define INHIBIT_PATH QStringLiteral("/ScreenSaver") #define INHIBIT_PATH QStringLiteral("/ScreenSaver")

View file

@ -6,11 +6,19 @@ endif()
configure_file(kdeconnect_sendnotifications.json.in kdeconnect_sendnotifications.json) configure_file(kdeconnect_sendnotifications.json.in kdeconnect_sendnotifications.json)
set(debug_file_SRCS)
ecm_qt_declare_logging_category(
debug_file_SRCS HEADER plugin_sendnotification_debug.h
IDENTIFIER KDECONNECT_PLUGIN_SENDNOTIFICATION CATEGORY_NAME kdeconnect.plugin.sendnotification
DEFAULT_SEVERITY Warning
EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (plugin sendnotification)")
set(kdeconnect_sendnotifications_SRCS set(kdeconnect_sendnotifications_SRCS
sendnotificationsplugin.cpp sendnotificationsplugin.cpp
notificationslistener.cpp notificationslistener.cpp
notifyingapplication.cpp notifyingapplication.cpp
kdeconnect_sendnotifications.json kdeconnect_sendnotifications.json
${debug_file_SRCS}
) )
kdeconnect_add_plugin(kdeconnect_sendnotifications JSON "${CMAKE_CURRENT_BINARY_DIR}/kdeconnect_sendnotifications.json" SOURCES ${kdeconnect_sendnotifications_SRCS}) kdeconnect_add_plugin(kdeconnect_sendnotifications JSON "${CMAKE_CURRENT_BINARY_DIR}/kdeconnect_sendnotifications.json" SOURCES ${kdeconnect_sendnotifications_SRCS})

View file

@ -22,7 +22,6 @@
#include <QDBusInterface> #include <QDBusInterface>
#include <QDBusArgument> #include <QDBusArgument>
#include <QtDebug> #include <QtDebug>
#include <QLoggingCategory>
#include <QStandardPaths> #include <QStandardPaths>
#include <QImage> #include <QImage>
#include <KConfig> #include <KConfig>
@ -36,7 +35,7 @@
#include <dbushelper.h> #include <dbushelper.h>
#include "sendnotificationsplugin.h" #include "sendnotificationsplugin.h"
#include "sendnotification_debug.h" #include "plugin_sendnotification_debug.h"
#include "notifyingapplication.h" #include "notifyingapplication.h"
//In older Qt released, qAsConst isnt available //In older Qt released, qAsConst isnt available

View file

@ -1,28 +0,0 @@
/**
* Copyright 2014 Alejandro Fiestas Olivares <afiestas@kde.org>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License or (at your option) version 3 or any later version
* accepted by the membership of KDE e.V. (or its successor approved
* by the membership of KDE e.V.), which shall act as a proxy
* defined in Section 14 of version 3 of the license.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef SENDNOTIFICATION_DEBUG_H
#define SENDNOTIFICATION_DEBUG_H
#include <QLoggingCategory>
Q_DECLARE_LOGGING_CATEGORY(KDECONNECT_PLUGIN_SENDNOTIFICATION)
#endif //NOTIFICATION_DEBUG_H

View file

@ -21,14 +21,12 @@
#include "sendnotificationsplugin.h" #include "sendnotificationsplugin.h"
#include "notificationslistener.h" #include "notificationslistener.h"
#include "sendnotification_debug.h" #include "plugin_sendnotification_debug.h"
#include <KPluginFactory> #include <KPluginFactory>
K_PLUGIN_CLASS_WITH_JSON(SendNotificationsPlugin, "kdeconnect_sendnotifications.json") K_PLUGIN_CLASS_WITH_JSON(SendNotificationsPlugin, "kdeconnect_sendnotifications.json")
Q_LOGGING_CATEGORY(KDECONNECT_PLUGIN_SENDNOTIFICATION, "kdeconnect.plugin.sendnotification")
SendNotificationsPlugin::SendNotificationsPlugin(QObject* parent, const QVariantList& args) SendNotificationsPlugin::SendNotificationsPlugin(QObject* parent, const QVariantList& args)
: KdeConnectPlugin(parent, args) : KdeConnectPlugin(parent, args)
{ {

View file

@ -14,7 +14,14 @@ else()
) )
endif() endif()
kdeconnect_add_plugin(kdeconnect_sftp JSON kdeconnect_sftp.json SOURCES ${kdeconnect_sftp_SRCS}) set(debug_file_SRCS)
ecm_qt_declare_logging_category(
debug_file_SRCS HEADER plugin_sftp_debug.h
IDENTIFIER KDECONNECT_PLUGIN_SFTP CATEGORY_NAME kdeconnect.plugin.sftp
DEFAULT_SEVERITY Warning
EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (plugin sftp)")
kdeconnect_add_plugin(kdeconnect_sftp JSON kdeconnect_sftp.json SOURCES ${kdeconnect_sftp_SRCS} ${debug_file_SRCS})
target_link_libraries(kdeconnect_sftp target_link_libraries(kdeconnect_sftp
kdeconnectcore kdeconnectcore

View file

@ -28,7 +28,7 @@
#include "mountloop.h" #include "mountloop.h"
#include "config-sftp.h" #include "config-sftp.h"
#include "sftp_debug.h" #include "plugin_sftp_debug.h"
#include "kdeconnectconfig.h" #include "kdeconnectconfig.h"
Mounter::Mounter(SftpPlugin* sftp) Mounter::Mounter(SftpPlugin* sftp)

View file

@ -1,28 +0,0 @@
/**
* Copyright 2014 Alejandro Fiestas Olivares <afiestas@kde.org>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License or (at your option) version 3 or any later version
* accepted by the membership of KDE e.V. (or its successor approved
* by the membership of KDE e.V.), which shall act as a proxy
* defined in Section 14 of version 3 of the license.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef SFTP_DEBUG_H
#define SFTP_DEBUG_H
#include <QLoggingCategory>
Q_DECLARE_LOGGING_CATEGORY(KDECONNECT_PLUGIN_SFTP)
#endif //SFTP_DEBUG_H

View file

@ -29,12 +29,10 @@
#include <KLocalizedString> #include <KLocalizedString>
#include <KPluginFactory> #include <KPluginFactory>
#include "sftp_debug.h" #include "plugin_sftp_debug.h"
K_PLUGIN_CLASS_WITH_JSON(SftpPlugin, "kdeconnect_sftp.json") K_PLUGIN_CLASS_WITH_JSON(SftpPlugin, "kdeconnect_sftp.json")
Q_LOGGING_CATEGORY(KDECONNECT_PLUGIN_SFTP, "kdeconnect.plugin.sftp")
SftpPlugin::SftpPlugin(QObject* parent, const QVariantList& args) SftpPlugin::SftpPlugin(QObject* parent, const QVariantList& args)
: KdeConnectPlugin(parent, args) : KdeConnectPlugin(parent, args)
{ {

View file

@ -32,12 +32,10 @@
#include <KPluginFactory> #include <KPluginFactory>
#include "mounter.h" #include "mounter.h"
#include "sftp_debug.h" #include "plugin_sftp_debug.h"
K_PLUGIN_CLASS_WITH_JSON(SftpPlugin, "kdeconnect_sftp.json") K_PLUGIN_CLASS_WITH_JSON(SftpPlugin, "kdeconnect_sftp.json")
Q_LOGGING_CATEGORY(KDECONNECT_PLUGIN_SFTP, "kdeconnect.plugin.sftp")
static const QSet<QString> fields_c = QSet<QString>() << QStringLiteral("ip") << QStringLiteral("port") << QStringLiteral("user") << QStringLiteral("port") << QStringLiteral("path"); static const QSet<QString> fields_c = QSet<QString>() << QStringLiteral("ip") << QStringLiteral("port") << QStringLiteral("user") << QStringLiteral("port") << QStringLiteral("path");
struct SftpPlugin::Pimpl struct SftpPlugin::Pimpl

View file

@ -1,5 +1,13 @@
set(debug_file_SRCS)
ecm_qt_declare_logging_category(
debug_file_SRCS HEADER plugin_share_debug.h
IDENTIFIER KDECONNECT_PLUGIN_SHARE CATEGORY_NAME kdeconnect.plugin.share
DEFAULT_SEVERITY Warning
EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (plugin share)")
set(kdeconnect_share_SRCS set(kdeconnect_share_SRCS
shareplugin.cpp shareplugin.cpp
${debug_file_SRCS}
) )
kdeconnect_add_plugin(kdeconnect_share JSON kdeconnect_share.json SOURCES ${kdeconnect_share_SRCS}) kdeconnect_add_plugin(kdeconnect_share JSON kdeconnect_share.json SOURCES ${kdeconnect_share_SRCS})

View file

@ -1,28 +0,0 @@
/**
* Copyright 2014 Alejandro Fiestas Olivares <afiestas@kde.org>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License or (at your option) version 3 or any later version
* accepted by the membership of KDE e.V. (or its successor approved
* by the membership of KDE e.V.), which shall act as a proxy
* defined in Section 14 of version 3 of the license.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef SHARE_DEBUG_H
#define SHARE_DEBUG_H
#include <QLoggingCategory>
Q_DECLARE_LOGGING_CATEGORY(KDECONNECT_PLUGIN_SHARE)
#endif //SHARE_DEBUG_H

View file

@ -19,7 +19,6 @@
*/ */
#include "shareplugin.h" #include "shareplugin.h"
#include "share_debug.h"
#include <QStandardPaths> #include <QStandardPaths>
#include <QProcess> #include <QProcess>
@ -39,11 +38,10 @@
#include "core/filetransferjob.h" #include "core/filetransferjob.h"
#include "core/daemon.h" #include "core/daemon.h"
#include "plugin_share_debug.h"
K_PLUGIN_CLASS_WITH_JSON(SharePlugin, "kdeconnect_share.json") K_PLUGIN_CLASS_WITH_JSON(SharePlugin, "kdeconnect_share.json")
Q_LOGGING_CATEGORY(KDECONNECT_PLUGIN_SHARE, "kdeconnect.plugin.share")
SharePlugin::SharePlugin(QObject* parent, const QVariantList& args) SharePlugin::SharePlugin(QObject* parent, const QVariantList& args)
: KdeConnectPlugin(parent, args) : KdeConnectPlugin(parent, args)
, m_compositeJob() , m_compositeJob()

View file

@ -1,7 +1,21 @@
set(debug_file_SRCS)
ecm_qt_declare_logging_category(
debug_file_SRCS HEADER plugin_sms_debug.h
IDENTIFIER KDECONNECT_PLUGIN_SMS CATEGORY_NAME kdeconnect.plugin.sms
DEFAULT_SEVERITY Warning
EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (plugin sms)")
ecm_qt_declare_logging_category(
debug_file_SRCS HEADER kdeconnect_conversations_debug.h
IDENTIFIER KDECONNECT_CONVERSATIONS CATEGORY_NAME kdeconnect.conversations
DEFAULT_SEVERITY Warning
EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (conversations)")
set(kdeconnect_sms_SRCS set(kdeconnect_sms_SRCS
smsplugin.cpp smsplugin.cpp
conversationsdbusinterface.cpp conversationsdbusinterface.cpp
requestconversationworker.cpp requestconversationworker.cpp
${debug_file_SRCS}
) )
include_directories(${CMAKE_BINARY_DIR}) include_directories(${CMAKE_BINARY_DIR})

View file

@ -29,7 +29,7 @@
#include <core/device.h> #include <core/device.h>
#include <core/kdeconnectplugin.h> #include <core/kdeconnectplugin.h>
Q_LOGGING_CATEGORY(KDECONNECT_CONVERSATIONS, "kdeconnect.conversations") #include "kdeconnect_conversations_debug.h"
QMap<QString, ConversationsDbusInterface*> ConversationsDbusInterface::liveConversationInterfaces; QMap<QString, ConversationsDbusInterface*> ConversationsDbusInterface::liveConversationInterfaces;

View file

@ -26,18 +26,16 @@
#include <QDebug> #include <QDebug>
#include <QDBusConnection> #include <QDBusConnection>
#include <QLoggingCategory>
#include <QProcess> #include <QProcess>
#include <core/device.h> #include <core/device.h>
#include <core/daemon.h> #include <core/daemon.h>
#include "sendreplydialog.h" #include "sendreplydialog.h"
#include "plugin_sms_debug.h"
K_PLUGIN_CLASS_WITH_JSON(SmsPlugin, "kdeconnect_sms.json") K_PLUGIN_CLASS_WITH_JSON(SmsPlugin, "kdeconnect_sms.json")
Q_LOGGING_CATEGORY(KDECONNECT_PLUGIN_SMS, "kdeconnect.plugin.sms")
SmsPlugin::SmsPlugin(QObject* parent, const QVariantList& args) SmsPlugin::SmsPlugin(QObject* parent, const QVariantList& args)
: KdeConnectPlugin(parent, args) : KdeConnectPlugin(parent, args)
, m_telepathyInterface(QStringLiteral("org.freedesktop.Telepathy.ConnectionManager.kdeconnect"), QStringLiteral("/kdeconnect")) , m_telepathyInterface(QStringLiteral("org.freedesktop.Telepathy.ConnectionManager.kdeconnect"), QStringLiteral("/kdeconnect"))

View file

@ -12,7 +12,13 @@ else()
) )
endif() endif()
kdeconnect_add_plugin(kdeconnect_systemvolume JSON kdeconnect_systemvolume.json SOURCES ${kdeconnect_systemvolume_SRCS}) set(debug_file_SRCS)
ecm_qt_declare_logging_category(
debug_file_SRCS HEADER plugin_systemvolume_debug.h
IDENTIFIER KDECONNECT_PLUGIN_SYSTEMVOLUME CATEGORY_NAME kdeconnect.plugin.systemvolume
DEFAULT_SEVERITY Warning
EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (plugin systemvolume)")
kdeconnect_add_plugin(kdeconnect_systemvolume JSON kdeconnect_systemvolume.json SOURCES ${kdeconnect_systemvolume_SRCS} ${debug_file_SRCS})
if(WIN32) if(WIN32)
target_link_libraries(kdeconnect_systemvolume target_link_libraries(kdeconnect_systemvolume

View file

@ -23,14 +23,13 @@
#include <KPluginFactory> #include <KPluginFactory>
#include <QDebug> #include <QDebug>
#include <QLoggingCategory>
#include <QJsonArray> #include <QJsonArray>
#include <QJsonDocument> #include <QJsonDocument>
#include <QJsonObject> #include <QJsonObject>
#include "plugin_systemvolume_debug.h"
K_PLUGIN_FACTORY_WITH_JSON( KdeConnectPluginFactory, "kdeconnect_systemvolume.json", registerPlugin< SystemvolumePlugin >(); ) K_PLUGIN_FACTORY_WITH_JSON( KdeConnectPluginFactory, "kdeconnect_systemvolume.json", registerPlugin< SystemvolumePlugin >(); )
Q_LOGGING_CATEGORY(KDECONNECT_PLUGIN_SYSTEMVOLUME, "kdeconnect.plugin.systemvolume")
class MacOSCoreAudioDevice class MacOSCoreAudioDevice
{ {

View file

@ -23,7 +23,6 @@
#include <KPluginFactory> #include <KPluginFactory>
#include <QDebug> #include <QDebug>
#include <QLoggingCategory>
#include <QProcess> #include <QProcess>
#include <QJsonArray> #include <QJsonArray>
#include <QJsonDocument> #include <QJsonDocument>
@ -33,10 +32,10 @@
#include <PulseAudioQt/Sink> #include <PulseAudioQt/Sink>
#include <PulseAudioQt/Context> #include <PulseAudioQt/Context>
#include "plugin_systemvolume_debug.h"
K_PLUGIN_CLASS_WITH_JSON(SystemvolumePlugin, "kdeconnect_systemvolume.json") K_PLUGIN_CLASS_WITH_JSON(SystemvolumePlugin, "kdeconnect_systemvolume.json")
Q_LOGGING_CATEGORY(KDECONNECT_PLUGIN_SYSTEMVOLUME, "kdeconnect.plugin.systemvolume")
SystemvolumePlugin::SystemvolumePlugin(QObject* parent, const QVariantList& args) SystemvolumePlugin::SystemvolumePlugin(QObject* parent, const QVariantList& args)
: KdeConnectPlugin(parent, args) : KdeConnectPlugin(parent, args)

View file

@ -21,7 +21,6 @@
#include "systemvolumeplugin-win.h" #include "systemvolumeplugin-win.h"
#include <QDebug> #include <QDebug>
#include <QLoggingCategory>
#include <QJsonArray> #include <QJsonArray>
#include <QJsonDocument> #include <QJsonDocument>
#include <QJsonObject> #include <QJsonObject>
@ -32,9 +31,9 @@
#include <core/device.h> #include <core/device.h>
K_PLUGIN_CLASS_WITH_JSON(SystemvolumePlugin, "kdeconnect_systemvolume.json") #include "plugin_systemvolume_debug.h"
Q_LOGGING_CATEGORY(KDECONNECT_PLUGIN_SYSTEMVOLUME, "kdeconnect.plugin.systemvolume") K_PLUGIN_CLASS_WITH_JSON(SystemvolumePlugin, "kdeconnect_systemvolume.json")
// Private classes of SystemvolumePlugin // Private classes of SystemvolumePlugin

View file

@ -1,5 +1,13 @@
set(debug_file_SRCS)
ecm_qt_declare_logging_category(
debug_file_SRCS HEADER plugin_telephony_debug.h
IDENTIFIER KDECONNECT_PLUGIN_TELEPHONY CATEGORY_NAME kdeconnect.plugin.telephony
DEFAULT_SEVERITY Warning
EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (plugin telephony)")
set(kdeconnect_telephony_SRCS set(kdeconnect_telephony_SRCS
telephonyplugin.cpp telephonyplugin.cpp
${debug_file_SRCS}
) )
include_directories(${CMAKE_BINARY_DIR}) include_directories(${CMAKE_BINARY_DIR})

View file

@ -27,11 +27,10 @@
#include <KPluginFactory> #include <KPluginFactory>
#include <KNotification> #include <KNotification>
#include "plugin_telephony_debug.h"
K_PLUGIN_CLASS_WITH_JSON(TelephonyPlugin, "kdeconnect_telephony.json") K_PLUGIN_CLASS_WITH_JSON(TelephonyPlugin, "kdeconnect_telephony.json")
Q_LOGGING_CATEGORY(KDECONNECT_PLUGIN_TELEPHONY, "kdeconnect.plugin.telephony")
TelephonyPlugin::TelephonyPlugin(QObject* parent, const QVariantList& args) TelephonyPlugin::TelephonyPlugin(QObject* parent, const QVariantList& args)
: KdeConnectPlugin(parent, args) : KdeConnectPlugin(parent, args)
{ {

View file

@ -22,7 +22,6 @@
#ifndef TELEPHONYPLUGIN_H #ifndef TELEPHONYPLUGIN_H
#define TELEPHONYPLUGIN_H #define TELEPHONYPLUGIN_H
#include <QLoggingCategory>
#include <QPointer> #include <QPointer>
#include <KNotification> #include <KNotification>
@ -45,8 +44,6 @@
#define PACKET_TYPE_TELEPHONY_REQUEST_MUTE QStringLiteral("kdeconnect.telephony.request_mute") #define PACKET_TYPE_TELEPHONY_REQUEST_MUTE QStringLiteral("kdeconnect.telephony.request_mute")
Q_DECLARE_LOGGING_CATEGORY(KDECONNECT_PLUGIN_TELEPHONY)
class TelephonyPlugin class TelephonyPlugin
: public KdeConnectPlugin : public KdeConnectPlugin
{ {

View file

@ -2,9 +2,30 @@ qt5_add_resources(KCSMS_SRCS resources.qrc)
find_package(KF5People) find_package(KF5People)
set(smshelper_debug_file_SRCS)
ecm_qt_declare_logging_category(
smshelper_debug_file_SRCS HEADER smshelper_debug.h
IDENTIFIER KDECONNECT_SMS_SMSHELPER CATEGORY_NAME kdeconnect.sms.smshelper
DEFAULT_SEVERITY Warning
EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (smshelper)")
set(sms_debug_files_SRCS)
ecm_qt_declare_logging_category(
sms_debug_files_SRCS HEADER sms_conversation_debug.h
IDENTIFIER KDECONNECT_SMS_CONVERSATION_MODEL CATEGORY_NAME kdeconnect.sms.conversation
DEFAULT_SEVERITY Warning
EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (sms conversation model)")
ecm_qt_declare_logging_category(
sms_debug_files_SRCS HEADER sms_conversations_list_debug.h
IDENTIFIER KDECONNECT_SMS_CONVERSATIONS_LIST_MODEL CATEGORY_NAME kdeconnect.sms.conversations_list
DEFAULT_SEVERITY Warning
EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (sms conversations list)")
add_library(kdeconnectsmshelper add_library(kdeconnectsmshelper
smshelper.cpp smshelper.cpp
gsmasciimap.cpp gsmasciimap.cpp
${smshelper_debug_file_SRCS}
) )
set_target_properties(kdeconnectsmshelper PROPERTIES set_target_properties(kdeconnectsmshelper PROPERTIES
@ -35,7 +56,8 @@ add_executable(kdeconnect-sms
conversationlistmodel.cpp conversationlistmodel.cpp
conversationmodel.cpp conversationmodel.cpp
conversationssortfilterproxymodel.cpp conversationssortfilterproxymodel.cpp
${KCSMS_SRCS}) ${KCSMS_SRCS}
${sms_debug_files_SRCS})
target_include_directories(kdeconnect-sms PUBLIC ${CMAKE_BINARY_DIR}) target_include_directories(kdeconnect-sms PUBLIC ${CMAKE_BINARY_DIR})

View file

@ -22,7 +22,6 @@
#include "conversationlistmodel.h" #include "conversationlistmodel.h"
#include <QString> #include <QString>
#include <QLoggingCategory>
#include <QPainter> #include <QPainter>
#include <KLocalizedString> #include <KLocalizedString>
@ -30,8 +29,7 @@
#include "interfaces/conversationmessage.h" #include "interfaces/conversationmessage.h"
#include "interfaces/dbusinterfaces.h" #include "interfaces/dbusinterfaces.h"
#include "smshelper.h" #include "smshelper.h"
#include "sms_conversations_list_debug.h"
Q_LOGGING_CATEGORY(KDECONNECT_SMS_CONVERSATIONS_LIST_MODEL, "kdeconnect.sms.conversations_list")
#define INVALID_THREAD_ID -1 #define INVALID_THREAD_ID -1
#define INVALID_DATE -1 #define INVALID_DATE -1

View file

@ -23,13 +23,10 @@
#define CONVERSATIONLISTMODEL_H #define CONVERSATIONLISTMODEL_H
#include <QStandardItemModel> #include <QStandardItemModel>
#include <QLoggingCategory>
#include "interfaces/conversationmessage.h" #include "interfaces/conversationmessage.h"
#include "interfaces/dbusinterfaces.h" #include "interfaces/dbusinterfaces.h"
Q_DECLARE_LOGGING_CATEGORY(KDECONNECT_SMS_CONVERSATIONS_LIST_MODEL)
class ConversationListModel class ConversationListModel
: public QStandardItemModel : public QStandardItemModel
{ {

View file

@ -21,14 +21,12 @@
#include "conversationmodel.h" #include "conversationmodel.h"
#include <QLoggingCategory>
#include <KLocalizedString> #include <KLocalizedString>
#include "interfaces/conversationmessage.h" #include "interfaces/conversationmessage.h"
#include "smshelper.h" #include "smshelper.h"
Q_LOGGING_CATEGORY(KDECONNECT_SMS_CONVERSATION_MODEL, "kdeconnect.sms.conversation") #include "sms_conversation_debug.h"
ConversationModel::ConversationModel(QObject* parent) ConversationModel::ConversationModel(QObject* parent)
: QStandardItemModel(parent) : QStandardItemModel(parent)

View file

@ -23,14 +23,11 @@
#define CONVERSATIONMODEL_H #define CONVERSATIONMODEL_H
#include <QStandardItemModel> #include <QStandardItemModel>
#include <QLoggingCategory>
#include <QSet> #include <QSet>
#include "interfaces/conversationmessage.h" #include "interfaces/conversationmessage.h"
#include "interfaces/dbusinterfaces.h" #include "interfaces/dbusinterfaces.h"
Q_DECLARE_LOGGING_CATEGORY(KDECONNECT_SMS_CONVERSATION_MODEL)
#define INVALID_THREAD_ID -1 #define INVALID_THREAD_ID -1
class ConversationModel class ConversationModel

View file

@ -26,7 +26,6 @@
#include <QPainter> #include <QPainter>
#include <QRegularExpression> #include <QRegularExpression>
#include <QString> #include <QString>
#include <QLoggingCategory>
#include <QStandardPaths> #include <QStandardPaths>
#include <QHash> #include <QHash>
@ -35,8 +34,7 @@
#include "interfaces/conversationmessage.h" #include "interfaces/conversationmessage.h"
#include "smsapp/gsmasciimap.h" #include "smsapp/gsmasciimap.h"
#include "smshelper_debug.h"
Q_LOGGING_CATEGORY(KDECONNECT_SMS_SMSHELPER, "kdeconnect.sms.smshelper")
QObject* SmsHelper::singletonProvider(QQmlEngine *engine, QJSEngine *scriptEngine) QObject* SmsHelper::singletonProvider(QQmlEngine *engine, QJSEngine *scriptEngine)
{ {

View file

@ -23,7 +23,6 @@
#include <QIcon> #include <QIcon>
#include <QJSEngine> #include <QJSEngine>
#include <QLoggingCategory>
#include <QQmlEngine> #include <QQmlEngine>
#include <QSharedPointer> #include <QSharedPointer>
@ -34,8 +33,6 @@
#include "kdeconnectsms_export.h" #include "kdeconnectsms_export.h"
#include "smsapp/smscharcount.h" #include "smsapp/smscharcount.h"
Q_DECLARE_LOGGING_CATEGORY(KDECONNECT_SMS_SMSHELPER)
class PersonsCache; class PersonsCache;
class KDECONNECTSMSAPPLIB_EXPORT SmsHelper : public QObject class KDECONNECTSMSAPPLIB_EXPORT SmsHelper : public QObject