summaryrefslogtreecommitdiff
authorharlekin <harlekin>2002-08-27 21:11:47 (UTC)
committer harlekin <harlekin>2002-08-27 21:11:47 (UTC)
commita6432554a1e64d54c53c1400aa1dfa11ae83f11a (patch) (side-by-side diff)
treebaae8b562962d952904e07a5b2317041a9e37ede
parent86352e32f449ecf00de254674b7dcac72bc34a14 (diff)
downloadopie-a6432554a1e64d54c53c1400aa1dfa11ae83f11a.zip
opie-a6432554a1e64d54c53c1400aa1dfa11ae83f11a.tar.gz
opie-a6432554a1e64d54c53c1400aa1dfa11ae83f11a.tar.bz2
small fix for autostart
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/desktop.cpp35
1 files changed, 17 insertions, 18 deletions
diff --git a/core/launcher/desktop.cpp b/core/launcher/desktop.cpp
index 552c7c3..fb10602 100644
--- a/core/launcher/desktop.cpp
+++ b/core/launcher/desktop.cpp
@@ -201,7 +201,7 @@ bool DesktopApplication::qwsEventFilter( QWSEvent *e )
will not send multiple repeats if user holds key
i.e. one shot
-
+
*/
- if (!keyRegisterList.isEmpty()) {
+ if (!keyRegisterList.isEmpty()) {
KeyRegisterList::Iterator it;
for( it = keyRegisterList.begin(); it != keyRegisterList.end(); ++it ) {
@@ -251,5 +251,5 @@ bool DesktopApplication::qwsEventFilter( QWSEvent *e )
return TRUE;
}
-// This was used for the iPAQ PowerButton
+// This was used for the iPAQ PowerButton
// See main.cpp for new KeyboardFilter
//
@@ -560,13 +560,12 @@ void Desktop::execAutoStart() {
Config cfg( "autostart" );
cfg.setGroup( "AutoStart" );
- appName = cfg.readEntry("Apps", "");
- delay = (cfg.readEntry("Delay", "0" )).toInt();
+ appName = cfg.readEntry( "Apps", "" );
+ delay = ( cfg.readEntry( "Delay", "0" ) ).toInt();
// If the time between suspend and resume was longer then the
// value saved as delay, start the app
- if ( suspendTime.secsTo(now) >= (delay*60) ) {
- QCopEnvelope e("QPE/System", "execute(QString)");
- e << QString(appName);
- } //else {
- //}
+ if ( suspendTime.secsTo( now ) >= ( delay * 60 ) && !appName.isEmpty() ) {
+ QCopEnvelope e( "QPE/System", "execute(QString)" );
+ e << QString( appName );
+ }
}
@@ -608,8 +607,8 @@ void Desktop::togglePower()
static bool excllock = false;
-
+
if ( excllock )
return;
-
+
excllock = true;
@@ -639,7 +638,7 @@ void Desktop::togglePower()
//qcopBridge->closeOpenConnections();
//qDebug("called togglePower()!!!!!!");
-
+
qApp-> processEvents ( );
-
+
excllock = false;
}
@@ -701,10 +700,10 @@ void DesktopApplication::shutdown( ShutdownImpl::Type t )
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()
+ // will hang on quit() right before it emits aboutToQuit()
emit aboutToQuit ( );
-
+
quit();
break;
@@ -799,5 +798,5 @@ bool Desktop::eventFilter( QObject *, QEvent *ev )
if ( ke-> key ( ) == Qt::Key_F11 ) { // menu key
QWidget *active = qApp-> activeWindow ( );
-
+
if ( active && active-> isPopup ( ))
active->close();