From: Heli Hyvättinen Date: Sun, 21 Aug 2011 08:38:49 +0000 (+0300) Subject: Sticky timers are loaded with zero timer at startup X-Git-Tag: v0.4.0~2 X-Git-Url: https://vcs.maemo.org/git/?a=commitdiff_plain;h=d6ebfc1ae1c6c753f39a44478dbf2ad2087a3883;hp=5724e243f3dacb50dc253f29e677c72fdc139732;p=kitchenalert Sticky timers are loaded with zero timer at startup The application shows up earlier, although is blocked. At least the user can see it is starting up. --- diff --git a/src/kitchenalertmainwindow.cpp b/src/kitchenalertmainwindow.cpp index b2dc075..f74da41 100644 --- a/src/kitchenalertmainwindow.cpp +++ b/src/kitchenalertmainwindow.cpp @@ -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 } diff --git a/src/kitchenalertmainwindow.h b/src/kitchenalertmainwindow.h index d80e6c8..9511c40 100644 --- a/src/kitchenalertmainwindow.h +++ b/src/kitchenalertmainwindow.h @@ -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(); +