@ -63,7 +63,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# include <KConfigGroup>
# include <KGlobal>
# include <KLocale>
# include <KNotification>
// #include <KNotification>
# include <KStandardDirs>
# include <KTemporaryFile>
# include <kdisplaymanager.h>
@ -464,16 +464,9 @@ void KSMServer::completeShutdownOrCheckpoint()
discardSession ( ) ;
if ( state = = Shutdown ) {
KNotification * n = KNotification : : event ( QStringLiteral ( " exitkde " ) , QString ( ) , QPixmap ( ) , 0l , KNotification : : DefaultEvent ) ; // KDE says good bye
connect ( n , SIGNAL ( closed ( ) ) , this , SLOT ( logoutSoundFinished ( ) ) ) ;
// https://bugs.kde.org/show_bug.cgi?id=228005
// if sound is not working for some reason (e.g. no phonon
// backends are installed) the closed() signal never happens
// and logoutSoundFinished() never gets called. Add this timer to make
// sure the shutdown procedure continues even if sound system is broken.
QTimer : : singleShot ( 5000 , this , SLOT ( logoutSoundTimeout ( ) ) ) ;
state = WaitingForKNotify ;
createLogoutEffectWidget ( ) ;
startKilling ( ) ;
} else if ( state = = Checkpoint ) {
foreach ( KSMClient * c , clients ) {
SmsSaveComplete ( c - > connection ( ) ) ;
@ -485,24 +478,6 @@ void KSMServer::completeShutdownOrCheckpoint()
}
void KSMServer : : logoutSoundTimeout ( )
{
if ( state ! = WaitingForKNotify ) {
return ;
}
kDebug ( 1218 ) < < " logout sound timeout " ;
logoutSoundFinished ( ) ;
}
void KSMServer : : logoutSoundFinished ( )
{
if ( state ! = WaitingForKNotify ) {
return ;
}
kDebug ( 1218 ) < < " Logout event finished " ;
startKilling ( ) ;
}
void KSMServer : : startKilling ( )
{
kDebug ( 1218 ) < < " Starting killing clients " ;