mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-12 16:23:07 -07:00
Use proper method for deferred calls
This commit is contained in:
parent
a59a6ce8e4
commit
3f762a416d
3 changed files with 9 additions and 6 deletions
|
@ -47,6 +47,7 @@
|
|||
#include <QByteArray>
|
||||
#include <QDebug>
|
||||
#include <QLibraryInfo>
|
||||
#include <QMetaObject>
|
||||
#include <QProcess>
|
||||
|
||||
#ifndef DISABLE_GUI
|
||||
|
@ -770,7 +771,7 @@ void Application::shutdownCleanup(QSessionManager &manager)
|
|||
// According to the qt docs we shouldn't call quit() inside a slot.
|
||||
// aboutToQuit() is never emitted if the user hits "Cancel" in
|
||||
// the above dialog.
|
||||
QTimer::singleShot(0, qApp, &QCoreApplication::quit);
|
||||
QMetaObject::invokeMethod(qApp, &QCoreApplication::quit, Qt::QueuedConnection);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue