author | Michael Krelin <hacker@klever.net> | 2007-07-07 18:39:41 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2007-07-16 11:43:49 (UTC) |
commit | e2d6af387dc3f91e920a867e948d1255710f3604 (patch) (side-by-side diff) | |
tree | 78c43da8e5d0586485f9872f834f08f372eccdd5 | |
parent | 2b97142421c04098b72021b0526873a54ba951d7 (diff) | |
download | opie-e2d6af387dc3f91e920a867e948d1255710f3604.zip opie-e2d6af387dc3f91e920a867e948d1255710f3604.tar.gz opie-e2d6af387dc3f91e920a867e948d1255710f3604.tar.bz2 |
launcher: restart opie from OPIE_BINDIR
-rw-r--r-- | core/launcher/serverapp.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/core/launcher/serverapp.cpp b/core/launcher/serverapp.cpp index 0e92040..b933340 100644 --- a/core/launcher/serverapp.cpp +++ b/core/launcher/serverapp.cpp @@ -718,96 +718,97 @@ void ServerApplication::shutdown( ShutdownImpl::Type t ) case ShutdownImpl::RebootSystem: if ( opt == 0 ) opt = "-r"; if ( execl( "/sbin/shutdown", "shutdown", opt, "now", ( void* ) 0) < 0 ) perror("shutdown"); // ::syslog ( LOG_ERR, "Erroring execing shutdown\n" ); break; case ShutdownImpl::RestartDesktop: restart(); break; case ShutdownImpl::TerminateDesktop: prepareForTermination( FALSE ); // This is a workaround for a Qt bug // clipboard applet has to stop its poll timer, or Qt/E // will hang on quit() right before it emits aboutToQuit() emit aboutToQuit ( ); quit(); break; } } void ServerApplication::restart() { if ( allowRestart ) { /* * Applets and restart is a problem. Some applets delete * their widgets even if ownership gets transfered to the * parent (Systray ) but deleting the applet may be unsafe * as well ( double deletion ). Some have topLevel widgets * and when we dlclose and then delete the widget we will * crash and an crash during restart is not nice */ #ifdef ALL_APPLETS_ON_THIS_WORLD_ARE_FIXED /* same as above */ emit aboutToQuit(); prepareForTermination(TRUE); doRestart = TRUE; quit(); #else prepareForTermination( true ); for ( int fd = 3; fd < 100; fd++ ) close( fd ); execl( ( qpeDir() + "/bin/qpe" ).local8Bit(), "qpe", NULL ); + execl( OPIE_BINDIR "/qpe", "qpe", NULL ); exit( 1 ); #endif } } void ServerApplication::rereadVolumes() { Config cfg( "qpe" ); cfg. setGroup ( "Volume" ); m_screentap_sound = cfg. readBoolEntry ( "TouchSound" ); m_keyclick_sound = cfg. readBoolEntry ( "KeySound" ); m_alarm_sound = cfg. readBoolEntry ( "AlarmSound" ); } void ServerApplication::checkMemory() { #if defined(QPE_HAVE_MEMALERTER) static bool ignoreNormal=TRUE; static bool existingMessage=FALSE; if(existingMessage) return; // don't show a second message while still on first existingMessage = TRUE; switch ( memstate ) { case MemUnknown: break; case MemLow: memstate = MemUnknown; if ( !recoverMemory() ) { QMessageBox::warning( 0 , tr("Memory Status"), tr("Memory Low\nPlease save data.") ); ignoreNormal = FALSE; } break; case MemNormal: memstate = MemUnknown; if ( !ignoreNormal ) { ignoreNormal = TRUE; QMessageBox::information ( 0 , tr("Memory Status"), "Memory OK" ); } break; case MemVeryLow: memstate = MemUnknown; QMessageBox::critical( 0 , tr("Memory Status"), |