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>
This commit is contained in:
parent
389b6f5161
commit
aa1b4c0943
@ -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");
|
||||
|
Loading…
x
Reference in New Issue
Block a user