From d6ebfc1ae1c6c753f39a44478dbf2ad2087a3883 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Heli=20Hyv=C3=A4ttinen?= Date: Sun, 21 Aug 2011 11:38:49 +0300 Subject: [PATCH] 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. --- src/kitchenalertmainwindow.cpp | 2 +- src/kitchenalertmainwindow.h | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) 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(); + -- 1.7.9.5