Remove kdebugnamespace completely and replace by core_debug

In those places that belong to "core" we use core_debug, in any other
place we have added custom logging categories so we use those instead.
This commit is contained in:
Àlex Fiestas 2014-09-22 00:59:34 +02:00
parent e949bcf19f
commit d971269bd5
17 changed files with 18 additions and 33 deletions

View file

@ -19,6 +19,7 @@
*/ */
#include "landevicelink.h" #include "landevicelink.h"
#include "core_debug.h"
#include <sys/socket.h> #include <sys/socket.h>
#include <netinet/in.h> #include <netinet/in.h>

View file

@ -19,6 +19,7 @@
*/ */
#include "lanlinkprovider.h" #include "lanlinkprovider.h"
#include "core_debug.h"
#include <sys/socket.h> #include <sys/socket.h>
#include <netinet/in.h> #include <netinet/in.h>
@ -29,7 +30,6 @@
#include <QTcpServer> #include <QTcpServer>
#include <QUdpSocket> #include <QUdpSocket>
#include "../../kdebugnamespace.h"
#include "landevicelink.h" #include "landevicelink.h"
void LanLinkProvider::configureSocket(QTcpSocket* socket) void LanLinkProvider::configureSocket(QTcpSocket* socket)
@ -151,7 +151,6 @@ void LanLinkProvider::connectError()
disconnect(socket, SIGNAL(error(QAbstractSocket::SocketError)), this, SLOT(connectError())); disconnect(socket, SIGNAL(error(QAbstractSocket::SocketError)), this, SLOT(connectError()));
disconnect(socket, SIGNAL(connected()), this, SLOT(connected())); disconnect(socket, SIGNAL(connected()), this, SLOT(connected()));
qCDebug(KDECONNECT_CORE) << "Fallback (1), try reverse connection";
NetworkPackage np(""); NetworkPackage np("");
NetworkPackage::createIdentityPackage(&np); NetworkPackage::createIdentityPackage(&np);
np.set("tcpPort", mTcpPort); np.set("tcpPort", mTcpPort);

View file

@ -20,8 +20,8 @@
#include <qalgorithms.h> #include <qalgorithms.h>
#include "kdebugnamespace.h"
#include "uploadjob.h" #include "uploadjob.h"
#include "core_debug.h"
UploadJob::UploadJob(const QSharedPointer<QIODevice>& source): KJob() UploadJob::UploadJob(const QSharedPointer<QIODevice>& source): KJob()
{ {

View file

@ -20,7 +20,7 @@
#include "loopbacklinkprovider.h" #include "loopbacklinkprovider.h"
#include "kdebugnamespace.h" #include "core_debug.h"
LoopbackLinkProvider::LoopbackLinkProvider() LoopbackLinkProvider::LoopbackLinkProvider()
: identityPackage(PACKAGE_TYPE_IDENTITY) : identityPackage(PACKAGE_TYPE_IDENTITY)

View file

@ -1,6 +1,5 @@
/** /**
* Copyright 2013 Albert Vaca <albertvaka@gmail.com> * Copyright 2013 Albert Vaca <albertvaka@gmail.com>
* Copyright 2014 Alejandro Fiestas Olivares <afiestas@kde.org>
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as * modify it under the terms of the GNU General Public License as
@ -19,21 +18,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef QDEBUG_KDECONNECT_CORE_H #ifndef CORE_DEBUG_H
#define QDEBUG_KDECONNECT_CORE_H #define CORE_DEBUG_H
#include <QLoggingCategory> #include <QLoggingCategory>
Q_DECLARE_LOGGING_CATEGORY(KDECONNECT_CORE) Q_DECLARE_LOGGING_CATEGORY(KDECONNECT_CORE)
//Just until we port everything to qCDebug #endif //CORE_DEBUG_H
#include <KDebug>
#include <kdemacros.h>
inline int debugArea()
{
static int theArea = KDebug::registerArea("kdeconnect");
return theArea;
};
#endif

View file

@ -32,7 +32,7 @@
#include <KConfigGroup> #include <KConfigGroup>
#include <KStandardDirs> #include <KStandardDirs>
#include "kdebugnamespace.h" #include "core_debug.h"
#include "networkpackage.h" #include "networkpackage.h"
#include "backends/lan/lanlinkprovider.h" #include "backends/lan/lanlinkprovider.h"
#include "backends/loopback/loopbacklinkprovider.h" #include "backends/loopback/loopbacklinkprovider.h"
@ -41,6 +41,7 @@
#include "backends/devicelink.h" #include "backends/devicelink.h"
#include "backends/linkprovider.h" #include "backends/linkprovider.h"
#include <QDebug>
struct DaemonPrivate struct DaemonPrivate
{ {
//Different ways to find devices and connect to them //Different ways to find devices and connect to them

View file

@ -37,7 +37,7 @@
#include <KGlobal> #include <KGlobal>
#include <KComponentData> #include <KComponentData>
#include "kdebugnamespace.h" #include "core_debug.h"
#include "kdeconnectplugin.h" #include "kdeconnectplugin.h"
#include "pluginloader.h" #include "pluginloader.h"
#include "backends/devicelink.h" #include "backends/devicelink.h"

View file

@ -19,15 +19,15 @@
*/ */
#include "filetransferjob.h" #include "filetransferjob.h"
#include <core_debug.h>
#include <qalgorithms.h> #include <qalgorithms.h>
#include <QFileInfo> #include <QFileInfo>
#include <QDebug>
#include <KIO/RenameDialog> #include <KIO/RenameDialog>
#include <KLocalizedString> #include <KLocalizedString>
#include "kdebugnamespace.h"
FileTransferJob::FileTransferJob(const QSharedPointer<QIODevice>& origin, int size, const QUrl &destination): KJob() FileTransferJob::FileTransferJob(const QSharedPointer<QIODevice>& origin, int size, const QUrl &destination): KJob()
{ {
Q_ASSERT(destination.isLocalFile()); Q_ASSERT(destination.isLocalFile());
@ -105,7 +105,7 @@ void FileTransferJob::renameDone(int result)
break; break;
} }
default: default:
kWarning() << "Unknown Error"; qCWarning(KDECONNECT_CORE()) << "Unknown Error";
emitResult(); emitResult();
} }

