mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-07-31 08:44:45 +00:00
Fix: Changing the power settings does not take effect in time.
This commit is contained in:
parent
45ee6df973
commit
a1f8938fbc
1 changed files with 6 additions and 0 deletions
|
|
@ -10,6 +10,8 @@
|
||||||
#include <KSharedConfig>
|
#include <KSharedConfig>
|
||||||
|
|
||||||
#include <Solid/Battery>
|
#include <Solid/Battery>
|
||||||
|
#include <QDBusConnection>
|
||||||
|
#include <QDBusPendingCall>
|
||||||
|
|
||||||
K_PLUGIN_CLASS_WITH_JSON(MobilePower, "kcm_mobile_power.json")
|
K_PLUGIN_CLASS_WITH_JSON(MobilePower, "kcm_mobile_power.json")
|
||||||
|
|
||||||
|
|
@ -120,6 +122,10 @@ void MobilePower::save()
|
||||||
lowBatteryGroup.group("SuspendAndShutdown").writeEntry("AutoSuspendIdleTimeoutSec", m_suspendSessionTime, KConfigGroup::Notify);
|
lowBatteryGroup.group("SuspendAndShutdown").writeEntry("AutoSuspendIdleTimeoutSec", m_suspendSessionTime, KConfigGroup::Notify);
|
||||||
|
|
||||||
m_profilesConfig->sync();
|
m_profilesConfig->sync();
|
||||||
|
|
||||||
|
QDBusMessage call =
|
||||||
|
QDBusMessage::createMethodCall("org.kde.Solid.PowerManagement", "/org/kde/Solid/PowerManagement", "org.kde.Solid.PowerManagement", "refreshStatus");
|
||||||
|
QDBusConnection::sessionBus().asyncCall(call);
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList MobilePower::timeOptions() const
|
QStringList MobilePower::timeOptions() const
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue