summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorRolf Eike Beer <eb@emlix.com>2019-06-13 11:05:12 +0200
committerRolf Eike Beer <eb@emlix.com>2019-06-13 11:15:49 +0200
commit47691260ca623643107ace846352a3604436e428 (patch)
tree445b86697e70739ef99836a87f860c3d16752495 /src/corelib
parent0ef61500059e6ebed30b76140a78e6e9149b318e (diff)
move ENDSESSION_* compat defines to before they are actually used
This commit amends 144d33df72e5ca905b1d64134784923d5c. Change-Id: Ic6bc475c9d8c3bb727ee209dbab437a18e219b6d Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/kernel/qcoreapplication_win.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/corelib/kernel/qcoreapplication_win.cpp b/src/corelib/kernel/qcoreapplication_win.cpp
index 75cc813298..4f4a29b41b 100644
--- a/src/corelib/kernel/qcoreapplication_win.cpp
+++ b/src/corelib/kernel/qcoreapplication_win.cpp
@@ -694,6 +694,12 @@ static const char *winPosInsertAfter(quintptr h)
static const char *sessionMgrLogOffOption(uint p)
{
+#ifndef ENDSESSION_CLOSEAPP
+#define ENDSESSION_CLOSEAPP 0x00000001
+#endif
+#ifndef ENDSESSION_CRITICAL
+#define ENDSESSION_CRITICAL 0x40000000
+#endif
static const QWinMessageMapping<uint> values[] = {
{ENDSESSION_CLOSEAPP, "Close application"},
{ENDSESSION_CRITICAL, "Force application end"},
@@ -887,12 +893,6 @@ QString decodeMSG(const MSG& msg)
parameters += QLatin1Char(')');
}
break;
-#ifndef ENDSESSION_CLOSEAPP
-#define ENDSESSION_CLOSEAPP 0x00000001
-#endif
-#ifndef ENDSESSION_CRITICAL
-#define ENDSESSION_CRITICAL 0x40000000
-#endif
case WM_QUERYENDSESSION:
parameters = QLatin1String("End session: ");
if (const char *logoffOption = sessionMgrLogOffOption(uint(wParam)))