summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@digia.com>2013-05-02 17:04:08 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-05-30 12:49:45 +0200
commitaa1b4c0943187d82e0c313b93559e99226a9c75a (patch)
tree4c981f9b1de216b2811fa6b2b0456ccc29ffbad9 /src
parent389b6f51613a2d34b132b3955e8595bc594a336a (diff)
Disable precision timers when running MSVC2012 code on pre-Windows 8.
Precision timers can cause the event loop to lock up when running MSVC2012 code on pre-Windows 8. Task-number: QTBUG-27266 Change-Id: Idd73731e82843d0d140859bab825bc1a54eccf1a Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/kernel/qeventdispatcher_win.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/corelib/kernel/qeventdispatcher_win.cpp b/src/corelib/kernel/qeventdispatcher_win.cpp
index ae291f13cd..d1bd8fbe95 100644
--- a/src/corelib/kernel/qeventdispatcher_win.cpp
+++ b/src/corelib/kernel/qeventdispatcher_win.cpp
@@ -52,6 +52,8 @@
#include "qelapsedtimer.h"
#include "qcoreapplication_p.h"
+#include "qsysinfo.h"
+
#include <private/qthread_p.h>
#include <private/qmutexpool_p.h>
@@ -305,8 +307,14 @@ static void resolveTimerAPI()
#endif
triedResolve = true;
#if !defined(Q_OS_WINCE)
+# if defined(_MSC_VER) && _MSC_VER >= 1700
+ if (QSysInfo::WindowsVersion >= QSysInfo::WV_WINDOWS8) { // QTBUG-27266, Disable when running MSVC2012-built code on pre-Windows 8
+# else
+ {
+# endif
qtimeSetEvent = (ptimeSetEvent)QSystemLibrary::resolve(QLatin1String("winmm"), "timeSetEvent");
qtimeKillEvent = (ptimeKillEvent)QSystemLibrary::resolve(QLatin1String("winmm"), "timeKillEvent");
+ }
#else
qtimeSetEvent = (ptimeSetEvent)QSystemLibrary::resolve(QLatin1String("Mmtimer"), "timeSetEvent");
qtimeKillEvent = (ptimeKillEvent)QSystemLibrary::resolve(QLatin1String("Mmtimer"), "timeKillEvent");