From bb3dc5116ef11d2be82757e623916e025bb03d76 Mon Sep 17 00:00:00 2001 From: Frank Meerkoetter Date: Thu, 30 Jul 2015 22:24:35 +0200 Subject: [PATCH] Remove unused code The QQmlObjectCreator is the only user left. It is using it only with QVariant::Color. Change-Id: I5091fd160841118bee5d6cf6e30798f66c277b69 Reviewed-by: Simon Hausmann --- src/quick/util/qquickglobal.cpp | 27 ++------------------------- 1 file changed, 2 insertions(+), 25 deletions(-) diff --git a/src/quick/util/qquickglobal.cpp b/src/quick/util/qquickglobal.cpp index 55544b1ea..cc908142a 100644 --- a/src/quick/util/qquickglobal.cpp +++ b/src/quick/util/qquickglobal.cpp @@ -679,6 +679,7 @@ public: bool store(int type, const void *src, void *dst, size_t dstSize) Q_DECL_OVERRIDE { + Q_UNUSED(dstSize); switch (type) { case QMetaType::QColor: { @@ -688,31 +689,7 @@ public: new (color) QColor(QColor::fromRgba(*rgb)); return true; } - case QMetaType::QFont: - return typedStore(src, dst, dstSize); - case QMetaType::QVector2D: - return typedStore(src, dst, dstSize); - case QMetaType::QVector3D: - return typedStore(src, dst, dstSize); - case QMetaType::QVector4D: - return typedStore(src, dst, dstSize); - case QMetaType::QQuaternion: - return typedStore(src, dst, dstSize); - case QMetaType::QMatrix4x4: - { - if (dstSize >= sizeof(QMatrix4x4)) - return typedStore(src, dst, dstSize); - - // special case: storing matrix into variant - // eg, QVMEMO QVMEVariant data cell is big enough to store - // QVariant, but not large enough to store QMatrix4x4. - Q_ASSERT(dstSize >= sizeof(QVariant)); - const QMatrix4x4 *srcMat = reinterpret_cast(src); - QVariant *dstMatVar = reinterpret_cast(dst); - new (dstMatVar) QVariant(*srcMat); - return true; - } - default: break; + default: break; } return false; -- 2.34.1