From d85703608a0a674b577f758a8f9aee9dfcb1ccf3 Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Wed, 14 Sep 2022 13:17:58 +0800 Subject: [PATCH] WebAPI: fix wrong behavior for shutdown action Qt6 has changed implementation for `QCoreApplication::quit` and therefore it is not suitable anymore. Closes #17709. Original PR #17720. --- src/webui/api/appcontroller.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/webui/api/appcontroller.cpp b/src/webui/api/appcontroller.cpp index 7bed59982..39c73fde0 100644 --- a/src/webui/api/appcontroller.cpp +++ b/src/webui/api/appcontroller.cpp @@ -86,12 +86,13 @@ void AppController::buildInfoAction() void AppController::shutdownAction() { - qDebug() << "Shutdown request from Web UI"; - - // Special case handling for shutdown, we + // Special handling for shutdown, we // need to reply to the Web UI before // actually shutting down. - QTimer::singleShot(100, qApp, &QCoreApplication::quit); + QTimer::singleShot(100, qApp, []() + { + QCoreApplication::exit(); + }); } void AppController::preferencesAction()