-rw-r--r-- | core/launcher/serverapp.cpp | 14 | ||||
-rw-r--r-- | core/launcher/serverapp.h | 4 |
2 files changed, 17 insertions, 1 deletions
diff --git a/core/launcher/serverapp.cpp b/core/launcher/serverapp.cpp index 11381e6..f7c2341 100644 --- a/core/launcher/serverapp.cpp +++ b/core/launcher/serverapp.cpp @@ -259,12 +259,13 @@ QPE_MEMALERTER_IMPL //--------------------------------------------------------------------------- bool ServerApplication::doRestart = FALSE; bool ServerApplication::allowRestart = TRUE; +bool ServerApplication::ms_is_starting = TRUE; void ServerApplication::switchLCD( bool on ) { if ( !qApp ) return; ServerApplication *dapp = ServerApplication::me() ; @@ -281,13 +282,13 @@ void ServerApplication::switchLCD( bool on ) { } ServerApplication::ServerApplication( int& argc, char **argv, Type t ) : QPEApplication( argc, argv, t ) { - + ms_is_starting = true; // We know we'll have lots of cached pixmaps due to App/DocLnks QPixmapCache::setCacheLimit(512); m_ps = new PowerStatus; m_ps_last = new PowerStatus; @@ -843,8 +844,19 @@ void ServerApplication::soundAlarm() { ServerApplication *ServerApplication::me ( ) { return static_cast<ServerApplication*>( qApp ); } +bool ServerApplication::isStarting() +{ + return ms_is_starting; +} + +int ServerApplication::exec() +{ + ms_is_starting = true; + qDebug("Serverapp - exec"); + return QPEApplication::exec(); +} #include "serverapp.moc" diff --git a/core/launcher/serverapp.h b/core/launcher/serverapp.h index fe3f24a..4d9f808 100644 --- a/core/launcher/serverapp.h +++ b/core/launcher/serverapp.h @@ -91,17 +91,20 @@ public: ~ServerApplication(); static bool doRestart; static bool allowRestart; static bool screenLocked(); static void login(bool at_poweron); + + static bool isStarting(); static void switchLCD ( bool on ); // only for togglePower in Desktop static void soundAlarm(); // only because QCop soundAlarm() is defined in QPE/TaskBar void restart(); + int exec(); signals: void menu(); void home(); void launch(); void power(); @@ -152,12 +155,13 @@ private: int m_powerCritical; int m_currentPowerLevel; bool m_keyclick_sound : 1; bool m_screentap_sound : 1; bool m_alarm_sound : 1; + static bool ms_is_starting; friend class KeyFilter; }; |