mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-30 21:20:28 +00:00
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.
This commit is contained in:
parent
4e06a9629a
commit
90652d3555
@ -91,12 +91,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(100ms, qApp, &QCoreApplication::quit);
|
||||
QTimer::singleShot(100ms, qApp, []()
|
||||
{
|
||||
QCoreApplication::exit();
|
||||
});
|
||||
}
|
||||
|
||||
void AppController::preferencesAction()
|
||||
|
Loading…
Reference in New Issue
Block a user