diff options
author | Bradley T. Hughes <bradley.hughes@nokia.com> | 2009-12-11 10:03:26 (GMT) |
---|---|---|
committer | Bradley T. Hughes <bradley.hughes@nokia.com> | 2009-12-11 10:08:31 (GMT) |
commit | 9364907eb92a51d054b54fe543c62df3bd203deb (patch) | |
tree | 69a7c43215e827e4ce3e1eba6a68cb5987707cfd /src/corelib/kernel/qeventdispatcher_win.cpp | |
parent | 3b544e59d30a5cfb3953e75bf72477b3c3d60bb1 (diff) | |
download | Qt-9364907eb92a51d054b54fe543c62df3bd203deb.zip Qt-9364907eb92a51d054b54fe543c62df3bd203deb.tar.gz Qt-9364907eb92a51d054b54fe543c62df3bd203deb.tar.bz2 |
Compile on Windows CE.
GetMessageTime() is not available, so 9215506e6a057d8aef7415c2921214e1ba1c760d
is not possible on Windows CE
Diffstat (limited to 'src/corelib/kernel/qeventdispatcher_win.cpp')
-rw-r--r-- | src/corelib/kernel/qeventdispatcher_win.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/corelib/kernel/qeventdispatcher_win.cpp b/src/corelib/kernel/qeventdispatcher_win.cpp index 105cf28..b98d08e 100644 --- a/src/corelib/kernel/qeventdispatcher_win.cpp +++ b/src/corelib/kernel/qeventdispatcher_win.cpp @@ -341,7 +341,9 @@ public: // for controlling when to send posted events QAtomicInt serialNumber; int lastSerialNumber; +#ifndef Q_OS_WINCE int lastMessageTime; +#endif QAtomicInt wakeUps; // timers @@ -366,7 +368,11 @@ public: QEventDispatcherWin32Private::QEventDispatcherWin32Private() : threadId(GetCurrentThreadId()), interrupt(false), internalHwnd(0), getMessageHook(0), - serialNumber(0), lastSerialNumber(0), lastMessageTime(0), wakeUps(0) + serialNumber(0), lastSerialNumber(0), +#ifndef Q_OS_WINCE + lastMessageTime(0), +#endif + wakeUps(0) { resolveTimerAPI(); } @@ -481,7 +487,9 @@ LRESULT CALLBACK qt_internal_proc(HWND hwnd, UINT message, WPARAM wp, LPARAM lp) int localSerialNumber = d->serialNumber; if (localSerialNumber != d->lastSerialNumber) { d->lastSerialNumber = localSerialNumber; +#ifndef Q_OS_WINCE d->lastMessageTime = GetMessageTime(); +#endif QCoreApplicationPrivate::sendPostedEvents(0, 0, d->threadData); } return 0; @@ -499,7 +507,10 @@ LRESULT CALLBACK qt_GetMessageHook(int code, WPARAM wp, LPARAM lp) QEventDispatcherWin32Private *d = q->d_func(); int localSerialNumber = d->serialNumber; if (HIWORD(GetQueueStatus(QS_INPUT | QS_RAWINPUT | QS_TIMER)) == 0 - || GetMessageTime() - d->lastMessageTime >= 10) { +#ifndef Q_OS_WINCE + || GetMessageTime() - d->lastMessageTime >= 10 +#endif + ) { // no more input or timer events in the message queue or more than 10ms has elapsed since // we send posted events, we can allow posted events to be sent now (void) d->wakeUps.fetchAndStoreRelease(0); |