From 1e4e9a2674d05e7a9e099e395c8b3b80771c45bd Mon Sep 17 00:00:00 2001 From: tobtoht Date: Thu, 23 Jun 2022 20:07:16 +0200 Subject: [PATCH] inactivity lock: restore Qt 5 hack --- src/MainWindow.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index adb6658d..c90cf2ff 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -1654,11 +1654,15 @@ void MainWindow::checkUserActivity() { this->close(); // This doesn't close the wallet immediately. // FIXME -// do { +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) + do { +#endif QApplication::processEvents(); - // Because running it a single time is apparently not enough. - // TODO: Qt bug? Need proper fix for this. -// } while (QApplication::hasPendingEvents()); +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) + // Because running it a single time is apparently not enough. + // TODO: Qt bug? Need proper fix for this. + } while (QApplication::hasPendingEvents()); +#endif } else { m_checkUserActivity.start(); } -- 2.52.0