<div class="gmail_quote">2011/1/25 Will Stephenson <span dir="ltr">&lt;<a href="mailto:wstephenson@kde.org">wstephenson@kde.org</a>&gt;</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>
&gt; SVN commit 1216708 by dafre:<br>
&gt;<br>
&gt; CCMAIL: Dirk Mueller &lt;<a href="mailto:mueller@kde.org">mueller@kde.org</a>&gt;<br>
&gt; CCMAIL: <a href="mailto:release-team@kde.org">release-team@kde.org</a><br>
&gt;<br>
&gt; Backporting r1216705<br>
&gt;<br>
&gt; This commit is critical and needs to be released in 4.6.0; otherwise it<br>
&gt; needs to be reverted.<br>
<br>
I don&#39;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&#39;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&#39;t be very useful then as users will probably upgrade from 4.6 and hence won&#39;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>
&gt; Please add it to the tag or this issue might cause<br>
&gt; troubles in the future.<br>
<br>
What bug report, so we can look for downstream dupes from the RCs?<br>
<br>
&gt;<br>
&gt;  M  +6 -40     daemon/actions/bundled/handlebuttonevents.cpp<br>
&gt;  M  +9 -7      daemon/actions/bundled/handlebuttoneventsconfig.cpp<br>
&gt;  M  +2 -1      daemon/actions/bundled/suspendsession.h<br>
&gt;  M  +1 -1      daemon/powerdevilaction.cpp<br>
&gt;  M  +1 -1      kcmodule/global/GeneralPage.cpp<br>
&gt;<br>
&gt;<br>
&gt; ---<br>
&gt; branches/KDE/4.6/kdebase/workspace/powerdevil/daemon/actions/bundled/handl<br>
&gt; ebuttonevents.cpp #1216707:1216708 @@ -19,6 +19,8 @@<br>
&gt;<br>
&gt;  #include &quot;handlebuttonevents.h&quot;<br>
&gt;<br>
&gt; +#include &quot;suspendsession.h&quot;<br>
&gt; +<br>
&gt;  #include &lt;powerdevilactionpool.h&gt;<br>
&gt;<br>
&gt;  #include &lt;KConfigGroup&gt;<br>
&gt; @@ -87,33 +89,13 @@<br>
&gt;  void HandleButtonEvents::processAction(uint action)<br>
&gt;  {<br>
&gt;      // Basically, we simply trigger other actions :)<br>
&gt; -    switch (action) {<br>
&gt; -        case 1:<br>
&gt; -            // Sleep<br>
&gt; -            triggerAction(&quot;SuspendSession&quot;, qVariantFromValue&lt; uint &gt;(1));<br>
&gt; -            break;<br>
&gt; -        case 2:<br>
&gt; -            // Hibernate<br>
&gt; -            triggerAction(&quot;SuspendSession&quot;, qVariantFromValue&lt; uint &gt;(2));<br>
&gt; -            break;<br>
&gt; -        case 3:<br>
&gt; -            // Turn off PC<br>
&gt; -            triggerAction(&quot;SuspendSession&quot;, qVariantFromValue&lt; uint &gt;(8));<br>
&gt; -            break;<br>
&gt; -        case 4:<br>
&gt; -            // Lock<br>
&gt; -            triggerAction(&quot;SuspendSession&quot;, qVariantFromValue&lt; uint<br>
&gt; &gt;(32)); -            break;<br>
&gt; -        case 5:<br>
&gt; -            // Shutdown dialog<br>
&gt; -            triggerAction(&quot;SuspendSession&quot;, qVariantFromValue&lt; uint<br>
&gt; &gt;(16)); -            break;<br>
&gt; -        case 6:<br>
&gt; +    switch ((SuspendSession::Mode)action) {<br>
&gt; +        case SuspendSession::TurnOffScreenMode:<br>
&gt;              // Turn off screen<br>
&gt;              triggerAction(&quot;DPMSControl&quot;, qVariantFromValue&lt; QString<br>
&gt; &gt;(&quot;TurnOff&quot;)); break;<br>
&gt;          default:<br>
&gt; -            // Do nothing<br>
&gt; +            triggerAction(&quot;SuspendSession&quot;, qVariantFromValue&lt; uint<br>
&gt; &gt;(action)); break;<br>
&gt;      }<br>
&gt;  }<br>
&gt; @@ -134,25 +116,9 @@<br>
&gt;  {<br>
&gt;      // For now, let&#39;s just accept the phantomatic &quot;32&quot; button.<br>
&gt;      if (args[&quot;Button&quot;].toInt() == 32) {<br>
&gt; -        switch (args[&quot;Button&quot;].toUInt()) {<br>
&gt; -        case 1:<br>
&gt; -            // Sleep<br>
&gt; -            triggerAction(&quot;SuspendSession&quot;, qVariantFromValue&lt; uint &gt;(1));<br>
&gt; // To RAM -            break;<br>
&gt; -        case 2:<br>
&gt; -            // Hibernate<br>
&gt; -            triggerAction(&quot;SuspendSession&quot;, qVariantFromValue&lt; uint &gt;(2));<br>
&gt; // To disk -            break;<br>
&gt; -        case 3:<br>
&gt; -            // Turn off PC<br>
&gt; -            triggerAction(&quot;SuspendSession&quot;, qVariantFromValue&lt; uint &gt;(8));<br>
&gt; // Shutdown -            break;<br>
&gt; -        default:<br>
&gt; -            // Do nothing<br>
&gt; -            break;<br>
&gt; +        triggerAction(&quot;SuspendSession&quot;, args[&quot;Button&quot;]);<br>
&gt;          }<br>
&gt;      }<br>
&gt; -}<br>
&gt;<br>
&gt;  bool HandleButtonEvents::loadAction(const KConfigGroup&amp; config)<br>
&gt;  {<br>
&gt; ---<br>
&gt; branches/KDE/4.6/kdebase/workspace/powerdevil/daemon/actions/bundled/handl<br>
&gt; ebuttoneventsconfig.cpp #1216707:1216708 @@ -19,6 +19,8 @@<br>
&gt;<br>
&gt;  #include &quot;handlebuttoneventsconfig.h&quot;<br>
&gt;<br>
&gt; +#include &quot;suspendsession.h&quot;<br>
&gt; +<br>
&gt;  #include &lt;Solid/PowerManagement&gt;<br>
&gt;<br>
&gt;  #include &lt;KLocalizedString&gt;<br>
&gt; @@ -72,19 +74,19 @@<br>
&gt;          QSet&lt; Solid::PowerManagement::SleepState &gt; methods =<br>
&gt; Solid::PowerManagement::supportedSleepStates();<br>
&gt;<br>
&gt;          foreach (KComboBox *box, boxes) {<br>
&gt; -            box-&gt;addItem(KIcon(&quot;dialog-cancel&quot;), i18n(&quot;Do nothing&quot;),<br>
&gt; (uint)0); +            box-&gt;addItem(KIcon(&quot;dialog-cancel&quot;), i18n(&quot;Do<br>
&gt; nothing&quot;), (uint)SuspendSession::None); if<br>
&gt; (methods.contains(Solid::PowerManagement::SuspendState)) { -<br>
&gt;  box-&gt;addItem(KIcon(&quot;system-suspend&quot;), i18n(&quot;Sleep&quot;), (uint)1); +<br>
&gt;       box-&gt;addItem(KIcon(&quot;system-suspend&quot;), i18n(&quot;Sleep&quot;),<br>
&gt; (uint)SuspendSession::ToRamMode); }<br>
&gt;              if (methods.contains(Solid::PowerManagement::HibernateState))<br>
&gt; { -                box-&gt;addItem(KIcon(&quot;system-suspend-hibernate&quot;),<br>
&gt; i18n(&quot;Hibernate&quot;), (uint)2); +<br>
&gt; box-&gt;addItem(KIcon(&quot;system-suspend-hibernate&quot;), i18n(&quot;Hibernate&quot;),<br>
&gt; (uint)SuspendSession::ToDiskMode); }<br>
&gt; -            box-&gt;addItem(KIcon(&quot;system-shutdown&quot;), i18n(&quot;Shutdown&quot;),<br>
&gt; (uint)3); -            box-&gt;addItem(KIcon(&quot;system-lock-screen&quot;),<br>
&gt; i18n(&quot;Lock screen&quot;), (uint)4); +<br>
&gt; box-&gt;addItem(KIcon(&quot;system-shutdown&quot;), i18n(&quot;Shutdown&quot;),<br>
&gt; (uint)SuspendSession::ShutdownMode); +<br>
&gt; box-&gt;addItem(KIcon(&quot;system-lock-screen&quot;), i18n(&quot;Lock screen&quot;),<br>
&gt; (uint)SuspendSession::LockScreenMode); if (box != m_lidCloseCombo) {<br>
&gt; -                box-&gt;addItem(KIcon(&quot;system-log-out&quot;), i18n(&quot;Prompt log out<br>
&gt; dialog&quot;), (uint)5); +                box-&gt;addItem(KIcon(&quot;system-log-out&quot;),<br>
&gt; i18n(&quot;Prompt log out dialog&quot;), (uint)SuspendSession::LogoutDialogMode); }<br>
&gt; -            box-&gt;addItem(KIcon(&quot;preferences-desktop-screensaver&quot;),<br>
&gt; i18n(&quot;Turn off screen&quot;), (uint)6); +<br>
&gt; box-&gt;addItem(KIcon(&quot;preferences-desktop-screensaver&quot;), i18n(&quot;Turn off<br>
&gt; screen&quot;), (uint)SuspendSession::TurnOffScreenMode); }<br>
&gt;      }<br>
&gt;<br>
&gt; ---<br>
&gt; branches/KDE/4.6/kdebase/workspace/powerdevil/daemon/actions/bundled/suspe<br>
&gt; ndsession.h #1216707:1216708 @@ -41,7 +41,8 @@<br>
&gt;          SuspendHybridMode = 4,<br>
&gt;          ShutdownMode = 8,<br>
&gt;          LogoutDialogMode = 16,<br>
&gt; -        LockScreenMode = 32<br>
&gt; +        LockScreenMode = 32,<br>
&gt; +        TurnOffScreenMode = 64<br>
&gt;      };<br>
&gt;<br>
&gt;      explicit SuspendSession(QObject *parent);<br>
&gt; ---<br>
&gt; branches/KDE/4.6/kdebase/workspace/powerdevil/daemon/powerdevilaction.cpp<br>
&gt; #1216707:1216708 @@ -85,7 +85,7 @@<br>
&gt;  void Action::trigger(const QVariantMap&amp; args)<br>
&gt;  {<br>
&gt;      if (args.contains(&quot;Explicit&quot;) &amp;&amp; args[&quot;Explicit&quot;].toBool()) {<br>
&gt; -        // The action was explicitely triggered by the user, hence any<br>
&gt; policy check is bypassed. +        // The action was explicitly triggered<br>
&gt; by the user, hence any policy check is bypassed. triggerImpl(args);<br>
&gt;      } else {<br>
&gt;          // The action was taken automatically: let&#39;s check if we have the<br>
&gt; rights to do that ---<br>
&gt; branches/KDE/4.6/kdebase/workspace/powerdevil/kcmodule/global/GeneralPage.<br>
&gt; cpp #1216707:1216708 @@ -105,7 +105,7 @@<br>
&gt;      if (methods.contains(Solid::PowerManagement::HibernateState)) {<br>
&gt;          BatteryCriticalCombo-&gt;addItem(KIcon(&quot;system-suspend-hibernate&quot;),<br>
&gt; i18n(&quot;Hibernate&quot;), 2); }<br>
&gt; -    BatteryCriticalCombo-&gt;addItem(KIcon(&quot;system-shutdown&quot;),<br>
&gt; i18n(&quot;Shutdown&quot;), 3); +<br>
&gt; BatteryCriticalCombo-&gt;addItem(KIcon(&quot;system-shutdown&quot;), i18n(&quot;Shutdown&quot;),<br>
&gt; 8);<br>
&gt;<br>
&gt;<br>
&gt; notificationsButton-&gt;setIcon(KIcon(&quot;preferences-desktop-notification&quot;));<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; release-team mailing list<br>
&gt; <a href="mailto:release-team@kde.org">release-team@kde.org</a><br>
&gt; <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>