From ed1e24d231dbc1b539265f2e5ff28d21a0fe037a Mon Sep 17 00:00:00 2001 From: Alexander Lohnau Date: Sun, 6 Aug 2023 12:00:02 +0200 Subject: [PATCH] kdeconnect_add_plugin: Autogenerate logging category This is far less code and allows for an easier enforcing of standards, for example the name of the log identifiers which were adjusted in a few cases. Also clean up unused includes when noticed. --- KDEConnectMacros.cmake | 12 ++++++-- plugins/battery/CMakeLists.txt | 6 ---- plugins/bigscreen/CMakeLists.txt | 1 - plugins/bigscreen/bigscreenplugin.cpp | 2 -- plugins/clipboard/CMakeLists.txt | 6 ---- plugins/connectivity-report/CMakeLists.txt | 6 ---- plugins/contacts/CMakeLists.txt | 6 ---- plugins/findmyphone/CMakeLists.txt | 8 +---- plugins/findthisdevice/CMakeLists.txt | 6 ---- plugins/lockdevice/CMakeLists.txt | 15 +++------- plugins/lockdevice/lockdeviceplugin-win.cpp | 2 -- plugins/lockdevice/lockdeviceplugin.cpp | 6 ++-- plugins/mmtelephony/CMakeLists.txt | 7 ----- plugins/mousepad/abstractremoteinput.cpp | 1 - plugins/mousepad/abstractremoteinput.h | 3 +- plugins/mpriscontrol/CMakeLists.txt | 6 ---- .../mpriscontrol/mpriscontrolplugin-win.cpp | 12 ++++---- plugins/mpriscontrol/mpriscontrolplugin.cpp | 22 +++++++------- plugins/mprisremote/CMakeLists.txt | 5 ---- plugins/notifications/CMakeLists.txt | 6 ---- plugins/notifications/notification.cpp | 4 +-- plugins/notifications/notificationsplugin.cpp | 12 ++++---- plugins/pausemusic/CMakeLists.txt | 6 ---- plugins/photo/CMakeLists.txt | 6 ---- plugins/ping/CMakeLists.txt | 7 ----- plugins/presenter/CMakeLists.txt | 5 ---- plugins/presenter/presenterplugin.cpp | 2 +- plugins/remotecommands/CMakeLists.txt | 6 ---- plugins/remotecontrol/CMakeLists.txt | 6 ---- plugins/remotekeyboard/CMakeLists.txt | 7 ----- plugins/remotesystemvolume/CMakeLists.txt | 6 ---- plugins/runcommand/CMakeLists.txt | 6 ---- plugins/screensaver-inhibit/CMakeLists.txt | 7 ----- .../screensaverinhibitplugin-macos.cpp | 4 +-- .../screensaverinhibitplugin-win.cpp | 1 - .../screensaverinhibitplugin.cpp | 1 - plugins/sendnotifications/CMakeLists.txt | 5 ---- .../notificationslistener.cpp | 29 ++++++++++--------- .../sendnotificationsplugin.cpp | 1 - plugins/sftp/CMakeLists.txt | 6 ---- plugins/share/CMakeLists.txt | 13 --------- plugins/sms/CMakeLists.txt | 6 ---- plugins/systemvolume/CMakeLists.txt | 5 ---- plugins/telephony/CMakeLists.txt | 6 ---- plugins/virtualmonitor/CMakeLists.txt | 6 ---- 45 files changed, 62 insertions(+), 239 deletions(-) diff --git a/KDEConnectMacros.cmake b/KDEConnectMacros.cmake index 6643c862c..8d8c28f44 100644 --- a/KDEConnectMacros.cmake +++ b/KDEConnectMacros.cmake @@ -1,9 +1,17 @@ # SPDX-FileCopyrightText: 2015 Aleix Pol Gonzalez # Redistribution and use is allowed according to the terms of the BSD license. +# Function to create the plugin and generate a logging category for it +function(kdeconnect_add_plugin plugin_name) + kcoreaddons_add_plugin(${plugin_name} ${ARGN} INSTALL_NAMESPACE kdeconnect) -function(kdeconnect_add_plugin) - kcoreaddons_add_plugin(${ARGN} INSTALL_NAMESPACE kdeconnect) + string(REPLACE "kdeconnect_" "" PlUGIN_WITHOUT_PREFIX "${plugin_name}") # For the file name and description, we don't want this + string(TOUPPER "${PlUGIN_WITHOUT_PREFIX}" PLUGIN_UPPER) # The identifier is all capy + ecm_qt_declare_logging_category(${plugin_name} + HEADER plugin_${PlUGIN_WITHOUT_PREFIX}_debug.h + IDENTIFIER KDECONNECT_PLUGIN_${PLUGIN_UPPER} CATEGORY_NAME kdeconnect.plugin.${PlUGIN_WITHOUT_PREFIX} + DEFAULT_SEVERITY Warning + EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (plugin ${PlUGIN_WITHOUT_PREFIX})") endfunction() function(kdeconnect_add_kcm plugin) diff --git a/plugins/battery/CMakeLists.txt b/plugins/battery/CMakeLists.txt index 71068926f..593a90aad 100644 --- a/plugins/battery/CMakeLists.txt +++ b/plugins/battery/CMakeLists.txt @@ -1,10 +1,4 @@ kdeconnect_add_plugin(kdeconnect_battery SOURCES batteryplugin.cpp) - -ecm_qt_declare_logging_category(kdeconnect_battery - HEADER plugin_battery_debug.h - IDENTIFIER KDECONNECT_PLUGIN_BATTERY CATEGORY_NAME kdeconnect.plugin.battery - DEFAULT_SEVERITY Warning - EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (plugin battery)") target_link_libraries(kdeconnect_battery kdeconnectcore Qt::DBus diff --git a/plugins/bigscreen/CMakeLists.txt b/plugins/bigscreen/CMakeLists.txt index 4e6287c28..01ca718f2 100644 --- a/plugins/bigscreen/CMakeLists.txt +++ b/plugins/bigscreen/CMakeLists.txt @@ -1,5 +1,4 @@ kdeconnect_add_plugin(kdeconnect_bigscreen SOURCES bigscreenplugin.cpp) - target_link_libraries(kdeconnect_bigscreen kdeconnectcore kdeconnectinterfaces diff --git a/plugins/bigscreen/bigscreenplugin.cpp b/plugins/bigscreen/bigscreenplugin.cpp index e34dae5c4..c4c739f7f 100644 --- a/plugins/bigscreen/bigscreenplugin.cpp +++ b/plugins/bigscreen/bigscreenplugin.cpp @@ -18,8 +18,6 @@ K_PLUGIN_CLASS_WITH_JSON(BigscreenPlugin, "kdeconnect_bigscreen.json") -Q_LOGGING_CATEGORY(KDECONNECT_PLUGIN_BIGSCREEN, "kdeconnect.plugin.bigscreen") - void BigscreenPlugin::receivePacket(const NetworkPacket &np) { QString message = np.get(QStringLiteral("content")); diff --git a/plugins/clipboard/CMakeLists.txt b/plugins/clipboard/CMakeLists.txt index 576acc470..86874c2c6 100644 --- a/plugins/clipboard/CMakeLists.txt +++ b/plugins/clipboard/CMakeLists.txt @@ -1,11 +1,5 @@ kdeconnect_add_plugin(kdeconnect_clipboard SOURCES clipboardplugin.cpp clipboardlistener.cpp) -ecm_qt_declare_logging_category(kdeconnect_clipboard - HEADER plugin_clipboard_debug.h - IDENTIFIER KDECONNECT_PLUGIN_CLIPBOARD CATEGORY_NAME kdeconnect.plugin.clipboard - DEFAULT_SEVERITY Warning - EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (plugin clipboard)") - target_link_libraries(kdeconnect_clipboard kdeconnectcore Qt::DBus KF${QT_MAJOR_VERSION}::GuiAddons diff --git a/plugins/connectivity-report/CMakeLists.txt b/plugins/connectivity-report/CMakeLists.txt index 8942809bf..e85310d0c 100644 --- a/plugins/connectivity-report/CMakeLists.txt +++ b/plugins/connectivity-report/CMakeLists.txt @@ -1,10 +1,4 @@ kdeconnect_add_plugin(kdeconnect_connectivity_report SOURCES connectivity_reportplugin.cpp) -ecm_qt_declare_logging_category(kdeconnect_connectivity_report - HEADER plugin_connectivity_report_debug.h - IDENTIFIER KDECONNECT_PLUGIN_CONNECTIVITY_REPORT CATEGORY_NAME kdeconnect.plugin.connectivity_report - DEFAULT_SEVERITY Warning - EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (plugin connectivity_report)") - target_link_libraries(kdeconnect_connectivity_report kdeconnectcore Qt::DBus diff --git a/plugins/contacts/CMakeLists.txt b/plugins/contacts/CMakeLists.txt index fe7d03116..9bd0df957 100644 --- a/plugins/contacts/CMakeLists.txt +++ b/plugins/contacts/CMakeLists.txt @@ -1,10 +1,4 @@ kdeconnect_add_plugin(kdeconnect_contacts SOURCES contactsplugin.cpp) -ecm_qt_declare_logging_category(kdeconnect_contacts - HEADER plugin_contacts_debug.h - IDENTIFIER KDECONNECT_PLUGIN_CONTACTS CATEGORY_NAME kdeconnect.plugin.contacts - DEFAULT_SEVERITY Warning - EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (plugin contacts)") - target_link_libraries(kdeconnect_contacts kdeconnectcore Qt::DBus diff --git a/plugins/findmyphone/CMakeLists.txt b/plugins/findmyphone/CMakeLists.txt index 4eb667a82..d1cedbde1 100644 --- a/plugins/findmyphone/CMakeLists.txt +++ b/plugins/findmyphone/CMakeLists.txt @@ -1,9 +1,3 @@ -set(kdeconnect_findmyphone_SRCS - findmyphoneplugin.cpp -) - -kdeconnect_add_plugin(kdeconnect_findmyphone SOURCES ${kdeconnect_findmyphone_SRCS}) - +kdeconnect_add_plugin(kdeconnect_findmyphone SOURCES findmyphoneplugin.cpp) target_link_libraries(kdeconnect_findmyphone kdeconnectcore Qt::Core Qt::DBus) - diff --git a/plugins/findthisdevice/CMakeLists.txt b/plugins/findthisdevice/CMakeLists.txt index eeda6e469..772ffaa3f 100644 --- a/plugins/findthisdevice/CMakeLists.txt +++ b/plugins/findthisdevice/CMakeLists.txt @@ -1,11 +1,5 @@ kdeconnect_add_plugin(kdeconnect_findthisdevice SOURCES findthisdeviceplugin.cpp) -ecm_qt_declare_logging_category(kdeconnect_findthisdevice - HEADER plugin_findthisdevice_debug.h - IDENTIFIER KDECONNECT_PLUGIN_FINDTHISDEVICE CATEGORY_NAME kdeconnect.plugin.findthisdevice - DEFAULT_SEVERITY Warning - EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (plugin findthisdevice)") - target_link_libraries(kdeconnect_findthisdevice kdeconnectcore Qt::Core diff --git a/plugins/lockdevice/CMakeLists.txt b/plugins/lockdevice/CMakeLists.txt index 31cc51d63..1d9b668b3 100644 --- a/plugins/lockdevice/CMakeLists.txt +++ b/plugins/lockdevice/CMakeLists.txt @@ -1,17 +1,10 @@ +kdeconnect_add_plugin(kdeconnect_lockdevice) + if (WIN32) - list(APPEND lockdevice_SRCS lockdeviceplugin-win.cpp) + target_sources(kdeconnect_lockdevice PRIVATE lockdeviceplugin-win.cpp) else () - list(APPEND lockdevice_SRCS lockdeviceplugin.cpp) + target_sources(kdeconnect_lockdevice PRIVATE lockdeviceplugin.cpp) endif() - -kdeconnect_add_plugin(kdeconnect_lockdevice SOURCES ${lockdevice_SRCS}) - -ecm_qt_declare_logging_category(kdeconnect_lockdevice - HEADER plugin_lock_debug.h - IDENTIFIER KDECONNECT_PLUGIN_LOCKREMOTE CATEGORY_NAME kdeconnect.plugin.lock - DEFAULT_SEVERITY Warning - EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (plugin lockremote)") - target_link_libraries(kdeconnect_lockdevice kdeconnectcore kdeconnectinterfaces diff --git a/plugins/lockdevice/lockdeviceplugin-win.cpp b/plugins/lockdevice/lockdeviceplugin-win.cpp index f6695a397..6c7cf9647 100644 --- a/plugins/lockdevice/lockdeviceplugin-win.cpp +++ b/plugins/lockdevice/lockdeviceplugin-win.cpp @@ -8,8 +8,6 @@ #include #include - -#include "plugin_lock_debug.h" #include #include diff --git a/plugins/lockdevice/lockdeviceplugin.cpp b/plugins/lockdevice/lockdeviceplugin.cpp index 0002009dc..282596353 100644 --- a/plugins/lockdevice/lockdeviceplugin.cpp +++ b/plugins/lockdevice/lockdeviceplugin.cpp @@ -9,7 +9,7 @@ #include #include -#include "plugin_lock_debug.h" +#include "plugin_lockdevice_debug.h" #include #include @@ -27,11 +27,11 @@ LockDevicePlugin::LockDevicePlugin(QObject *parent, const QVariantList &args) , m_propertiesInterface(QStringLiteral("org.freedesktop.login1"), QString(), QDBusConnection::systemBus()) { if (!m_login1Interface.isValid()) { - qCWarning(KDECONNECT_PLUGIN_LOCKREMOTE) << "Could not connect to logind interface" << m_login1Interface.lastError(); + qCWarning(KDECONNECT_PLUGIN_LOCKDEVICE) << "Could not connect to logind interface" << m_login1Interface.lastError(); } if (!m_propertiesInterface.isValid()) { - qCWarning(KDECONNECT_PLUGIN_LOCKREMOTE) << "Could not connect to logind properties interface" << m_propertiesInterface.lastError(); + qCWarning(KDECONNECT_PLUGIN_LOCKDEVICE) << "Could not connect to logind properties interface" << m_propertiesInterface.lastError(); } connect(&m_propertiesInterface, diff --git a/plugins/mmtelephony/CMakeLists.txt b/plugins/mmtelephony/CMakeLists.txt index 1b466b784..f9b84c52a 100644 --- a/plugins/mmtelephony/CMakeLists.txt +++ b/plugins/mmtelephony/CMakeLists.txt @@ -1,11 +1,4 @@ kdeconnect_add_plugin(kdeconnect_mmtelephony SOURCES mmtelephonyplugin.cpp) -ecm_qt_declare_logging_category(kdeconnect_mmtelephony - HEADER plugin_mmtelephony_debug.h - IDENTIFIER KDECONNECT_PLUGIN_MMTELEPHONY CATEGORY_NAME kdeconnect.plugin.mmtelephony - DEFAULT_SEVERITY Warning - EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (plugin mmtelephony)") - - target_link_libraries(kdeconnect_mmtelephony kdeconnectcore Qt::DBus diff --git a/plugins/mousepad/abstractremoteinput.cpp b/plugins/mousepad/abstractremoteinput.cpp index 8e57b89b1..2a3e58c03 100644 --- a/plugins/mousepad/abstractremoteinput.cpp +++ b/plugins/mousepad/abstractremoteinput.cpp @@ -6,7 +6,6 @@ #include "abstractremoteinput.h" -Q_LOGGING_CATEGORY(KDECONNECT_PLUGIN_MOUSEPAD, "kdeconnect.plugin.mousepad") AbstractRemoteInput::AbstractRemoteInput(QObject *parent) : QObject(parent) { diff --git a/plugins/mousepad/abstractremoteinput.h b/plugins/mousepad/abstractremoteinput.h index 7cdc9152b..55750c690 100644 --- a/plugins/mousepad/abstractremoteinput.h +++ b/plugins/mousepad/abstractremoteinput.h @@ -9,10 +9,9 @@ #include #include +#include "plugin_mousepad_debug.h" #include -Q_DECLARE_LOGGING_CATEGORY(KDECONNECT_PLUGIN_MOUSEPAD) - class AbstractRemoteInput : public QObject { Q_OBJECT diff --git a/plugins/mpriscontrol/CMakeLists.txt b/plugins/mpriscontrol/CMakeLists.txt index 1c1bc8164..c48f0a54d 100644 --- a/plugins/mpriscontrol/CMakeLists.txt +++ b/plugins/mpriscontrol/CMakeLists.txt @@ -10,12 +10,6 @@ endif() kdeconnect_add_plugin(kdeconnect_mpriscontrol SOURCES ${kdeconnect_mpriscontrol_SRCS}) -ecm_qt_declare_logging_category(kdeconnect_mpriscontrol - HEADER plugin_mpris_debug.h - IDENTIFIER KDECONNECT_PLUGIN_MPRIS CATEGORY_NAME kdeconnect.plugin.mpris - DEFAULT_SEVERITY Warning - EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (plugin mpris)") - if(WIN32) target_link_libraries(kdeconnect_mpriscontrol kdeconnectcore windowsapp) else() diff --git a/plugins/mpriscontrol/mpriscontrolplugin-win.cpp b/plugins/mpriscontrol/mpriscontrolplugin-win.cpp index 411725bfb..70486ebec 100644 --- a/plugins/mpriscontrol/mpriscontrolplugin-win.cpp +++ b/plugins/mpriscontrol/mpriscontrolplugin-win.cpp @@ -5,8 +5,8 @@ */ #include "mpriscontrolplugin-win.h" -#include "plugin_mpris_debug.h" +#include "plugin_mpriscontrol_debug.h" #include #include @@ -37,7 +37,7 @@ std::optional MprisControlPlugin::getPlayerName(GlobalSystemMediaTransp auto entry = std::find(this->playerList.constBegin(), this->playerList.constEnd(), player); if (entry == this->playerList.constEnd()) { - qCWarning(KDECONNECT_PLUGIN_MPRIS) << "PlaybackInfoChanged received for no longer tracked session" << player.SourceAppUserModelId().c_str(); + qCWarning(KDECONNECT_PLUGIN_MPRISCONTROL) << "PlaybackInfoChanged received for no longer tracked session" << player.SourceAppUserModelId().c_str(); return std::nullopt; } @@ -172,7 +172,7 @@ void MprisControlPlugin::updatePlayerList() try { playerName = AppInfo::GetFromAppUserModelId(playerName).DisplayInfo().DisplayName(); } catch (winrt::hresult_error e) { - qCDebug(KDECONNECT_PLUGIN_MPRIS) << QString::fromWCharArray(playerName.c_str()) << "doesn\'t have a valid AppUserModelID! Sending as-is.."; + qCDebug(KDECONNECT_PLUGIN_MPRISCONTROL) << QString::fromWCharArray(playerName.c_str()) << "doesn\'t have a valid AppUserModelID! Sending as-is.."; } #endif QString uniqueName = QString::fromWCharArray(playerName.c_str()); @@ -248,7 +248,7 @@ bool MprisControlPlugin::sendAlbumArt(std::variant const GlobalSystemMediaTransportControlsSession const &player, QString artUrl) { - qWarning(KDECONNECT_PLUGIN_MPRIS) << "Sending Album Art"; + qWarning(KDECONNECT_PLUGIN_MPRISCONTROL) << "Sending Album Art"; NetworkPacket np = packetOrName.index() == 0 ? std::get<0>(packetOrName) : NetworkPacket(PACKET_TYPE_MPRIS); if (packetOrName.index() == 1) np.set(QStringLiteral("player"), std::get<1>(packetOrName)); @@ -320,11 +320,11 @@ void MprisControlPlugin::receivePacket(const NetworkPacket &np) } } if (np.has(QStringLiteral("setVolume"))) { - qWarning(KDECONNECT_PLUGIN_MPRIS) << "Setting volume is not supported"; + qWarning(KDECONNECT_PLUGIN_MPRISCONTROL) << "Setting volume is not supported"; } if (np.has(QStringLiteral("Seek"))) { TimeSpan offset = std::chrono::microseconds(np.get(QStringLiteral("Seek"))); - qWarning(KDECONNECT_PLUGIN_MPRIS) << "Seeking" << offset.count() << "ns to" << name; + qWarning(KDECONNECT_PLUGIN_MPRISCONTROL) << "Seeking" << offset.count() << "ns to" << name; player.TryChangePlaybackPositionAsync((player.GetTimelineProperties().Position() + offset).count()).get(); } diff --git a/plugins/mpriscontrol/mpriscontrolplugin.cpp b/plugins/mpriscontrol/mpriscontrolplugin.cpp index 5519f20cd..79bf39825 100644 --- a/plugins/mpriscontrol/mpriscontrolplugin.cpp +++ b/plugins/mpriscontrol/mpriscontrolplugin.cpp @@ -20,7 +20,7 @@ #include "generated/systeminterfaces/dbusproperties.h" #include "generated/systeminterfaces/mprisplayer.h" #include "generated/systeminterfaces/mprisroot.h" -#include "plugin_mpris_debug.h" +#include "plugin_mpriscontrol_debug.h" K_PLUGIN_CLASS_WITH_JSON(MprisControlPlugin, "kdeconnect_mpriscontrol.json") @@ -61,12 +61,12 @@ void MprisControlPlugin::serviceOwnerChanged(const QString &serviceName, const Q return; if (!oldOwner.isEmpty()) { - qCDebug(KDECONNECT_PLUGIN_MPRIS) << "MPRIS service" << serviceName << "just went offline"; + qCDebug(KDECONNECT_PLUGIN_MPRISCONTROL) << "MPRIS service" << serviceName << "just went offline"; removePlayer(serviceName); } if (!newOwner.isEmpty()) { - qCDebug(KDECONNECT_PLUGIN_MPRIS) << "MPRIS service" << serviceName << "just came online"; + qCDebug(KDECONNECT_PLUGIN_MPRISCONTROL) << "MPRIS service" << serviceName << "just came online"; addPlayer(serviceName); } } @@ -94,7 +94,7 @@ void MprisControlPlugin::addPlayer(const QString &service) connect(player.propertiesInterface(), &OrgFreedesktopDBusPropertiesInterface::PropertiesChanged, this, &MprisControlPlugin::propertiesChanged); connect(player.mediaPlayer2PlayerInterface(), &OrgMprisMediaPlayer2PlayerInterface::Seeked, this, &MprisControlPlugin::seeked); - qCDebug(KDECONNECT_PLUGIN_MPRIS) << "Mpris addPlayer" << service << "->" << uniqueName; + qCDebug(KDECONNECT_PLUGIN_MPRISCONTROL) << "Mpris addPlayer" << service << "->" << uniqueName; sendPlayerList(); } @@ -107,7 +107,7 @@ void MprisControlPlugin::seeked(qlonglong position) return (player.mediaPlayer2PlayerInterface() == mediaPlayer2PlayerInterface); }); if (it == end) { - qCWarning(KDECONNECT_PLUGIN_MPRIS) << "Seeked signal received for no longer tracked service" << mediaPlayer2PlayerInterface->service(); + qCWarning(KDECONNECT_PLUGIN_MPRISCONTROL) << "Seeked signal received for no longer tracked service" << mediaPlayer2PlayerInterface->service(); return; } @@ -127,7 +127,7 @@ void MprisControlPlugin::propertiesChanged(const QString & /*propertyInterface*/ return (player.propertiesInterface() == propertiesInterface); }); if (it == end) { - qCWarning(KDECONNECT_PLUGIN_MPRIS) << "PropertiesChanged signal received for no longer tracked service" << propertiesInterface->service(); + qCWarning(KDECONNECT_PLUGIN_MPRISCONTROL) << "PropertiesChanged signal received for no longer tracked service" << propertiesInterface->service(); return; } @@ -202,12 +202,12 @@ void MprisControlPlugin::removePlayer(const QString &serviceName) return (player.serviceName() == serviceName); }); if (it == end) { - qCWarning(KDECONNECT_PLUGIN_MPRIS) << "Could not find player for serviceName" << serviceName; + qCWarning(KDECONNECT_PLUGIN_MPRISCONTROL) << "Could not find player for serviceName" << serviceName; return; } const QString &playerName = it.key(); - qCDebug(KDECONNECT_PLUGIN_MPRIS) << "Mpris removePlayer" << serviceName << "->" << playerName; + qCDebug(KDECONNECT_PLUGIN_MPRISCONTROL) << "Mpris removePlayer" << serviceName << "->" << playerName; playerList.erase(it); @@ -287,17 +287,17 @@ void MprisControlPlugin::receivePacket(const NetworkPacket &np) } if (np.has(QStringLiteral("setLoopStatus"))) { const QString &loopStatus = np.get(QStringLiteral("setLoopStatus")); - qCDebug(KDECONNECT_PLUGIN_MPRIS) << "Setting loopStatus" << loopStatus << "to" << serviceName; + qCDebug(KDECONNECT_PLUGIN_MPRISCONTROL) << "Setting loopStatus" << loopStatus << "to" << serviceName; mprisInterface.setLoopStatus(loopStatus); } if (np.has(QStringLiteral("setShuffle"))) { bool shuffle = np.get(QStringLiteral("setShuffle")); - qCDebug(KDECONNECT_PLUGIN_MPRIS) << "Setting shuffle" << shuffle << "to" << serviceName; + qCDebug(KDECONNECT_PLUGIN_MPRISCONTROL) << "Setting shuffle" << shuffle << "to" << serviceName; mprisInterface.setShuffle(shuffle); } if (np.has(QStringLiteral("setVolume"))) { double volume = np.get(QStringLiteral("setVolume")) / 100.f; - qCDebug(KDECONNECT_PLUGIN_MPRIS) << "Setting volume" << volume << "to" << serviceName; + qCDebug(KDECONNECT_PLUGIN_MPRISCONTROL) << "Setting volume" << volume << "to" << serviceName; mprisInterface.setVolume(volume); } if (np.has(QStringLiteral("Seek"))) { diff --git a/plugins/mprisremote/CMakeLists.txt b/plugins/mprisremote/CMakeLists.txt index a9d5a70fe..b3be05e09 100644 --- a/plugins/mprisremote/CMakeLists.txt +++ b/plugins/mprisremote/CMakeLists.txt @@ -6,11 +6,6 @@ target_sources(kdeconnect_mprisremote PRIVATE mprisremoteplayermediaplayer2.cpp mprisremoteplayermediaplayer2player.cpp ) -ecm_qt_declare_logging_category(kdeconnect_mprisremote - HEADER plugin_mprisremote_debug.h - IDENTIFIER KDECONNECT_PLUGIN_MPRISREMOTE CATEGORY_NAME kdeconnect.plugin.mprisremote - DEFAULT_SEVERITY Warning - EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (plugin mprisremote)") target_link_libraries(kdeconnect_mprisremote kdeconnectcore Qt::DBus diff --git a/plugins/notifications/CMakeLists.txt b/plugins/notifications/CMakeLists.txt index e0d0ce42a..70b7af2b4 100644 --- a/plugins/notifications/CMakeLists.txt +++ b/plugins/notifications/CMakeLists.txt @@ -1,12 +1,6 @@ kdeconnect_add_plugin(kdeconnect_notifications SOURCES sendreplydialog.cpp notificationsplugin.cpp notification.cpp) ki18n_wrap_ui(kdeconnect_notifications sendreplydialog.ui) -ecm_qt_declare_logging_category(kdeconnect_notifications - HEADER plugin_notification_debug.h - IDENTIFIER KDECONNECT_PLUGIN_NOTIFICATION CATEGORY_NAME kdeconnect.plugin.notification - DEFAULT_SEVERITY Warning - EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (plugin notification)") - target_link_libraries(kdeconnect_notifications kdeconnectcore Qt::DBus diff --git a/plugins/notifications/notification.cpp b/plugins/notifications/notification.cpp index 27fa31e0b..ae24e1020 100644 --- a/plugins/notifications/notification.cpp +++ b/plugins/notifications/notification.cpp @@ -5,7 +5,7 @@ */ #include "notification.h" -#include "plugin_notification_debug.h" +#include "plugin_notifications_debug.h" #include #include @@ -148,7 +148,7 @@ void Notification::loadIcon(const NetworkPacket &np) connect(fileTransferJob, &FileTransferJob::result, this, [this, fileTransferJob] { s_downloadsInProgress.remove(m_iconPath); if (fileTransferJob->error()) { - qCDebug(KDECONNECT_PLUGIN_NOTIFICATION) << "Error in FileTransferJob: " << fileTransferJob->errorString(); + qCDebug(KDECONNECT_PLUGIN_NOTIFICATIONS) << "Error in FileTransferJob: " << fileTransferJob->errorString(); } else { applyIcon(); } diff --git a/plugins/notifications/notificationsplugin.cpp b/plugins/notifications/notificationsplugin.cpp index ee427bc22..925f8e00e 100644 --- a/plugins/notifications/notificationsplugin.cpp +++ b/plugins/notifications/notificationsplugin.cpp @@ -6,7 +6,7 @@ #include "notificationsplugin.h" -#include "plugin_notification_debug.h" +#include "plugin_notifications_debug.h" #include "sendreplydialog.h" #include @@ -31,7 +31,7 @@ void NotificationsPlugin::connected() void NotificationsPlugin::receivePacket(const NetworkPacket &np) { if (np.get(QStringLiteral("request"))) { - qCWarning(KDECONNECT_PLUGIN_NOTIFICATION) << "Unexpected notification request. Maybe the paired client is very old?"; + qCWarning(KDECONNECT_PLUGIN_NOTIFICATIONS) << "Unexpected notification request. Maybe the paired client is very old?"; } if (np.get(QStringLiteral("isCancel"))) { @@ -89,7 +89,7 @@ void NotificationsPlugin::addNotification(Notification *noti) removeNotification(internalId); } - // qCDebug(KDECONNECT_PLUGIN_NOTIFICATION) << "addNotification" << internalId; + // qCDebug(KDECONNECT_PLUGIN_NOTIFICATIONS) << "addNotification" << internalId; connect(noti, &Notification::dismissRequested, this, &NotificationsPlugin::dismissRequested); @@ -114,10 +114,10 @@ void NotificationsPlugin::addNotification(Notification *noti) void NotificationsPlugin::removeNotification(const QString &internalId) { - // qCDebug(KDECONNECT_PLUGIN_NOTIFICATION) << "removeNotification" << internalId; + // qCDebug(KDECONNECT_PLUGIN_NOTIFICATIONS) << "removeNotification" << internalId; if (!m_internalIdToPublicId.contains(internalId)) { - qCDebug(KDECONNECT_PLUGIN_NOTIFICATION) << "Not found noti by internal Id: " << internalId; + qCDebug(KDECONNECT_PLUGIN_NOTIFICATIONS) << "Not found noti by internal Id: " << internalId; return; } @@ -125,7 +125,7 @@ void NotificationsPlugin::removeNotification(const QString &internalId) Notification *noti = m_notifications.take(publicId); if (!noti) { - qCDebug(KDECONNECT_PLUGIN_NOTIFICATION) << "Not found noti by public Id: " << publicId; + qCDebug(KDECONNECT_PLUGIN_NOTIFICATIONS) << "Not found noti by public Id: " << publicId; return; } diff --git a/plugins/pausemusic/CMakeLists.txt b/plugins/pausemusic/CMakeLists.txt index 677b58916..d46ea4983 100644 --- a/plugins/pausemusic/CMakeLists.txt +++ b/plugins/pausemusic/CMakeLists.txt @@ -6,12 +6,6 @@ else() target_sources(kdeconnect_pausemusic PRIVATE pausemusicplugin.cpp) endif() -ecm_qt_declare_logging_category(kdeconnect_pausemusic - HEADER plugin_pausemusic_debug.h - IDENTIFIER KDECONNECT_PLUGIN_PAUSEMUSIC CATEGORY_NAME kdeconnect.plugin.pausemusic - DEFAULT_SEVERITY Warning - EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (plugin pausemusic)") - target_link_libraries(kdeconnect_pausemusic kdeconnectcore kdeconnectinterfaces diff --git a/plugins/photo/CMakeLists.txt b/plugins/photo/CMakeLists.txt index 366e4a550..86aa350cd 100644 --- a/plugins/photo/CMakeLists.txt +++ b/plugins/photo/CMakeLists.txt @@ -1,10 +1,4 @@ kdeconnect_add_plugin(kdeconnect_photo SOURCES photoplugin.cpp) - -ecm_qt_declare_logging_category(kdeconnect_photo - HEADER plugin_photo_debug.h - IDENTIFIER KDECONNECT_PLUGIN_PHOTO CATEGORY_NAME kdeconnect.plugin.photo - DEFAULT_SEVERITY Warning - EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (plugin photo)") target_link_libraries(kdeconnect_photo kdeconnectcore Qt::DBus diff --git a/plugins/ping/CMakeLists.txt b/plugins/ping/CMakeLists.txt index 503717c47..57c89f063 100644 --- a/plugins/ping/CMakeLists.txt +++ b/plugins/ping/CMakeLists.txt @@ -1,11 +1,4 @@ kdeconnect_add_plugin(kdeconnect_ping SOURCES pingplugin.cpp) - -ecm_qt_declare_logging_category(kdeconnect_ping - HEADER plugin_ping_debug.h - IDENTIFIER KDECONNECT_PLUGIN_PING CATEGORY_NAME kdeconnect.plugin.ping - DEFAULT_SEVERITY Warning - EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (plugin ping)") - target_link_libraries(kdeconnect_ping kdeconnectcore Qt::DBus diff --git a/plugins/presenter/CMakeLists.txt b/plugins/presenter/CMakeLists.txt index c436fa78f..f22dce173 100644 --- a/plugins/presenter/CMakeLists.txt +++ b/plugins/presenter/CMakeLists.txt @@ -1,11 +1,6 @@ qt_add_resources(presenter_SRCS assets.qrc) kdeconnect_add_plugin(kdeconnect_presenter SOURCES presenterplugin.cpp ${presenter_SRCS}) -ecm_qt_declare_logging_category(kdeconnect_presenter - HEADER plugin_presenter_debug.h - IDENTIFIER KDECONNECT_PLUGIN_PRESENT CATEGORY_NAME kdeconnect.plugin.presenter - DEFAULT_SEVERITY Warning - EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (plugin presenter)") target_link_libraries(kdeconnect_presenter kdeconnectcore diff --git a/plugins/presenter/presenterplugin.cpp b/plugins/presenter/presenterplugin.cpp index 072702f21..f1c8a25b5 100644 --- a/plugins/presenter/presenterplugin.cpp +++ b/plugins/presenter/presenterplugin.cpp @@ -44,7 +44,7 @@ public: const auto ourErrors = errors(); for (const auto &error : ourErrors) { - qCWarning(KDECONNECT_PLUGIN_PRESENT) << "error" << error.description() << error.url() << error.line() << error.column(); + qCWarning(KDECONNECT_PLUGIN_PRESENTER) << "error" << error.description() << error.url() << error.line() << error.column(); } } }; diff --git a/plugins/remotecommands/CMakeLists.txt b/plugins/remotecommands/CMakeLists.txt index 38d776c90..7940aea5e 100644 --- a/plugins/remotecommands/CMakeLists.txt +++ b/plugins/remotecommands/CMakeLists.txt @@ -1,10 +1,4 @@ kdeconnect_add_plugin(kdeconnect_remotecommands SOURCES remotecommandsplugin.cpp) - -ecm_qt_declare_logging_category(kdeconnect_remotecommands - HEADER plugin_remotecommands_debug.h - IDENTIFIER KDECONNECT_PLUGIN_REMOTECOMMANDS CATEGORY_NAME kdeconnect.plugin.remotecommands - DEFAULT_SEVERITY Warning - EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (plugin remotecommands)") target_link_libraries(kdeconnect_remotecommands kdeconnectcore Qt::DBus diff --git a/plugins/remotecontrol/CMakeLists.txt b/plugins/remotecontrol/CMakeLists.txt index 7a0fdb12f..22f1166f0 100644 --- a/plugins/remotecontrol/CMakeLists.txt +++ b/plugins/remotecontrol/CMakeLists.txt @@ -1,10 +1,4 @@ kdeconnect_add_plugin(kdeconnect_remotecontrol SOURCES remotecontrolplugin.cpp) - -ecm_qt_declare_logging_category(kdeconnect_remotecontrol - HEADER plugin_remotecontrol_debug.h - IDENTIFIER KDECONNECT_PLUGIN_REMOTECONTROL CATEGORY_NAME kdeconnect.plugin.remotecontrol - DEFAULT_SEVERITY Warning - EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (plugin remotecontrol)") target_link_libraries(kdeconnect_remotecontrol kdeconnectcore Qt::DBus diff --git a/plugins/remotekeyboard/CMakeLists.txt b/plugins/remotekeyboard/CMakeLists.txt index be4bb7883..29e106dc8 100644 --- a/plugins/remotekeyboard/CMakeLists.txt +++ b/plugins/remotekeyboard/CMakeLists.txt @@ -1,11 +1,4 @@ kdeconnect_add_plugin(kdeconnect_remotekeyboard SOURCES remotekeyboardplugin.cpp) - -ecm_qt_declare_logging_category(kdeconnect_remotekeyboard - HEADER plugin_remotekeyboard_debug.h - IDENTIFIER KDECONNECT_PLUGIN_REMOTEKEYBOARD CATEGORY_NAME kdeconnect.plugin.remotekeyboard - DEFAULT_SEVERITY Warning - EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (plugin remotekeyboard)") - target_link_libraries(kdeconnect_remotekeyboard kdeconnectcore Qt::DBus diff --git a/plugins/remotesystemvolume/CMakeLists.txt b/plugins/remotesystemvolume/CMakeLists.txt index ce2eb69a0..dd7535da8 100644 --- a/plugins/remotesystemvolume/CMakeLists.txt +++ b/plugins/remotesystemvolume/CMakeLists.txt @@ -1,10 +1,4 @@ kdeconnect_add_plugin(kdeconnect_remotesystemvolume SOURCES remotesystemvolumeplugin.cpp) - -ecm_qt_declare_logging_category(kdeconnect_remotesystemvolume - HEADER plugin_remotesystemvolume_debug.h - IDENTIFIER KDECONNECT_PLUGIN_REMOTESYSTEMVOLUME CATEGORY_NAME kdeconnect.plugin.remotesystemvolume - DEFAULT_SEVERITY Warning - EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (plugin remotesystemvolume)") target_link_libraries(kdeconnect_remotesystemvolume kdeconnectcore Qt::DBus diff --git a/plugins/runcommand/CMakeLists.txt b/plugins/runcommand/CMakeLists.txt index 74e219d4b..6adfe53eb 100644 --- a/plugins/runcommand/CMakeLists.txt +++ b/plugins/runcommand/CMakeLists.txt @@ -1,10 +1,4 @@ kdeconnect_add_plugin(kdeconnect_runcommand SOURCES runcommandplugin.cpp) - -ecm_qt_declare_logging_category(kdeconnect_runcommand - HEADER plugin_runcommand_debug.h - IDENTIFIER KDECONNECT_PLUGIN_RUNCOMMAND CATEGORY_NAME kdeconnect.plugin.runcommand - DEFAULT_SEVERITY Warning - EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (plugin runcommand)") target_link_libraries(kdeconnect_runcommand kdeconnectcore Qt::DBus diff --git a/plugins/screensaver-inhibit/CMakeLists.txt b/plugins/screensaver-inhibit/CMakeLists.txt index 2120575ee..c165f96c5 100644 --- a/plugins/screensaver-inhibit/CMakeLists.txt +++ b/plugins/screensaver-inhibit/CMakeLists.txt @@ -14,13 +14,6 @@ endif() kdeconnect_add_plugin(kdeconnect_screensaver_inhibit SOURCES ${kdeconnect_screensaver_inhibit_SRCS}) - -ecm_qt_declare_logging_category(kdeconnect_screensaver_inhibit - HEADER kdeconnect_screensaverinhibit_debug.h - IDENTIFIER KDECONNECT_PLUGIN_SCREENSAVERINHIBIT CATEGORY_NAME kdeconnect.plugin.screensaverinhibit - DEFAULT_SEVERITY Warning - EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (plugin screensaverinhibit)") - target_link_libraries(kdeconnect_screensaver_inhibit kdeconnectcore kdeconnectinterfaces) if(NOT APPLE AND NOT WIN32) target_link_libraries(kdeconnect_screensaver_inhibit diff --git a/plugins/screensaver-inhibit/screensaverinhibitplugin-macos.cpp b/plugins/screensaver-inhibit/screensaverinhibitplugin-macos.cpp index 95cbfb792..2c68de2a4 100644 --- a/plugins/screensaver-inhibit/screensaverinhibitplugin-macos.cpp +++ b/plugins/screensaver-inhibit/screensaverinhibitplugin-macos.cpp @@ -6,7 +6,7 @@ #include "screensaverinhibitplugin-macos.h" -#include "kdeconnect_screensaverinhibit_debug.h" +#include "plugin_screensaver_inhibit_debug.h" #include K_PLUGIN_CLASS_WITH_JSON(ScreensaverInhibitPlugin, "kdeconnect_screensaver_inhibit.json") @@ -21,7 +21,7 @@ ScreensaverInhibitPlugin::ScreensaverInhibitPlugin(QObject *parent, const QVaria m_caffeinateProcess->setArguments({QStringLiteral("-d")}); // Prevent the display from sleeping m_caffeinateProcess->start(); } else { - qWarning(KDECONNECT_PLUGIN_SCREENSAVERINHIBIT) << "Cannot find caffeinate on macOS install"; + qWarning(KDECONNECT_PLUGIN_SCREENSAVER_INHIBIT) << "Cannot find caffeinate on macOS install"; } } diff --git a/plugins/screensaver-inhibit/screensaverinhibitplugin-win.cpp b/plugins/screensaver-inhibit/screensaverinhibitplugin-win.cpp index 284dd4997..d95860ac2 100644 --- a/plugins/screensaver-inhibit/screensaverinhibitplugin-win.cpp +++ b/plugins/screensaver-inhibit/screensaverinhibitplugin-win.cpp @@ -6,7 +6,6 @@ #include "screensaverinhibitplugin-win.h" -#include "kdeconnect_screensaverinhibit_debug.h" #include #include diff --git a/plugins/screensaver-inhibit/screensaverinhibitplugin.cpp b/plugins/screensaver-inhibit/screensaverinhibitplugin.cpp index ce372fa4f..11d915dfe 100644 --- a/plugins/screensaver-inhibit/screensaverinhibitplugin.cpp +++ b/plugins/screensaver-inhibit/screensaverinhibitplugin.cpp @@ -7,7 +7,6 @@ #include "screensaverinhibitplugin.h" #include "generated/systeminterfaces/screensaver.h" -#include "kdeconnect_screensaverinhibit_debug.h" #include #include #include diff --git a/plugins/sendnotifications/CMakeLists.txt b/plugins/sendnotifications/CMakeLists.txt index 572a9fe59..8c9288183 100644 --- a/plugins/sendnotifications/CMakeLists.txt +++ b/plugins/sendnotifications/CMakeLists.txt @@ -5,11 +5,6 @@ target_sources(kdeconnect_sendnotifications PRIVATE notificationslistener.cpp notifyingapplication.cpp ) -ecm_qt_declare_logging_category(kdeconnect_sendnotifications - HEADER plugin_sendnotification_debug.h - IDENTIFIER KDECONNECT_PLUGIN_SENDNOTIFICATION CATEGORY_NAME kdeconnect.plugin.sendnotification - DEFAULT_SEVERITY Warning - EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (plugin sendnotification)") target_link_libraries(kdeconnect_sendnotifications kdeconnectcore Qt::DBus diff --git a/plugins/sendnotifications/notificationslistener.cpp b/plugins/sendnotifications/notificationslistener.cpp index 058451586..2a37893e1 100644 --- a/plugins/sendnotifications/notificationslistener.cpp +++ b/plugins/sendnotifications/notificationslistener.cpp @@ -25,7 +25,7 @@ #include #include "notifyingapplication.h" -#include "plugin_sendnotification_debug.h" +#include "plugin_sendnotifications_debug.h" #include "sendnotificationsplugin.h" NotificationsListener::NotificationsListener(KdeConnectPlugin *aPlugin) @@ -60,7 +60,7 @@ NotificationsListener::NotificationsListener(KdeConnectPlugin *aPlugin) NotificationsListener::~NotificationsListener() { - qCDebug(KDECONNECT_PLUGIN_SENDNOTIFICATION) << "Destroying NotificationsListener"; + qCDebug(KDECONNECT_PLUGIN_SENDNOTIFICATIONS) << "Destroying NotificationsListener"; g_dbus_connection_remove_filter(m_gdbusConnection, m_gdbusFilterId); g_object_unref(m_gdbusConnection); } @@ -70,7 +70,8 @@ void NotificationsListener::setTranslatedAppName() QString filePath = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QStringLiteral("knotifications5/kdeconnect.notifyrc"), QStandardPaths::LocateFile); if (filePath.isEmpty()) { - qCDebug(KDECONNECT_PLUGIN_SENDNOTIFICATION) << "Couldn't find kdeconnect.notifyrc to hide kdeconnect notifications on the devices. Using default name."; + qCDebug(KDECONNECT_PLUGIN_SENDNOTIFICATIONS) + << "Couldn't find kdeconnect.notifyrc to hide kdeconnect notifications on the devices. Using default name."; m_translatedAppName = QStringLiteral("KDE Connect"); return; } @@ -90,7 +91,7 @@ void NotificationsListener::loadApplications() m_applications.insert(app.name, app); } } - // qCDebug(KDECONNECT_PLUGIN_SENDNOTIFICATION) << "Loaded" << applications.size() << " applications"; + // qCDebug(KDECONNECT_PLUGIN_SENDNOTIFICATIONS) << "Loaded" << applications.size() << " applications"; } bool NotificationsListener::parseImageDataArgument(GVariant *argument, @@ -163,9 +164,9 @@ QSharedPointer NotificationsListener::iconForImageData(GVariant *argu return QSharedPointer(); if (bitsPerSample != 8) { - qCWarning(KDECONNECT_PLUGIN_SENDNOTIFICATION) << "Unsupported image format:" - << "width=" << width << "height=" << height << "rowStride=" << rowStride - << "bitsPerSample=" << bitsPerSample << "channels=" << channels << "hasAlpha=" << hasAlpha; + qCWarning(KDECONNECT_PLUGIN_SENDNOTIFICATIONS) << "Unsupported image format:" + << "width=" << width << "height=" << height << "rowStride=" << rowStride + << "bitsPerSample=" << bitsPerSample << "channels=" << channels << "hasAlpha=" << hasAlpha; return QSharedPointer(); } @@ -175,7 +176,7 @@ QSharedPointer NotificationsListener::iconForImageData(GVariant *argu QSharedPointer buffer = QSharedPointer(new QBuffer); if (!buffer || !buffer->open(QIODevice::WriteOnly) || !image.save(buffer.data(), "PNG")) { - qCWarning(KDECONNECT_PLUGIN_SENDNOTIFICATION) << "Could not initialize image buffer"; + qCWarning(KDECONNECT_PLUGIN_SENDNOTIFICATIONS) << "Could not initialize image buffer"; return QSharedPointer(); } @@ -193,7 +194,7 @@ QSharedPointer NotificationsListener::iconForIconName(const QString & KIconTheme hicolor(QStringLiteral("hicolor")); if (hicolor.isValid()) { iconPath = hicolor.iconPath(iconName + QStringLiteral(".png"), size, KIconLoader::MatchBest); - // qCDebug(KDECONNECT_PLUGIN_SENDNOTIFICATION) << "Found non-png icon in default theme trying fallback to hicolor:" << iconPath; + // qCDebug(KDECONNECT_PLUGIN_SENDNOTIFICATIONS) << "Found non-png icon in default theme trying fallback to hicolor:" << iconPath; } } } @@ -250,7 +251,7 @@ GDBusMessage *NotificationsListener::onMessageFiltered(GDBusConnection *, GDBusM for (const auto &a : std::as_const(listener->m_applications)) list << QVariant::fromValue(a); listener->m_plugin->config()->setList(QStringLiteral("applications"), list); - // qCDebug(KDECONNECT_PLUGIN_SENDNOTIFICATION) << "Added new application to config:" << app; + // qCDebug(KDECONNECT_PLUGIN_SENDNOTIFICATIONS) << "Added new application to config:" << app; } else { app = listener->m_applications.value(appName); } @@ -308,7 +309,7 @@ GDBusMessage *NotificationsListener::onMessageFiltered(GDBusConnection *, GDBusM variant = g_variant_get_child_value(bodyVariant, 1); const unsigned replacesId = g_variant_get_uint32(variant); - // qCDebug(KDECONNECT_PLUGIN_SENDNOTIFICATION) << "Sending notification from" << appName << ":" < 0 ? replacesId : ++id)}, {QStringLiteral("appName"), appName}, @@ -342,9 +343,9 @@ GDBusMessage *NotificationsListener::onMessageFiltered(GDBusConnection *, GDBusM listener->m_plugin->sendPacket(np); - qCDebug(KDECONNECT_PLUGIN_SENDNOTIFICATION) << "Got notification appName=" << appName << "replacesId=" << replacesId << "appIcon=" << appIcon - << "summary=" << ticker << "body=" << body << "hints=" << hints.size() << "urgency=" << urgency - << "timeout=" << timeout; + qCDebug(KDECONNECT_PLUGIN_SENDNOTIFICATIONS) << "Got notification appName=" << appName << "replacesId=" << replacesId << "appIcon=" << appIcon + << "summary=" << ticker << "body=" << body << "hints=" << hints.size() << "urgency=" << urgency + << "timeout=" << timeout; return nullptr; } diff --git a/plugins/sendnotifications/sendnotificationsplugin.cpp b/plugins/sendnotifications/sendnotificationsplugin.cpp index f2c6237d5..44b807978 100644 --- a/plugins/sendnotifications/sendnotificationsplugin.cpp +++ b/plugins/sendnotifications/sendnotificationsplugin.cpp @@ -7,7 +7,6 @@ #include "sendnotificationsplugin.h" #include "notificationslistener.h" -#include "plugin_sendnotification_debug.h" #include diff --git a/plugins/sftp/CMakeLists.txt b/plugins/sftp/CMakeLists.txt index a83de2490..c947a6404 100644 --- a/plugins/sftp/CMakeLists.txt +++ b/plugins/sftp/CMakeLists.txt @@ -15,12 +15,6 @@ else() endif() kdeconnect_add_plugin(kdeconnect_sftp SOURCES ${kdeconnect_sftp_SRCS}) -ecm_qt_declare_logging_category(kdeconnect_sftp - HEADER plugin_sftp_debug.h - IDENTIFIER KDECONNECT_PLUGIN_SFTP CATEGORY_NAME kdeconnect.plugin.sftp - DEFAULT_SEVERITY Warning - EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (plugin sftp)") - target_link_libraries(kdeconnect_sftp kdeconnectcore Qt::DBus diff --git a/plugins/share/CMakeLists.txt b/plugins/share/CMakeLists.txt index c2c890d3a..2a73555f2 100644 --- a/plugins/share/CMakeLists.txt +++ b/plugins/share/CMakeLists.txt @@ -1,13 +1,4 @@ kdeconnect_add_plugin(kdeconnect_share SOURCES shareplugin.cpp) - -ecm_qt_declare_logging_category(kdeconnect_share - HEADER plugin_share_debug.h - IDENTIFIER KDECONNECT_PLUGIN_SHARE - CATEGORY_NAME kdeconnect.plugin.share - DEFAULT_SEVERITY Warning - EXPORT kdeconnect-kde - DESCRIPTION "kdeconnect (plugin share)" -) target_link_libraries(kdeconnect_share kdeconnectcore Qt::DBus @@ -18,11 +9,7 @@ target_link_libraries(kdeconnect_share KF${QT_MAJOR_VERSION}::Service ) -####################################### -# Config - kdeconnect_add_kcm(kdeconnect_share_config SOURCES share_config.cpp) - ki18n_wrap_ui(kdeconnect_share_config share_config.ui) target_link_libraries(kdeconnect_share_config kdeconnectpluginkcm diff --git a/plugins/sms/CMakeLists.txt b/plugins/sms/CMakeLists.txt index 85e926b01..691809bcf 100644 --- a/plugins/sms/CMakeLists.txt +++ b/plugins/sms/CMakeLists.txt @@ -5,12 +5,6 @@ target_sources(kdeconnect_sms PRIVATE conversationsdbusinterface.cpp requestconversationworker.cpp ) -ecm_qt_declare_logging_category(kdeconnect_sms - 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(kdeconnect_sms HEADER kdeconnect_conversations_debug.h IDENTIFIER KDECONNECT_CONVERSATIONS CATEGORY_NAME kdeconnect.conversations diff --git a/plugins/systemvolume/CMakeLists.txt b/plugins/systemvolume/CMakeLists.txt index 6c835b2cf..fc3b72e8d 100644 --- a/plugins/systemvolume/CMakeLists.txt +++ b/plugins/systemvolume/CMakeLists.txt @@ -14,11 +14,6 @@ endif() kdeconnect_add_plugin(kdeconnect_systemvolume SOURCES ${kdeconnect_systemvolume_SRCS}) -ecm_qt_declare_logging_category(kdeconnect_systemvolume - HEADER plugin_systemvolume_debug.h - IDENTIFIER KDECONNECT_PLUGIN_SYSTEMVOLUME CATEGORY_NAME kdeconnect.plugin.systemvolume - DEFAULT_SEVERITY Warning - EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (plugin systemvolume)") if(WIN32) target_link_libraries(kdeconnect_systemvolume kdeconnectcore diff --git a/plugins/telephony/CMakeLists.txt b/plugins/telephony/CMakeLists.txt index dd17032fa..a9ae57916 100644 --- a/plugins/telephony/CMakeLists.txt +++ b/plugins/telephony/CMakeLists.txt @@ -1,10 +1,4 @@ kdeconnect_add_plugin(kdeconnect_telephony SOURCES telephonyplugin.cpp) - -ecm_qt_declare_logging_category(kdeconnect_telephony - HEADER plugin_telephony_debug.h - IDENTIFIER KDECONNECT_PLUGIN_TELEPHONY CATEGORY_NAME kdeconnect.plugin.telephony - DEFAULT_SEVERITY Warning - EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (plugin telephony)") target_link_libraries(kdeconnect_telephony kdeconnectcore KF${QT_MAJOR_VERSION}::I18n diff --git a/plugins/virtualmonitor/CMakeLists.txt b/plugins/virtualmonitor/CMakeLists.txt index 5ed62e1be..6da9fb886 100644 --- a/plugins/virtualmonitor/CMakeLists.txt +++ b/plugins/virtualmonitor/CMakeLists.txt @@ -1,10 +1,4 @@ kdeconnect_add_plugin(kdeconnect_virtualmonitor SOURCES virtualmonitorplugin.cpp) -ecm_qt_declare_logging_category(kdeconnect_virtualmonitor - HEADER plugin_virtualmonitor_debug.h - IDENTIFIER KDECONNECT_PLUGIN_VIRTUALMONITOR CATEGORY_NAME kdeconnect.plugin.virtualmonitor - DEFAULT_SEVERITY Warning - EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (plugin virtualmonitor)") - target_link_libraries(kdeconnect_virtualmonitor kdeconnectcore Qt::Core