summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorSérgio Martins <sergio.martins@kdab.com>2014-06-20 12:34:30 +0100
committerSérgio Martins <sergio.martins@kdab.com>2014-06-23 14:59:29 +0200
commit1e54f1316d30eae86bc38490f84aa55ee4568a25 (patch)
treedf6c0bc9bb2ef4cb761c295b3b90e2239cb44bcf /src/corelib
parent83ecf1e97d13fb94023cf4a43e9ae45702e4a762 (diff)
Print the reason why SetWindowsHookEx failed.
Task-number: QTBUG-14301 Change-Id: I4733a57034259b013864bf91aba6cce2f411ab48 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/kernel/qeventdispatcher_win.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/corelib/kernel/qeventdispatcher_win.cpp b/src/corelib/kernel/qeventdispatcher_win.cpp
index db2d30f2f5..f38ac7bf26 100644
--- a/src/corelib/kernel/qeventdispatcher_win.cpp
+++ b/src/corelib/kernel/qeventdispatcher_win.cpp
@@ -656,7 +656,9 @@ void QEventDispatcherWin32::createInternalHwnd()
// setup GetMessage hook needed to drive our posted events
d->getMessageHook = SetWindowsHookEx(WH_GETMESSAGE, (HOOKPROC) qt_GetMessageHook, NULL, GetCurrentThreadId());
if (!d->getMessageHook) {
- qFatal("Qt: INTERNALL ERROR: failed to install GetMessage hook");
+ int errorCode = GetLastError();
+ qFatal("Qt: INTERNAL ERROR: failed to install GetMessage hook: %d, %s",
+ errorCode, qPrintable(qt_error_string(errorCode)));
}
#endif