From kde-commits Thu May 31 20:20:06 2012 From: Harald Sitter Date: Thu, 31 May 2012 20:20:06 +0000 To: kde-commits Subject: [dragon] src/app: increase startup speed by not messing with powermanagement Message-Id: <20120531202006.DE48BA60A9 () git ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=133849579009420 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 !=3D -1) + Solid::PowerManagement::stopSuppressingSleep(m_stopSleepCookie); = //stop supressing screen power management - Solid::PowerManagement::stopSuppressingScreenPowerManagement(m_stopS= creenPowerMgmtCookie); + if (m_stopScreenPowerMgmtCookie !=3D -1) + Solid::PowerManagement::stopSuppressingScreenPowerManagement(m_sto= pScreenPowerMgmtCookie); = //stop disabling screensaver delete m_stopScreenSaver; // It is always 0, I have been careful.