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

List:       kde-commits
Subject:    [dragon] src/app: increase startup speed by not messing with powermanagement
From:       Harald Sitter <sitter () kde ! org>
Date:       2012-05-31 20:20:06
Message-ID: 20120531202006.DE48BA60A9 () git ! kde ! org
[Download RAW message or body]

Git commit 8947e3e67c03cb65e7355fa94a27f10da3dc73c0 by Harald Sitter.
Committed on 31/05/2012 at 22:18.
Pushed by sitter into branch 'master'.

increase startup speed by not messing with powermanagement

M  +4    -2    src/app/stateChange.cpp

http://commits.kde.org/dragon/8947e3e67c03cb65e7355fa94a27f10da3dc73c0

diff --git a/src/app/stateChange.cpp b/src/app/stateChange.cpp
index 1792bae..f54b75c 100644
--- a/src/app/stateChange.cpp
+++ b/src/app/stateChange.cpp
@@ -127,10 +127,12 @@ MainWindow::engineStateChanged( Phonon::State state, Phonon::State oldstate )
     else if( Phonon::StoppedState || !TheStream::hasMedia() )
     {
       //stop supressing sleep
-      Solid::PowerManagement::stopSuppressingSleep(m_stopSleepCookie);
+      if (m_stopSleepCookie != -1)
+        Solid::PowerManagement::stopSuppressingSleep(m_stopSleepCookie);
 
       //stop supressing screen power management
-      Solid::PowerManagement::stopSuppressingScreenPowerManagement(m_stopScreenPowerMgmtCookie);
+      if (m_stopScreenPowerMgmtCookie != -1)
+        Solid::PowerManagement::stopSuppressingScreenPowerManagement(m_stopScreenPowerMgmtCookie);
 
      //stop disabling screensaver
       delete m_stopScreenSaver; // It is always 0, I have been careful.
[prev in list] [next in list] [prev in thread] [next in thread] 

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