summaryrefslogtreecommitdiff
path: root/core/launcher/desktop.cpp
Unidiff
Diffstat (limited to 'core/launcher/desktop.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/desktop.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/core/launcher/desktop.cpp b/core/launcher/desktop.cpp
index e58b08c..f90da1a 100644
--- a/core/launcher/desktop.cpp
+++ b/core/launcher/desktop.cpp
@@ -677,24 +677,30 @@ void DesktopApplication::shutdown( ShutdownImpl::Type t )
677 switch ( t ) { 677 switch ( t ) {
678 case ShutdownImpl::ShutdownSystem: 678 case ShutdownImpl::ShutdownSystem:
679 execlp("shutdown", "shutdown", "-h", "now", (void*)0); 679 execlp("shutdown", "shutdown", "-h", "now", (void*)0);
680 break; 680 break;
681 case ShutdownImpl::RebootSystem: 681 case ShutdownImpl::RebootSystem:
682 execlp("shutdown", "shutdown", "-r", "now", (void*)0); 682 execlp("shutdown", "shutdown", "-r", "now", (void*)0);
683 break; 683 break;
684 case ShutdownImpl::RestartDesktop: 684 case ShutdownImpl::RestartDesktop:
685 restart(); 685 restart();
686 break; 686 break;
687 case ShutdownImpl::TerminateDesktop: 687 case ShutdownImpl::TerminateDesktop:
688 prepareForTermination(FALSE); 688 prepareForTermination(FALSE);
689
690 // This is a workaround for a Qt bug
691 // clipboard applet has to stop its poll timer, or Qt/E
692 // will hang on quit() right before it emits aboutToQuit()
693 emit aboutToQuit ( );
694
689 quit(); 695 quit();
690 break; 696 break;
691 } 697 }
692} 698}
693 699
694void DesktopApplication::restart() 700void DesktopApplication::restart()
695{ 701{
696 prepareForTermination(TRUE); 702 prepareForTermination(TRUE);
697 703
698#ifdef Q_WS_QWS 704#ifdef Q_WS_QWS
699 for ( int fd = 3; fd < 100; fd++ ) 705 for ( int fd = 3; fd < 100; fd++ )
700 close( fd ); 706 close( fd );