Port battery away from kDebug

This commit is contained in:
Àlex Fiestas 2014-09-22 00:44:17 +02:00
parent 3f24ccd39a
commit 9e3d1dc851
3 changed files with 7 additions and 2 deletions

View file

@ -19,7 +19,9 @@
*/
#include "batterydbusinterface.h"
#include "batteryplugin.h"
#include <QDebug>
#include <core/device.h>
#include <core/kdebugnamespace.h>
@ -30,7 +32,7 @@ BatteryDbusInterface::BatteryDbusInterface(const Device *device)
BatteryDbusInterface::~BatteryDbusInterface()
{
kDebug(debugArea()) << "Destroying BatteryDbusInterface";
qCDebug(KDECONNECT_PLUGING_BATTERY) << "Destroying BatteryDbusInterface";
}
void BatteryDbusInterface::updateValues(bool isCharging, int currentCharge)

View file

@ -24,12 +24,13 @@
#include <QIcon>
#include <KLocalizedString>
#include <core/kdebugnamespace.h>
#include "batterydbusinterface.h"
K_PLUGIN_FACTORY( KdeConnectPluginFactory, registerPlugin< BatteryPlugin >(); )
K_EXPORT_PLUGIN( KdeConnectPluginFactory("kdeconnect_battery", "kdeconnect-plugins") )
Q_LOGGING_CATEGORY(KDECONNECT_PLUGING_BATTERY, "kdeconnect.plugin.battery")
BatteryPlugin::BatteryPlugin(QObject *parent, const QVariantList &args)
: KdeConnectPlugin(parent, args)
, batteryDbusInterface(new BatteryDbusInterface(device()))

View file

@ -21,10 +21,12 @@
#ifndef BATTERYPLUGIN_H
#define BATTERYPLUGIN_H
#include <QLoggingCategory>
#include <core/kdeconnectplugin.h>
#define PACKAGE_TYPE_BATTERY QLatin1String("kdeconnect.battery")
Q_DECLARE_LOGGING_CATEGORY(KDECONNECT_PLUGING_BATTERY)
class BatteryDbusInterface;
class BatteryPlugin