Browse Source

WebAPI: fix wrong behavior for shutdown action

Qt6 has changed implementation for `QCoreApplication::quit` and therefore it is not suitable
anymore.

Closes #17709.
PR #17720.
adaptive-webui-19844
Chocobo1 2 years ago committed by GitHub
parent
commit
90652d3555
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      src/webui/api/appcontroller.cpp

9
src/webui/api/appcontroller.cpp

@ -91,12 +91,13 @@ void AppController::buildInfoAction()
void AppController::shutdownAction() void AppController::shutdownAction()
{ {
qDebug() << "Shutdown request from Web UI"; // Special handling for shutdown, we
// Special case handling for shutdown, we
// need to reply to the Web UI before // need to reply to the Web UI before
// actually shutting down. // actually shutting down.
QTimer::singleShot(100ms, qApp, &QCoreApplication::quit); QTimer::singleShot(100ms, qApp, []()
{
QCoreApplication::exit();
});
} }
void AppController::preferencesAction() void AppController::preferencesAction()

Loading…
Cancel
Save