-rw-r--r-- | core/launcher/desktop.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/launcher/desktop.cpp b/core/launcher/desktop.cpp index 4c239a6..5ecc8bf 100644 --- a/core/launcher/desktop.cpp +++ b/core/launcher/desktop.cpp | |||
@@ -731,36 +731,36 @@ void Desktop::styleChange( QStyle &s ) | |||
731 | void DesktopApplication::shutdown() | 731 | void DesktopApplication::shutdown() |
732 | { | 732 | { |
733 | if ( type() != GuiServer ) | 733 | if ( type() != GuiServer ) |
734 | return ; | 734 | return ; |
735 | ShutdownImpl *sd = new ShutdownImpl( 0, 0, WDestructiveClose ); | 735 | ShutdownImpl *sd = new ShutdownImpl( 0, 0, WDestructiveClose ); |
736 | connect( sd, SIGNAL( shutdown( ShutdownImpl::Type ) ), | 736 | connect( sd, SIGNAL( shutdown( ShutdownImpl::Type ) ), |
737 | this, SLOT( shutdown( ShutdownImpl::Type ) ) ); | 737 | this, SLOT( shutdown( ShutdownImpl::Type ) ) ); |
738 | sd->showMaximized(); | 738 | sd->showMaximized(); |
739 | } | 739 | } |
740 | 740 | ||
741 | void DesktopApplication::shutdown( ShutdownImpl::Type t ) | 741 | void DesktopApplication::shutdown( ShutdownImpl::Type t ) |
742 | { | 742 | { |
743 | 743 | char *path[] = { "/sbin", "/usr/sbin", 0 }; | |
744 | char *opt = 0; | 744 | char *opt = 0; |
745 | 745 | ||
746 | switch ( t ) { | 746 | switch ( t ) { |
747 | case ShutdownImpl::ShutdownSystem: | 747 | case ShutdownImpl::ShutdownSystem: |
748 | opt = "-h"; | 748 | opt = "-h"; |
749 | // fall through | 749 | // fall through |
750 | case ShutdownImpl::RebootSystem: | 750 | case ShutdownImpl::RebootSystem: |
751 | if ( opt == 0 ) | 751 | if ( opt == 0 ) |
752 | opt = "-r"; | 752 | opt = "-r"; |
753 | 753 | ||
754 | if ( execle( "shutdown", "shutdown", opt, "now", ( void* ) 0, "/sbin", "/usr/sbin", ( void* ) 0 ) < 0 ) | 754 | if ( execle( "shutdown", "shutdown", opt, "now", ( void* ) 0, path ) < 0 ) |
755 | ::syslog ( LOG_ERR, "Erroring execing shutdown\n" ); | 755 | ::syslog ( LOG_ERR, "Erroring execing shutdown\n" ); |
756 | 756 | ||
757 | break; | 757 | break; |
758 | case ShutdownImpl::RestartDesktop: | 758 | case ShutdownImpl::RestartDesktop: |
759 | restart(); | 759 | restart(); |
760 | break; | 760 | break; |
761 | case ShutdownImpl::TerminateDesktop: | 761 | case ShutdownImpl::TerminateDesktop: |
762 | prepareForTermination( FALSE ); | 762 | prepareForTermination( FALSE ); |
763 | 763 | ||
764 | // This is a workaround for a Qt bug | 764 | // This is a workaround for a Qt bug |
765 | // clipboard applet has to stop its poll timer, or Qt/E | 765 | // clipboard applet has to stop its poll timer, or Qt/E |
766 | // will hang on quit() right before it emits aboutToQuit() | 766 | // will hang on quit() right before it emits aboutToQuit() |