Git commit f5449a05a6e7fda8a00ace21bc7401ed33712a80 by Weng Xuetian. Committed on 23/02/2016 at 22:57. Pushed by xuetianweng into branch 'master'. Don't force reload profile when battery status changes using refreshStatus is not necessary for such use cases, loadProfile would be enough, otherwise it may reset status under certain circumstances. For example, it is possible that battery discharges under heavy load even when AC plugged for some laptop models. When this happens, the AC profile will be forced reloaded again and again thus brightness level is also being reset to the profile level. REVIEW: 127160 M +2 -2 daemon/powerdevilcore.cpp http://commits.kde.org/powerdevil/f5449a05a6e7fda8a00ace21bc7401ed33712a80 diff --git a/daemon/powerdevilcore.cpp b/daemon/powerdevilcore.cpp index 3630541..f02d474 100644 --- a/daemon/powerdevilcore.cpp +++ b/daemon/powerdevilcore.cpp @@ -569,7 +569,7 @@ void Core::onBatteryChargePercentChanged(int percent, c= onst QString &udi) if (currentPercent < previousPercent) { if (emitBatteryChargePercentNotification(currentPercent, previousP= ercent)) { // Only refresh status if a notification has actually been emi= tted - refreshStatus(); + loadProfile(); } } } @@ -600,7 +600,7 @@ void Core::onBatteryChargeStateChanged(int state, const= QString &udi) = if (!previousCharged && currentCharged) { emitRichNotification("fullbattery", i18n("Charge Complete"), i18n(= "Your battery is now fully charged.")); - refreshStatus(); + loadProfile(); } } =20