mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-21 05:43:32 -07:00
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.
This commit is contained in:
parent
f9811ec3b0
commit
d85703608a
1 changed files with 5 additions and 4 deletions
|
@ -86,12 +86,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(100, qApp, &QCoreApplication::quit);
|
QTimer::singleShot(100, qApp, []()
|
||||||
|
{
|
||||||
|
QCoreApplication::exit();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void AppController::preferencesAction()
|
void AppController::preferencesAction()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue