----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/127263/#review93324 -----------------------------------------------------------
I still haven't actually tried/compiled it because of this stupid no keyword stuff daemon/actions/bundled/org.kde.Solid.PowerManagement.Actions.WirelessPowerSaving.xml (lines 1 - 14) <https://git.reviewboard.kde.org/r/127263/#comment63634> What is this used for? daemon/actions/bundled/wirelesspowersaving.h (lines 49 - 57) <https://git.reviewboard.kde.org/r/127263/#comment63645> override instead of virtual daemon/actions/bundled/wirelesspowersaving.h (line 53) <https://git.reviewboard.kde.org/r/127263/#comment63646> const QVariantMap &args daemon/actions/bundled/wirelesspowersaving.h (lines 72 - 84) <https://git.reviewboard.kde.org/r/127263/#comment63644> Default initialize those daemon/actions/bundled/wirelesspowersaving.cpp (lines 134 - 138) <https://git.reviewboard.kde.org/r/127263/#comment63643> Same here as for the action, see comments below daemon/actions/bundled/wirelesspowersavingconfig.h (lines 40 - 42) <https://git.reviewboard.kde.org/r/127263/#comment63642> override instead of virtual daemon/actions/bundled/wirelesspowersavingconfig.h (lines 45 - 47) <https://git.reviewboard.kde.org/r/127263/#comment63641> = nullptr daemon/actions/bundled/wirelesspowersavingconfig.cpp (line 38) <https://git.reviewboard.kde.org/r/127263/#comment63640> const QVariantList & daemon/actions/bundled/wirelesspowersavingconfig.cpp (lines 44 - 47) <https://git.reviewboard.kde.org/r/127263/#comment63639> = default daemon/actions/bundled/wirelesspowersavingconfig.cpp (line 98) <https://git.reviewboard.kde.org/r/127263/#comment63637> You can skip this check daemon/actions/bundled/wirelesspowersavingconfig.cpp (line 100) <https://git.reviewboard.kde.org/r/127263/#comment63636> constBegin() / constEnd() Also, inline variable declaration: for (auto it = permissions.constBegin() ...) daemon/actions/bundled/wirelesspowersavingconfig.cpp (lines 101 - 103) <https://git.reviewboard.kde.org/r/127263/#comment63638> comparison with QLatin1String daemon/actions/bundled/wirelesspowersavingconfig.cpp (lines 114 - 116) <https://git.reviewboard.kde.org/r/127263/#comment63635> New connect syntax pls - Kai Uwe Broulik On März 9, 2016, 9:36 vorm., Jan Grulich wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://git.reviewboard.kde.org/r/127263/ > ----------------------------------------------------------- > > (Updated März 9, 2016, 9:36 vorm.) > > > Review request for Plasma, Solid, KDE Usability, and Kai Uwe Broulik. > > > Repository: powerdevil > > > Description > ------- > > This action adds an option to turn off wifi/wwan/bt once you switch profile > (e.g you unplugg the power cable and start running on battery). > > One more thing. Due to usage of NetworkManagerQt I had to add > add_definitions(-DQT_NO_KEYWORDS) into CMakeLists.txt like we do in > plasma-nm to avoid compilation error (thanks to NetworkManager) and replace > all keywords by their Qt equivalent (e.g signals ? Q_SIGNALS). > > How it behaves: > 1) Switching from "AC" profile to "battery" (or from "battery" to "low > battery" which is the same situation): > a) When the action is enabled in "AC" profile and options to turn off > wifi/wwan/bt are enabled > x) Switching to a profile where the action is enabled too and options > are turned on ? will do nothing as they should be already turned off > y) Switching to a profile where the action is enabled too but options > are turned off ? will do nothing as the "battery" profile is more > conservative and we have those devices disabled already in less conservative > profile > z) Switching to a profile where the action is disabled ? will do > nothing as there is nothing to do > b) When the action is enabled in "AC" profile and options to turn off > wifi/wwan/bt are disabled > ? this should behave according to the more conservative profile, if the > options are enabled then all devices will be disabled too > C) When the action is disabled in "AC" profile > ? should behave as in the case 1-b > 2) Switching from "battery" profile to "AC" profile (or from "low battery" to > "battery" which is the same situation): > a) When the action is enabled in "battery" profile and options to turn off > wifi/wwan/bt are enabled > x) Switching to a profile where the action is enabled too and options > are turned on ? will do nothing as it's same setup > y) Switching to a profile where the action is enabled too and options > are turned off ? will turn on the wifi/wwan/bt > z) Switching to a profile where the action is disabled ? will recover > the previous state of the wifi/wwan/bt > b) When the action is enabled in "battery" profile and options to turn off > wifi/wwan/bt are disabled > x) Switching to a profile where the action is enabled too and options > are turned on ? will do nothing as the option in "battery" should be ignored > in this case due to more conservative profile > y) Switching to a profile where the action is enabled too and options > are turned off ? will do nothing, same configuration > z) Switching to a profile where the action is disabled ? will recover > the previous state of the wifi/wwan/bt > c) When the action is diabled in "battery" profile > ? will just recover the previous state of the wifi/wwan/bt as there is > nothing to change according to the new profile > > > Diffs > ----- > > CMakeLists.txt e7fff17 > daemon/CMakeLists.txt bbfe191 > daemon/actions/bundled/CMakeLists.txt 45abea3 > > daemon/actions/bundled/org.kde.Solid.PowerManagement.Actions.WirelessPowerSaving.xml > PRE-CREATION > daemon/actions/bundled/powerdevilwirelesspowersavingaction.desktop > PRE-CREATION > daemon/actions/bundled/wirelesspowersaving.h PRE-CREATION > daemon/actions/bundled/wirelesspowersaving.cpp PRE-CREATION > daemon/actions/bundled/wirelesspowersavingconfig.h PRE-CREATION > daemon/actions/bundled/wirelesspowersavingconfig.cpp PRE-CREATION > daemon/powerdevilactionpool.cpp 2091879 > > Diff: https://git.reviewboard.kde.org/r/127263/diff/ > > > Testing > ------- > > I did some basic testing like (un)plugging the power cable and checking > whether it applied the correct configuration. > > > Thanks, > > Jan Grulich > >
_______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel