From cc5e3da2cf524e88052620eed6b9cfc9c48b8ad4 Mon Sep 17 00:00:00 2001 From: Maurice Kalinowski Date: Tue, 27 Sep 2016 10:31:31 +0200 Subject: winrt: Fix crash on ARM in release mode The compiler seems to mis-optimize the switch/case statements causing a QString construction to end up in handling a QUrl and behaving unpredictable from there (crashes for some example). Change-Id: Idd2b6b64f1f41d0aa9204dd73dfdf7f5d0541798 Reviewed-by: Lars Knoll Reviewed-by: Simon Hausmann --- src/qml/qml/qqmlvmemetaobject.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/qml/qml/qqmlvmemetaobject.cpp b/src/qml/qml/qqmlvmemetaobject.cpp index c8281f02c0..4f13b44fc0 100644 --- a/src/qml/qml/qqmlvmemetaobject.cpp +++ b/src/qml/qml/qqmlvmemetaobject.cpp @@ -608,6 +608,9 @@ QRectF QQmlVMEMetaObject::readPropertyAsRectF(int id) return v->d()->data.value(); } +#if defined(Q_OS_WINRT) && defined(_M_ARM) +#pragma optimize("", off) +#endif int QQmlVMEMetaObject::metaCall(QObject *o, QMetaObject::Call c, int _id, void **a) { Q_ASSERT(o == object); @@ -969,6 +972,9 @@ int QQmlVMEMetaObject::metaCall(QObject *o, QMetaObject::Call c, int _id, void * else return object->qt_metacall(c, _id, a); } +#if defined(Q_OS_WINRT) && defined(_M_ARM) +#pragma optimize("", on) +#endif QV4::ReturnedValue QQmlVMEMetaObject::method(int index) { -- cgit v1.2.3