-rw-r--r-- | core/launcher/serverapp.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/launcher/serverapp.cpp b/core/launcher/serverapp.cpp index e8d49fd..e18bcee 100644 --- a/core/launcher/serverapp.cpp +++ b/core/launcher/serverapp.cpp | |||
@@ -681,49 +681,49 @@ void ServerApplication::showSafeMode() | |||
681 | } | 681 | } |
682 | 682 | ||
683 | void ServerApplication::clearSafeMode() | 683 | void ServerApplication::clearSafeMode() |
684 | { | 684 | { |
685 | #if 0 | 685 | #if 0 |
686 | // If we've been running OK for a while then we won't bother going into | 686 | // If we've been running OK for a while then we won't bother going into |
687 | // safe mode immediately on the next crash. | 687 | // safe mode immediately on the next crash. |
688 | Config cfg( "PluginLoader" ); | 688 | Config cfg( "PluginLoader" ); |
689 | cfg.setGroup( "Global" ); | 689 | cfg.setGroup( "Global" ); |
690 | QString mode = cfg.readEntry( "Mode", "Normal" ); | 690 | QString mode = cfg.readEntry( "Mode", "Normal" ); |
691 | if ( mode == "MaybeSafe" ) { | 691 | if ( mode == "MaybeSafe" ) { |
692 | cfg.writeEntry( "Mode", "Normal" ); | 692 | cfg.writeEntry( "Mode", "Normal" ); |
693 | } | 693 | } |
694 | #endif | 694 | #endif |
695 | } | 695 | } |
696 | 696 | ||
697 | 697 | ||
698 | void ServerApplication::shutdown() | 698 | void ServerApplication::shutdown() |
699 | { | 699 | { |
700 | if ( type() != GuiServer ) | 700 | if ( type() != GuiServer ) |
701 | return; | 701 | return; |
702 | ShutdownImpl *sd = new ShutdownImpl( 0, 0, WDestructiveClose ); | 702 | ShutdownImpl *sd = new ShutdownImpl( 0, 0, WDestructiveClose ); |
703 | connect( sd, SIGNAL(shutdown(ShutdownImpl::Type)), | 703 | connect( sd, SIGNAL(shutdown(ShutdownImpl::Type)), |
704 | this, SLOT(shutdown(ShutdownImpl::Type)) ); | 704 | this, SLOT(shutdown(ShutdownImpl::Type)) ); |
705 | sd->showMaximized(); | 705 | QPEApplication::showWidget( sd ); |
706 | } | 706 | } |
707 | 707 | ||
708 | void ServerApplication::shutdown( ShutdownImpl::Type t ) | 708 | void ServerApplication::shutdown( ShutdownImpl::Type t ) |
709 | { | 709 | { |
710 | char *opt = 0; | 710 | char *opt = 0; |
711 | 711 | ||
712 | switch ( t ) { | 712 | switch ( t ) { |
713 | case ShutdownImpl::ShutdownSystem: | 713 | case ShutdownImpl::ShutdownSystem: |
714 | opt = "-h"; | 714 | opt = "-h"; |
715 | // fall through | 715 | // fall through |
716 | case ShutdownImpl::RebootSystem: | 716 | case ShutdownImpl::RebootSystem: |
717 | if ( opt == 0 ) | 717 | if ( opt == 0 ) |
718 | opt = "-r"; | 718 | opt = "-r"; |
719 | 719 | ||
720 | if ( execl( "/sbin/shutdown", "shutdown", opt, "now", ( void* ) 0) < 0 ) | 720 | if ( execl( "/sbin/shutdown", "shutdown", opt, "now", ( void* ) 0) < 0 ) |
721 | perror("shutdown"); | 721 | perror("shutdown"); |
722 | // ::syslog ( LOG_ERR, "Erroring execing shutdown\n" ); | 722 | // ::syslog ( LOG_ERR, "Erroring execing shutdown\n" ); |
723 | 723 | ||
724 | break; | 724 | break; |
725 | case ShutdownImpl::RestartDesktop: | 725 | case ShutdownImpl::RestartDesktop: |
726 | restart(); | 726 | restart(); |
727 | break; | 727 | break; |
728 | case ShutdownImpl::TerminateDesktop: | 728 | case ShutdownImpl::TerminateDesktop: |
729 | prepareForTermination( FALSE ); | 729 | prepareForTermination( FALSE ); |