Commit aa357903 authored by Stefan Brüns's avatar Stefan Brüns
Browse files

[kio/mtp] Use ecm_qt_declare_logging_category

parent 151250dc
......@@ -14,6 +14,12 @@ add_library(kio_mtp MODULE ${kio_mtp_PART_SRCS} )
target_link_libraries(kio_mtp kmtp Qt5::Core KF5::KIOCore KF5::I18n KF5::DBusAddons)
set_target_properties(kio_mtp PROPERTIES OUTPUT_NAME "mtp")
ecm_qt_declare_logging_category(kio_mtp
HEADER kio_mtp_debug.h
IDENTIFIER LOG_KIO_MTP
CATEGORY_NAME kde.kio-mtp
)
install(TARGETS kio_mtp DESTINATION ${KDE_INSTALL_PLUGINDIR}/kf5/kio)
########### install files ###############
......
......@@ -7,6 +7,7 @@
*/
#include "kio_mtp.h"
#include "kio_mtp_debug.h"
// #include <KComponentData>
#include <QTemporaryFile>
......@@ -89,8 +90,6 @@ static QString convertPath(const QString &slavePath)
///////////////////////////// Slave Implementation ///////////////////////////
//////////////////////////////////////////////////////////////////////////////
Q_LOGGING_CATEGORY(LOG_KIO_MTP, "kde.kio-mtp")
extern "C"
int Q_DECL_EXPORT kdemain(int argc, char **argv)
{
......
......@@ -22,7 +22,6 @@
// #include <QCache>
#include <QUrl>
#include <QLoggingCategory>
#define MAX_XFER_BUF_SIZE 16348
#define KIO_MTP 7000
......@@ -34,8 +33,6 @@ class KMTPFile;
using namespace KIO;
Q_DECLARE_LOGGING_CATEGORY(LOG_KIO_MTP)
class MTPSlave : public QObject, public KIO::SlaveBase
{
Q_OBJECT
......
......@@ -16,4 +16,10 @@ kcoreaddons_add_plugin(kmtpd INSTALL_NAMESPACE "kf5/kiod" JSON kmtpd.json SOURCE
target_link_libraries(kmtpd ${MTP_LIBRARIES} kmtp Qt5::Core KF5::CoreAddons KF5::DBusAddons KF5::Solid)
ecm_qt_declare_logging_category(kmtpd
HEADER kiod_kmtpd_debug.h
IDENTIFIER LOG_KIOD_KMTPD
CATEGORY_NAME kf5.kiod.kmtpd
)
kdbusaddons_generate_dbus_service_file(kiod5 org.kde.kmtp.daemon ${KDE_INSTALL_FULL_LIBEXECDIR_KF5})
......@@ -16,11 +16,10 @@
#include <Solid/DeviceNotifier>
#include "daemonadaptor.h"
#include "kiod_kmtpd_debug.h"
K_PLUGIN_CLASS_WITH_JSON(KMTPd, "kmtpd.json")
Q_LOGGING_CATEGORY(LOG_KIOD_KMTPD, "kf5.kiod.kmtpd")
KMTPd::KMTPd(QObject *parent, const QList<QVariant> &parameters)
: KDEDModule(parent)
{
......
......@@ -16,8 +16,6 @@
#include "mtpdevice.h"
Q_DECLARE_LOGGING_CATEGORY(LOG_KIOD_KMTPD)
class KMTPd : public KDEDModule
{
Q_OBJECT
......
......@@ -15,6 +15,7 @@
#include <Solid/DeviceNotifier>
#include "mtpstorage.h"
#include "kiod_kmtpd_debug.h"
// D-Bus adaptors
#include "deviceadaptor.h"
......
......@@ -12,9 +12,6 @@
#include <libmtp.h>
#include <QDBusObjectPath>
#include <QLoggingCategory>
Q_DECLARE_LOGGING_CATEGORY(LOG_KIOD_KMTPD)
class MTPStorage;
......
......@@ -11,6 +11,7 @@
#include <QDateTime>
#include <qplatformdefs.h>
#include "kiod_kmtpd_debug.h"
#include "mtpdevice.h"
#include "storageadaptor.h"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment