Sticky timers are loaded with zero timer at startup
authorHeli Hyvättinen <heli.hyvattinen@kymp.net>
Sun, 21 Aug 2011 08:38:49 +0000 (11:38 +0300)
committerHeli Hyvättinen <heli.hyvattinen@kymp.net>
Sun, 21 Aug 2011 08:38:49 +0000 (11:38 +0300)
The application shows up earlier, although is blocked. At least the user
can see it is starting up.

src/kitchenalertmainwindow.cpp
src/kitchenalertmainwindow.h

index b2dc075..f74da41 100644 (file)
@@ -104,7 +104,7 @@ KitchenAlertMainWindow::KitchenAlertMainWindow(QWidget *parent) :
   connect(p_StickyAction, SIGNAL(triggered()),this,SLOT(openStickyDialog()));
   menuBar()->addAction(p_StickyAction);
 
-  loadStickies();
+  QTimer::singleShot(0,this,SLOT(loadStickies())); //Load sticky timers after construction to speed the application showing up
 
     }
 
index d80e6c8..9511c40 100644 (file)
@@ -126,6 +126,9 @@ public slots:
     /*! Opens a dialog for choosing which timers to preload at start */
     void openStickyDialog();
 
+   /*! Loads the sticky timers. */
+    bool loadStickies();
+
 signals:
 
     void defaultSoundEnabled();
@@ -146,7 +149,7 @@ protected:
     */
     void disableSelectionDependentButtons();
 
-    bool loadStickies();
+