[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-release-team
Subject:    Re: branches/KDE/4.6/kdebase/workspace/powerdevil
From:       Dario Freddi <drf54321 () gmail ! com>
Date:       2011-01-25 12:37:49
Message-ID: AANLkTim1SHAk0DeF7ai6pizV5hvH+v5rLtV-AQGtyjAt () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


2011/1/25 Will Stephenson <wstephenson@kde.org>

> On Monday 24 January 2011 11:17:17 Dario Freddi wrote:
> > SVN commit 1216708 by dafre:
> >
> > CCMAIL: Dirk Mueller <mueller@kde.org>
> > CCMAIL: release-team@kde.org
> >
> > Backporting r1216705
> >
> > This commit is critical and needs to be released in 4.6.0; otherwise it
> > needs to be reverted.
>
> I don't understand this sentence, if the commit is not included in 4.6.0,
> /what/ needs to be reverted?
>

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.

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.)

Hope this clears any doubt.


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

[Attachment #5 (text/html)]

<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>



_______________________________________________
release-team mailing list
release-team@kde.org
https://mail.kde.org/mailman/listinfo/release-team


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic