summaryrefslogtreecommitdiff
authoralwin <alwin>2004-02-26 22:26:20 (UTC)
committer alwin <alwin>2004-02-26 22:26:20 (UTC)
commitcb7a0156d641e96dfb6fe1cea6ca3a26e54ce6b2 (patch) (side-by-side diff)
tree90b117bd6df3cc7ead72d191e618655725f84dc2
parent303b5a8e72fe319e6123b01f104b7cb049599f6f (diff)
downloadopie-cb7a0156d641e96dfb6fe1cea6ca3a26e54ce6b2.zip
opie-cb7a0156d641e96dfb6fe1cea6ca3a26e54ce6b2.tar.gz
opie-cb7a0156d641e96dfb6fe1cea6ca3a26e54ce6b2.tar.bz2
flag ms_is_starting
it will be set true until the main eventloop is reached. Check it with ServerApp::isStarting()
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/launcher/serverapp.cpp14
-rw-r--r--core/launcher/serverapp.h4
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
@@ -257,16 +257,17 @@ QPE_MEMALERTER_IMPL
#endif
//---------------------------------------------------------------------------
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() ;
if ( !dapp-> m_screensaver )
@@ -279,17 +280,17 @@ void ServerApplication::switchLCD( bool on ) {
dapp-> m_screensaver-> setDisplayState ( false );
}
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;
pa = new DesktopPowerAlerter( 0 );
@@ -841,10 +842,21 @@ void ServerApplication::soundAlarm() {
ODevice::inst()->playAlarmSound();
}
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
@@ -90,20 +90,23 @@ public:
ServerApplication( int& argc, char **argv, Type t );
~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();
void backlight();
void symbol();
@@ -150,16 +153,17 @@ private:
QDateTime m_suspendTime;
int m_powerVeryLow;
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;
};
#endif // SERVERAPP_H