-rw-r--r-- | core/launcher/desktop.cpp | 5 |
1 files changed, 2 insertions, 3 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 @@ -554,29 +554,28 @@ void Desktop::raiseEmail() // autoStarts apps on resume and start void Desktop::execAutoStart() { QString appName; int delay; QDateTime now = QDateTime::currentDateTime(); Config cfg( "autostart" ); cfg.setGroup( "AutoStart" ); 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) ) { + if ( suspendTime.secsTo( now ) >= ( delay * 60 ) && !appName.isEmpty() ) { QCopEnvelope e("QPE/System", "execute(QString)"); e << QString(appName); - } //else { - //} + } } #if defined(QPE_HAVE_TOGGLELIGHT) #include <qpe/config.h> #include <sys/ioctl.h> #include <sys/types.h> #include <fcntl.h> #include <unistd.h> #include <errno.h> #include <linux/ioctl.h> #include <time.h> |