Tell Windows to wait during shutdown by creating a ShutdownBlockReason.

Huge thanks to paolo-sz for bringing this to my attention, for the various patches he tried to submit and for testing.
See issue #1984 for complete history.
Closes #1535.
This commit is contained in:
sledgehammer999 2015-04-16 00:47:59 +03:00
parent 6c1740f78f
commit 6644fe0714
4 changed files with 106 additions and 5 deletions

View file

@ -38,6 +38,13 @@
#include "qtsingleapplication.h"
typedef QtSingleApplication BaseApplication;
class MainWindow;
#ifdef Q_OS_WIN
QT_BEGIN_NAMESPACE
class QSessionManager;
QT_END_NAMESPACE
#endif // Q_OS_WIN
#else
#include "qtsinglecoreapplication.h"
typedef QtSingleCoreApplication BaseApplication;
@ -71,6 +78,9 @@ protected:
private slots:
void processMessage(const QString &message);
void cleanup();
#if (!defined(DISABLE_GUI) && defined(Q_OS_WIN))
void shutdownCleanup(QSessionManager &manager);
#endif
private:
bool m_running;