<div class="gmail_quote">2011/1/25 Will Stephenson <span dir="ltr"><<a href="mailto:wstephenson@kde.org">wstephenson@kde.org</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
On Monday 24 January 2011 11:17:17 Dario Freddi wrote:<br>
> SVN commit 1216708 by dafre:<br>
><br>
> CCMAIL: Dirk Mueller <<a href="mailto:mueller@kde.org">mueller@kde.org</a>><br>
> CCMAIL: <a href="mailto:release-team@kde.org">release-team@kde.org</a><br>
><br>
> Backporting r1216705<br>
><br>
> This commit is critical and needs to be released in 4.6.0; otherwise it<br>
> needs to be reverted.<br>
<br>
I don't understand this sentence, if the commit is not included in 4.6.0,<br>
/what/ needs to be reverted?<br></blockquote><div><br></div><div>The critical part is that this commit changes the config file format in regard to the codes of the suspension action. If the commit is not pushed to 4.6.0, I cannot obviously change this during a fix update, as it would require the user to manually edit his configuration, so this commit (and the other one) needs to be reverted. This caused an impossibility in the profile migrator (from 4.5-) to convert the old action codes for lid close, button press, etc, to the new format.</div>
<div><br></div><div>Summarizing: both commits are aimed to the same thing, and it's all about the migrator not able to convert correctly the lid close/button/critical battery actions. If not included in 4.6.0, this fix has to await 4.7 (moreover, it won't be very useful then as users will probably upgrade from 4.6 and hence won't require migration.)</div>
<div><br></div><div>Hope this clears any doubt.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
> Please add it to the tag or this issue might cause<br>
> troubles in the future.<br>
<br>
What bug report, so we can look for downstream dupes from the RCs?<br>
<br>
><br>
> M +6 -40 daemon/actions/bundled/handlebuttonevents.cpp<br>
> M +9 -7 daemon/actions/bundled/handlebuttoneventsconfig.cpp<br>
> M +2 -1 daemon/actions/bundled/suspendsession.h<br>
> M +1 -1 daemon/powerdevilaction.cpp<br>
> M +1 -1 kcmodule/global/GeneralPage.cpp<br>
><br>
><br>
> ---<br>
> branches/KDE/4.6/kdebase/workspace/powerdevil/daemon/actions/bundled/handl<br>
> ebuttonevents.cpp #1216707:1216708 @@ -19,6 +19,8 @@<br>
><br>
> #include "handlebuttonevents.h"<br>
><br>
> +#include "suspendsession.h"<br>
> +<br>
> #include <powerdevilactionpool.h><br>
><br>
> #include <KConfigGroup><br>
> @@ -87,33 +89,13 @@<br>
> void HandleButtonEvents::processAction(uint action)<br>
> {<br>
> // Basically, we simply trigger other actions :)<br>
> - switch (action) {<br>
> - case 1:<br>
> - // Sleep<br>
> - triggerAction("SuspendSession", qVariantFromValue< uint >(1));<br>
> - break;<br>
> - case 2:<br>
> - // Hibernate<br>
> - triggerAction("SuspendSession", qVariantFromValue< uint >(2));<br>
> - break;<br>
> - case 3:<br>
> - // Turn off PC<br>
> - triggerAction("SuspendSession", qVariantFromValue< uint >(8));<br>
> - break;<br>
> - case 4:<br>
> - // Lock<br>
> - triggerAction("SuspendSession", qVariantFromValue< uint<br>
> >(32)); - break;<br>
> - case 5:<br>
> - // Shutdown dialog<br>
> - triggerAction("SuspendSession", qVariantFromValue< uint<br>
> >(16)); - break;<br>
> - case 6:<br>
> + switch ((SuspendSession::Mode)action) {<br>
> + case SuspendSession::TurnOffScreenMode:<br>
> // Turn off screen<br>
> triggerAction("DPMSControl", qVariantFromValue< QString<br>
> >("TurnOff")); break;<br>
> default:<br>
> - // Do nothing<br>
> + triggerAction("SuspendSession", qVariantFromValue< uint<br>
> >(action)); break;<br>
> }<br>
> }<br>
> @@ -134,25 +116,9 @@<br>
> {<br>
> // For now, let's just accept the phantomatic "32" button.<br>
> if (args["Button"].toInt() == 32) {<br>
> - switch (args["Button"].toUInt()) {<br>
> - case 1:<br>
> - // Sleep<br>
> - triggerAction("SuspendSession", qVariantFromValue< uint >(1));<br>
> // To RAM - break;<br>
> - case 2:<br>
> - // Hibernate<br>
> - triggerAction("SuspendSession", qVariantFromValue< uint >(2));<br>
> // To disk - break;<br>
> - case 3:<br>
> - // Turn off PC<br>
> - triggerAction("SuspendSession", qVariantFromValue< uint >(8));<br>
> // Shutdown - break;<br>
> - default:<br>
> - // Do nothing<br>
> - break;<br>
> + triggerAction("SuspendSession", args["Button"]);<br>
> }<br>
> }<br>
> -}<br>
><br>
> bool HandleButtonEvents::loadAction(const KConfigGroup& config)<br>
> {<br>
> ---<br>
> branches/KDE/4.6/kdebase/workspace/powerdevil/daemon/actions/bundled/handl<br>
> ebuttoneventsconfig.cpp #1216707:1216708 @@ -19,6 +19,8 @@<br>
><br>
> #include "handlebuttoneventsconfig.h"<br>
><br>
> +#include "suspendsession.h"<br>
> +<br>
> #include <Solid/PowerManagement><br>
><br>
> #include <KLocalizedString><br>
> @@ -72,19 +74,19 @@<br>
> QSet< Solid::PowerManagement::SleepState > methods =<br>
> Solid::PowerManagement::supportedSleepStates();<br>
><br>
> foreach (KComboBox *box, boxes) {<br>
> - box->addItem(KIcon("dialog-cancel"), i18n("Do nothing"),<br>
> (uint)0); + box->addItem(KIcon("dialog-cancel"), i18n("Do<br>
> nothing"), (uint)SuspendSession::None); if<br>
> (methods.contains(Solid::PowerManagement::SuspendState)) { -<br>
> box->addItem(KIcon("system-suspend"), i18n("Sleep"), (uint)1); +<br>
> box->addItem(KIcon("system-suspend"), i18n("Sleep"),<br>
> (uint)SuspendSession::ToRamMode); }<br>
> if (methods.contains(Solid::PowerManagement::HibernateState))<br>
> { - box->addItem(KIcon("system-suspend-hibernate"),<br>
> i18n("Hibernate"), (uint)2); +<br>
> box->addItem(KIcon("system-suspend-hibernate"), i18n("Hibernate"),<br>
> (uint)SuspendSession::ToDiskMode); }<br>
> - box->addItem(KIcon("system-shutdown"), i18n("Shutdown"),<br>
> (uint)3); - box->addItem(KIcon("system-lock-screen"),<br>
> i18n("Lock screen"), (uint)4); +<br>
> box->addItem(KIcon("system-shutdown"), i18n("Shutdown"),<br>
> (uint)SuspendSession::ShutdownMode); +<br>
> box->addItem(KIcon("system-lock-screen"), i18n("Lock screen"),<br>
> (uint)SuspendSession::LockScreenMode); if (box != m_lidCloseCombo) {<br>
> - box->addItem(KIcon("system-log-out"), i18n("Prompt log out<br>
> dialog"), (uint)5); + box->addItem(KIcon("system-log-out"),<br>
> i18n("Prompt log out dialog"), (uint)SuspendSession::LogoutDialogMode); }<br>
> - box->addItem(KIcon("preferences-desktop-screensaver"),<br>
> i18n("Turn off screen"), (uint)6); +<br>
> box->addItem(KIcon("preferences-desktop-screensaver"), i18n("Turn off<br>
> screen"), (uint)SuspendSession::TurnOffScreenMode); }<br>
> }<br>
><br>
> ---<br>
> branches/KDE/4.6/kdebase/workspace/powerdevil/daemon/actions/bundled/suspe<br>
> ndsession.h #1216707:1216708 @@ -41,7 +41,8 @@<br>
> SuspendHybridMode = 4,<br>
> ShutdownMode = 8,<br>
> LogoutDialogMode = 16,<br>
> - LockScreenMode = 32<br>
> + LockScreenMode = 32,<br>
> + TurnOffScreenMode = 64<br>
> };<br>
><br>
> explicit SuspendSession(QObject *parent);<br>
> ---<br>
> branches/KDE/4.6/kdebase/workspace/powerdevil/daemon/powerdevilaction.cpp<br>
> #1216707:1216708 @@ -85,7 +85,7 @@<br>
> void Action::trigger(const QVariantMap& args)<br>
> {<br>
> if (args.contains("Explicit") && args["Explicit"].toBool()) {<br>
> - // The action was explicitely triggered by the user, hence any<br>
> policy check is bypassed. + // The action was explicitly triggered<br>
> by the user, hence any policy check is bypassed. triggerImpl(args);<br>
> } else {<br>
> // The action was taken automatically: let's check if we have the<br>
> rights to do that ---<br>
> branches/KDE/4.6/kdebase/workspace/powerdevil/kcmodule/global/GeneralPage.<br>
> cpp #1216707:1216708 @@ -105,7 +105,7 @@<br>
> if (methods.contains(Solid::PowerManagement::HibernateState)) {<br>
> BatteryCriticalCombo->addItem(KIcon("system-suspend-hibernate"),<br>
> i18n("Hibernate"), 2); }<br>
> - BatteryCriticalCombo->addItem(KIcon("system-shutdown"),<br>
> i18n("Shutdown"), 3); +<br>
> BatteryCriticalCombo->addItem(KIcon("system-shutdown"), i18n("Shutdown"),<br>
> 8);<br>
><br>
><br>
> notificationsButton->setIcon(KIcon("preferences-desktop-notification"));<br>
><br>
> _______________________________________________<br>
> release-team mailing list<br>
> <a href="mailto:release-team@kde.org">release-team@kde.org</a><br>
> <a href="https://mail.kde.org/mailman/listinfo/release-team" target="_blank">https://mail.kde.org/mailman/listinfo/release-team</a><br>
</blockquote></div><br>