Remove QQmlVMEVariant specific workaround
authorFrank Meerkoetter <frank.meerkoetter@basyskom.com>
Thu, 30 Jul 2015 20:54:17 +0000 (22:54 +0200)
committerSimon Hausmann <simon.hausmann@theqtcompany.com>
Tue, 18 Aug 2015 20:26:30 +0000 (20:26 +0000)
A Q4x4Matrix wouldn't fit inside a QQmlVMEVariant. Therefore it was
wrapped in a QVariant.

Change-Id: I68864e456a4fd76143277d5a10d1a3f307e833f2
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
src/quick/util/qquickglobal.cpp

index cc908142aba516dc94866d36b263cb0aa05262ab..f9300545df9069888a737357b85a4a3b366f647e 100644 (file)
@@ -506,15 +506,7 @@ public:
         case QMetaType::QQuaternion:
             return createFromStringTyped<QQuaternion>(data, dataSize, quaternionFromString(s, &ok));
         case QMetaType::QMatrix4x4:
-            {
-            if (dataSize >= sizeof(QMatrix4x4))
-                return createFromStringTyped<QMatrix4x4>(data, dataSize, matrix4x4FromString(s, &ok));
-
-            Q_ASSERT(dataSize >= sizeof(QVariant));
-            QVariant *matVar = reinterpret_cast<QVariant *>(data);
-            new (matVar) QVariant(matrix4x4FromString(s, &ok));
-            return true;
-            }
+            return createFromStringTyped<QMatrix4x4>(data, dataSize, matrix4x4FromString(s, &ok));
         default: break;
         }