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 "core_debug.h"
#include <sys/socket.h>
#include <netinet/in.h>

View file

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

View file

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

View file

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

View file

@ -1,6 +1,5 @@
/**
* 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
* 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/>.
*/
#ifndef QDEBUG_KDECONNECT_CORE_H
#define QDEBUG_KDECONNECT_CORE_H
#ifndef CORE_DEBUG_H
#define CORE_DEBUG_H
#include <QLoggingCategory>
Q_DECLARE_LOGGING_CATEGORY(KDECONNECT_CORE)
//Just until we port everything to qCDebug
#include <KDebug>
#include <kdemacros.h>
inline int debugArea()
{
static int theArea = KDebug::registerArea("kdeconnect");
return theArea;
};
#endif
#endif //CORE_DEBUG_H

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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