Commit 271bdc25 authored by ivan tkachenko's avatar ivan tkachenko Committed by Nate Graham
Browse files

[dataengines/powermanagement] Factor out setting data.Battery.Sources

In other places both properties are being set unconditionally, so this
patch just aligns it to other code. Also, possibly fixing scenario
where the Sources property might de-synchronize because the code
conditionally skipped updating it.
parent 190d72b1
......@@ -237,9 +237,9 @@ bool PowermanagementEngine::sourceRequestEvent(const QString &name)
setData(QStringLiteral("Battery"), QStringLiteral("Sources"), batterySources);
setData(QStringLiteral("Battery"), QStringLiteral("Has Battery"), !batterySources.isEmpty());
if (!batterySources.isEmpty()) {
setData(QStringLiteral("Battery"), QStringLiteral("Sources"), batterySources);
QDBusMessage msg = QDBusMessage::createMethodCall(SOLID_POWERMANAGEMENT_SERVICE,
Supports Markdown
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