summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2013-05-31 13:47:44 +0200
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2013-05-31 13:47:45 +0200
commit883951928fc6d5c0d06c24a9a1790eeb805b1587 (patch)
tree243e00da0c28078f53fbb88d133582e5f475a9ec /src/corelib
parent3523c9e138dc8591619d21f24f60ded27bd7e7e3 (diff)
parent9e36747786b31c9494f99af5e1f7c977b51b7ce7 (diff)
Merge remote-tracking branch 'origin/release' into stable
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/global/qendian.h5
-rw-r--r--src/corelib/kernel/qeventdispatcher_win.cpp8
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");