diff --git a/src/corelib/kernel/qeventdispatcher_win.cpp b/src/corelib/kernel/qeventdispatcher_win.cpp
index e841919600..4cb72cb4a3 100644
--- a/src/corelib/kernel/qeventdispatcher_win.cpp
+++ b/src/corelib/kernel/qeventdispatcher_win.cpp
@@ -53,7 +53,7 @@
 #include "qcoreapplication_p.h"
 #include <private/qthread_p.h>
 #include <private/qwineventnotifier_p.h>
-
+#include <QDebug>
 QT_BEGIN_NAMESPACE
 
 extern uint qGlobalPostedEventsCount();
@@ -249,10 +249,10 @@ LRESULT QT_WIN_CALLBACK qt_internal_proc(HWND hwnd, UINT message, WPARAM wp, LPA
     }
     case WM_TIMER:
         Q_ASSERT(d != 0);
-
-        if (wp == d->sendPostedEventsTimerId)
-            q->sendPostedEvents();
-        else
+qInfo() << "qt_internal_proc() WM_TIMER: wp=" << wp << " d->sendPostedEventsTimerId=" << d->sendPostedEventsTimerId;
+        if (wp == d->sendPostedEventsTimerId) {
+            q->sendPostedEvents(); qInfo() << " q->sendPostedEvents()";
+        } else
             d->sendTimerEvent(wp);
         return 0;
     case WM_QT_SENDPOSTEDEVENTS:
@@ -262,9 +262,9 @@ LRESULT QT_WIN_CALLBACK qt_internal_proc(HWND hwnd, UINT message, WPARAM wp, LPA
         // by the foreign event loop (e.g. from the native modal dialog).
         // Skip sending, if the message queue is not empty.
         // sendPostedEventsTimer will deliver posted events later.
-        static const UINT mask = inputQueueMask();
-        if (HIWORD(GetQueueStatus(mask)) == 0)
-            q->sendPostedEvents();
+        static const UINT mask = inputQueueMask(); qInfo() << "qt_internal_proc() WM_QT_SENDPOSTEDEVENTS: HIWORD(GetQueueStatus(mask))=" << HIWORD(GetQueueStatus(mask));
+        if (HIWORD(GetQueueStatus(mask)) == 0) {
+            q->sendPostedEvents(); qInfo() << " q->sendPostedEvents()";}
         return 0;
     } // switch (message)
 
@@ -277,12 +277,12 @@ LRESULT QT_WIN_CALLBACK qt_GetMessageHook(int code, WPARAM wp, LPARAM lp)
     Q_ASSERT(q != 0);
     QEventDispatcherWin32Private *d = q->d_func();
     MSG *msg = reinterpret_cast<MSG *>(lp);
-
+if(msg->message==WM_QT_SENDPOSTEDEVENTS) qInfo() << "qt_GetMessageHook() with msg->message==WM_QT_SENDPOSTEDEVENTS: msg->hwnd=" << msg->hwnd << " d->internalHwnd=" << d->internalHwnd << "wp=" << wp << " d->sendPostedEventsTimerId=" << d->sendPostedEventsTimerId;
     if (msg->hwnd == d->internalHwnd && msg->message == WM_QT_SENDPOSTEDEVENTS
         && wp == PM_REMOVE && d->sendPostedEventsTimerId == 0) {
         // Start a timer to deliver posted events when the message queue is emptied.
         d->sendPostedEventsTimerId = SetTimer(d->internalHwnd, SendPostedEventsTimerId,
-                                              USER_TIMER_MINIMUM, NULL);
+                                              USER_TIMER_MINIMUM, NULL); qInfo() << " SetTimer() d->internalHwnd=" << d->internalHwnd << " d->sendPostedEventsTimerId=" << d->sendPostedEventsTimerId;
     }
     return d->getMessageHook ? CallNextHookEx(0, code, wp, lp) : 0;
 }
@@ -579,8 +579,8 @@ bool QEventDispatcherWin32::processEvents(QEventLoop::ProcessEventsFlags flags)
                 }
                 if (msg.message == WM_TIMER) {
                     // Skip timer event intended for use inside foreign loop.
-                    if (d->internalHwnd == msg.hwnd && msg.wParam == d->sendPostedEventsTimerId)
-                        continue;
+                    if (d->internalHwnd == msg.hwnd && msg.wParam == d->sendPostedEventsTimerId) {
+                        qInfo() << "QEventDispatcherWin32::processEvents() Skip timer event: d->internalHwnd=" << d->internalHwnd << " d->sendPostedEventsTimerId=" << d->sendPostedEventsTimerId; continue;  }
 
                     // avoid live-lock by keeping track of the timers we've already sent
                     bool found = false;
@@ -973,8 +973,8 @@ void QEventDispatcherWin32::wakeUp()
     Q_D(QEventDispatcherWin32);
     if (d->internalHwnd && d->wakeUps.testAndSetAcquire(0, 1)) {
         // post a WM_QT_SENDPOSTEDEVENTS to this thread if there isn't one already pending
-        if (!PostMessage(d->internalHwnd, WM_QT_SENDPOSTEDEVENTS, 0, 0))
-            qErrnoWarning("QEventDispatcherWin32::wakeUp: Failed to post a message");
+        qInfo() << "QEventDispatcherWin32::wakeUp() PostMessage()"; if (!PostMessage(d->internalHwnd, WM_QT_SENDPOSTEDEVENTS, 0, 0))
+        {qErrnoWarning("QEventDispatcherWin32::wakeUp: Failed to post a message"); qInfo() << " PostMessage() failed";}
     }
 }
 
@@ -1082,4 +1082,4 @@ HWND QEventDispatcherWin32::internalHwnd()
     return d->internalHwnd;
 }
 
-QT_END_NAMESPACE
+QT_END_NAMESPACE
\ No newline at end of file
