summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@digia.com>2013-05-02 15:04:08 (GMT)
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-06-04 09:54:52 (GMT)
commitaea654b84713b8085ee0a291e3325b1ca53080aa (patch)
treea92301307b7e8973ba8af8d9a5407ac651a68db4 /src
parent222613cd65513e8cbf66e1df1515869ad6d29063 (diff)
downloadQt-aea654b84713b8085ee0a291e3325b1ca53080aa.zip
Qt-aea654b84713b8085ee0a291e3325b1ca53080aa.tar.gz
Qt-aea654b84713b8085ee0a291e3325b1ca53080aa.tar.bz2
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> (cherry picked from qtbase/aa1b4c0943187d82e0c313b93559e99226a9c75a)
Diffstat (limited to 'src')
-rw-r--r--src/corelib/kernel/qeventdispatcher_win.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/corelib/kernel/qeventdispatcher_win.cpp b/src/corelib/kernel/qeventdispatcher_win.cpp
index c05f90c..6e85890 100644
--- a/src/corelib/kernel/qeventdispatcher_win.cpp
+++ b/src/corelib/kernel/qeventdispatcher_win.cpp
@@ -326,7 +326,11 @@ static void resolveTimerAPI()
#else
QSystemLibrary library(QLatin1String("winmm"));
#endif
- if (library.load()) {
+ if (
+#if defined(_MSC_VER) && _MSC_VER >= 1700 // QTBUG-27266, Disable when running MSVC2012-built code on pre-Windows
+ QSysInfo::WindowsVersion >= QSysInfo::WV_WINDOWS8 &&
+#endif
+ library.load()) {
qtimeSetEvent = (ptimeSetEvent)library.resolve("timeSetEvent");
qtimeKillEvent = (ptimeKillEvent)library.resolve("timeKillEvent");
}