summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qcoreapplication_win.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/kernel/qcoreapplication_win.cpp')
-rw-r--r--src/corelib/kernel/qcoreapplication_win.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/corelib/kernel/qcoreapplication_win.cpp b/src/corelib/kernel/qcoreapplication_win.cpp
index dd1b84aa58..418074dc7a 100644
--- a/src/corelib/kernel/qcoreapplication_win.cpp
+++ b/src/corelib/kernel/qcoreapplication_win.cpp
@@ -1,5 +1,6 @@
/****************************************************************************
**
+** Copyright (C) 2013 Samuel Gaist <samuel.gaist@edeltech.ch>
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
@@ -990,6 +991,24 @@ QString decodeMSG(const MSG& msg)
}
break;
#endif
+#ifdef WM_QUERYENDSESSION
+#ifndef ENDSESSION_CLOSEAPP
+#define ENDSESSION_CLOSEAPP 0x00000001
+#endif
+#ifndef ENDSESSION_CRITICAL
+#define ENDSESSION_CRITICAL 0x40000000
+#endif
+ case WM_QUERYENDSESSION:
+ {
+ QString logoffOption = valueCheck(wParam,
+ FLAG_STRING(ENDSESSION_CLOSEAPP, "Close application"),
+ FLAG_STRING(ENDSESSION_CRITICAL, "Force application end"),
+ FLAG_STRING(ENDSESSION_LOGOFF, "User logoff"),
+ FLAG_STRING());
+ parameters.sprintf("End session: %s", logoffOption.toLatin1().data());
+ }
+ break;
+#endif
default:
parameters.sprintf("wParam(0x%p) lParam(0x%p)", (void *)wParam, (void *)lParam);
break;