View file

@ -19,6 +19,7 @@
*/ */
#include "kdeconnectplugin.h" #include "kdeconnectplugin.h"
#include <QDebug>
struct KdeConnectPluginPrivate struct KdeConnectPluginPrivate
{ {

View file

@ -19,6 +19,7 @@
*/ */
#include "networkpackage.h" #include "networkpackage.h"
#include "core_debug.h"
#include <KSharedConfig> #include <KSharedConfig>
#include <KConfigGroup> #include <KConfigGroup>
@ -32,6 +33,7 @@
#include <QDateTime> #include <QDateTime>
#include <qjsondocument.h> #include <qjsondocument.h>
#include <QtCrypto> #include <QtCrypto>
#include <QDebug>
#include "filetransferjob.h" #include "filetransferjob.h"

View file

@ -33,7 +33,6 @@
#include <QUrl> #include <QUrl>
#include "kdeconnectcore_export.h" #include "kdeconnectcore_export.h"
#include "kdebugnamespace.h"
#include "default_args.h" #include "default_args.h"
class FileTransferJob; class FileTransferJob;

View file

@ -22,7 +22,7 @@
#include <KServiceTypeTrader> #include <KServiceTypeTrader>
#include "kdebugnamespace.h" #include "core_debug.h"
#include "device.h" #include "device.h"
#include "kdeconnectplugin.h" #include "kdeconnectplugin.h"

View file

@ -33,8 +33,6 @@
#include <k4aboutdata.h> #include <k4aboutdata.h>
#include <kdemacros.h> #include <kdemacros.h>
#include <core/kdebugnamespace.h>
Q_LOGGING_CATEGORY(KDECONNECT_KIO, "kdeconnect.kio") Q_LOGGING_CATEGORY(KDECONNECT_KIO, "kdeconnect.kio")
extern "C" int KDE_EXPORT kdemain(int argc, char **argv) extern "C" int KDE_EXPORT kdemain(int argc, char **argv)

View file

@ -23,7 +23,6 @@
#include <QDebug> #include <QDebug>
#include <core/device.h> #include <core/device.h>
#include <core/kdebugnamespace.h>
BatteryDbusInterface::BatteryDbusInterface(const Device *device) BatteryDbusInterface::BatteryDbusInterface(const Device *device)
: QDBusAbstractAdaptor(const_cast<Device*>(device)) : QDBusAbstractAdaptor(const_cast<Device*>(device))

View file

@ -28,7 +28,7 @@
Q_DECLARE_LOGGING_CATEGORY(KDECONNECT_PLUGIN_PING) Q_DECLARE_LOGGING_CATEGORY(KDECONNECT_PLUGIN_PING)
class KDE_EXPORT PingPlugin class Q_DECL_EXPORT PingPlugin
: public KdeConnectPlugin : public KdeConnectPlugin
{ {
Q_OBJECT Q_OBJECT

View file

@ -23,8 +23,6 @@
#include <QFile> #include <QFile>
#include <core/kdebugnamespace.h>
class AutoClosingQFile : public QFile class AutoClosingQFile : public QFile
{ {
Q_OBJECT Q_OBJECT

View file

@ -27,8 +27,6 @@
#include <KUrlRequester> #include <KUrlRequester>
#include <KAboutData> #include <KAboutData>
#include <core/kdebugnamespace.h>
#include "ui_share_config.h" #include "ui_share_config.h"
K_PLUGIN_FACTORY(ShareConfigFactory, registerPlugin<ShareConfig>();) K_PLUGIN_FACTORY(ShareConfigFactory, registerPlugin<ShareConfig>();)