Commit 2f5c5db7 authored by Àlex Fiestas's avatar Àlex Fiestas

Property is OnBattery not onBattery

parent 2c1c0eb4
......@@ -70,7 +70,7 @@ void FakeUpower::setOnBattery(bool onBattery)
{
m_onBattery = onBattery;
emitPropertiesChanged(QStringLiteral("onBattery"), m_onBattery);
emitPropertiesChanged(QStringLiteral("OnBattery"), m_onBattery);
}
void FakeUpower::emitPropertiesChanged(const QString& name, const QVariant& value)
......
......@@ -39,12 +39,13 @@ Solid::FDPowerNotifier::FDPowerNotifier(QObject* parent): PowerNotifier(parent)
void Solid::FDPowerNotifier::propertiesChanged(const QString &interface, const QVariantMap &changedProperties, const QStringList &invalidated)
{
if (interface != QStringLiteral("org.freedesktop.UPower")) {
return;
}
if (changedProperties.contains(QStringLiteral("onBattery"))) {
Q_EMIT acPluggedChanged(!changedProperties.value(QStringLiteral("onBattery")).toBool());
if (changedProperties.contains(QStringLiteral("OnBattery"))) {
Q_EMIT acPluggedChanged(!changedProperties.value(QStringLiteral("OnBattery")).toBool());
}
//Just for debug purposes
......
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