From edd7ef95dde41036735ebb8e9b74a92092aea8b6 Mon Sep 17 00:00:00 2001 From: Bob Kenny Date: Mon, 4 Jan 2016 01:48:40 -0500 Subject: [PATCH] Corrected logic in on_aboutToQuit(). processEvents() should occur before msleep(), so that the Notify gets displayed properly. msleep() before process events did not cause the Notify to occur in opensuse Linux. Instead, an empty Notify appeared. --- sleepyhead/mainwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sleepyhead/mainwindow.cpp b/sleepyhead/mainwindow.cpp index 5d958f22..4a1bd824 100644 --- a/sleepyhead/mainwindow.cpp +++ b/sleepyhead/mainwindow.cpp @@ -490,8 +490,8 @@ void loadChannels() void MainWindow::on_aboutToQuit() { Notify(QObject::tr("Don't forget to place your datacard back in your CPAP machine"), QObject::tr("SleepyHead Reminder")); - QThread::msleep(1000); QApplication::processEvents(); + QThread::msleep(1000); } void MainWindow::closeEvent(QCloseEvent * event)