Fix ksmserver crash when logout dialog is disabled

pull/2/head
Timothy Pearson 11 years ago
parent eae7e0d365
commit b004fbafa9

@ -570,10 +570,12 @@ void KSMServer::handleProtectionTimeout()
SHUTDOWN_MARKER("handleProtectionTimeout"); SHUTDOWN_MARKER("handleProtectionTimeout");
notificationTimer.stop(); notificationTimer.stop();
static_cast<KSMShutdownIPDlg*>(shutdownNotifierIPDlg)->hideNotificationActionButtons(); if (shutdownNotifierIPDlg) {
disconnect(shutdownNotifierIPDlg, SIGNAL(abortLogoutClicked()), this, SLOT(cancelShutdown())); static_cast<KSMShutdownIPDlg*>(shutdownNotifierIPDlg)->hideNotificationActionButtons();
disconnect(shutdownNotifierIPDlg, SIGNAL(skipNotificationClicked()), this, SLOT(forceSkipSaveYourself())); disconnect(shutdownNotifierIPDlg, SIGNAL(abortLogoutClicked()), this, SLOT(cancelShutdown()));
static_cast<KSMShutdownIPDlg*>(shutdownNotifierIPDlg)->setStatusMessage(i18n("Forcing interacting application termination").append("...")); disconnect(shutdownNotifierIPDlg, SIGNAL(skipNotificationClicked()), this, SLOT(forceSkipSaveYourself()));
static_cast<KSMShutdownIPDlg*>(shutdownNotifierIPDlg)->setStatusMessage(i18n("Forcing interacting application termination").append("..."));
}
for ( KSMClient* c = clients.first(); c; c = clients.next() ) { for ( KSMClient* c = clients.first(); c; c = clients.next() ) {
if ( !c->saveYourselfDone && !c->waitForPhase2 ) { if ( !c->saveYourselfDone && !c->waitForPhase2 ) {
@ -586,10 +588,12 @@ void KSMServer::handleProtectionTimeout()
void KSMServer::notificationTimeout() void KSMServer::notificationTimeout()
{ {
// Display the buttons in the logout dialog if (shutdownNotifierIPDlg) {
connect(shutdownNotifierIPDlg, SIGNAL(abortLogoutClicked()), this, SLOT(cancelShutdown())); // Display the buttons in the logout dialog
connect(shutdownNotifierIPDlg, SIGNAL(skipNotificationClicked()), this, SLOT(forceSkipSaveYourself())); connect(shutdownNotifierIPDlg, SIGNAL(abortLogoutClicked()), this, SLOT(cancelShutdown()));
static_cast<KSMShutdownIPDlg*>(shutdownNotifierIPDlg)->showNotificationActionButtons(); connect(shutdownNotifierIPDlg, SIGNAL(skipNotificationClicked()), this, SLOT(forceSkipSaveYourself()));
static_cast<KSMShutdownIPDlg*>(shutdownNotifierIPDlg)->showNotificationActionButtons();
}
} }
void KSMServer::completeShutdownOrCheckpoint() void KSMServer::completeShutdownOrCheckpoint()
@ -638,9 +642,11 @@ void KSMServer::completeShutdownOrCheckpoint()
} }
notificationTimer.stop(); notificationTimer.stop();
static_cast<KSMShutdownIPDlg*>(shutdownNotifierIPDlg)->hideNotificationActionButtons(); if (shutdownNotifierIPDlg) {
disconnect(shutdownNotifierIPDlg, SIGNAL(abortLogoutClicked()), this, SLOT(cancelShutdown())); static_cast<KSMShutdownIPDlg*>(shutdownNotifierIPDlg)->hideNotificationActionButtons();
disconnect(shutdownNotifierIPDlg, SIGNAL(skipNotificationClicked()), this, SLOT(forceSkipSaveYourself())); disconnect(shutdownNotifierIPDlg, SIGNAL(abortLogoutClicked()), this, SLOT(cancelShutdown()));
disconnect(shutdownNotifierIPDlg, SIGNAL(skipNotificationClicked()), this, SLOT(forceSkipSaveYourself()));
}
// synchronize any folders that were requested for shutdown sync // synchronize any folders that were requested for shutdown sync
if (shutdownNotifierIPDlg) { if (shutdownNotifierIPDlg) {

Loading…
Cancel
Save