Code style fixes

This commit is contained in:
Albert Vaca 2013-08-18 18:06:56 +02:00
parent 0eb3f019c9
commit d3aba3572b
4 changed files with 7 additions and 5 deletions

View file

@ -52,7 +52,7 @@ void TcpDeviceLink::dataReceived()
NetworkPackage np("");
NetworkPackage::unserialize(package, &np);
emit receivedPackage(np);
Q_EMIT receivedPackage(np);
}
}

View file

@ -44,8 +44,8 @@ Q_SIGNALS:
Q_SCRIPTABLE void chargingChange();
private:
bool mIsCharging;
int mCharge;
bool mIsCharging : 1;
};

View file

@ -31,10 +31,9 @@ K_EXPORT_PLUGIN( KdeConnectPluginFactory("kdeconnect_battery", "kdeconnect_batte
BatteryPlugin::BatteryPlugin(QObject *parent, const QVariantList &args)
: KdeConnectPlugin(parent, args)
, batteryDbusInterface(new BatteryDbusInterface(parent))
{
batteryDbusInterface = new BatteryDbusInterface(parent);
NetworkPackage np(PACKAGE_TYPE_BATTERY);
np.set("request",true);
device()->sendPackage(np);
@ -61,7 +60,8 @@ bool BatteryPlugin::receivePackage(const NetworkPackage& np)
bool isCharging = np.get<bool>("isCharging");
int currentCharge = np.get<int>("currentCharge");
if (batteryDbusInterface->isCharging() != currentCharge || batteryDbusInterface->isCharging() != isCharging) {
if (batteryDbusInterface->isCharging() != currentCharge
|| batteryDbusInterface->isCharging() != isCharging) {
batteryDbusInterface->updateValues(isCharging, currentCharge);

View file

@ -56,6 +56,8 @@ KNotification* TelephonyPlugin::createNotification(const NetworkPackage& np)
+ np.get<QString>("phoneNumber","unknown number")
+ ":\n"
+ np.get<QString>("messageBody","");
} else if (event == "talking") {
return NULL;
} else {
//TODO: return NULL if !debug
type = "unknownEvent";