diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-05-31 13:47:44 +0200 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-05-31 13:47:45 +0200 |
commit | 883951928fc6d5c0d06c24a9a1790eeb805b1587 (patch) | |
tree | 243e00da0c28078f53fbb88d133582e5f475a9ec /src/corelib | |
parent | 3523c9e138dc8591619d21f24f60ded27bd7e7e3 (diff) | |
parent | 9e36747786b31c9494f99af5e1f7c977b51b7ce7 (diff) |
Merge remote-tracking branch 'origin/release' into stable
Change-Id: I0a8fe79a80b7720f76e3c0b03cc2c9a769d4009b
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/global/qendian.h | 5 | ||||
-rw-r--r-- | src/corelib/kernel/qeventdispatcher_win.cpp | 8 |
2 files changed, 12 insertions, 1 deletions
diff --git a/src/corelib/global/qendian.h b/src/corelib/global/qendian.h index c9c4d23aab..9b939feea0 100644 --- a/src/corelib/global/qendian.h +++ b/src/corelib/global/qendian.h @@ -78,7 +78,10 @@ template <typename T> inline void qbswap(const T src, uchar *dest) // If you want to avoid the memcopy, you must write specializations for this function template <typename T> inline void qToUnaligned(const T src, uchar *dest) { - memcpy(dest, &src, sizeof(T)); + // Using sizeof(T) inside memcpy function produces internal compiler error with + // MSVC2008/ARM in tst_endian -> use extra indirection to resolve size of T. + const size_t size = sizeof(T); + memcpy(dest, &src, size); } /* T qFromLittleEndian(const uchar *src) 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"); |