diff options
author | Frank Meerkoetter <frank.meerkoetter@basyskom.com> | 2015-07-30 21:57:24 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2015-08-18 20:26:16 +0000 |
commit | 8049154bd57394118a3eefdd63ab00940161e785 (patch) | |
tree | 6a26d56bba219c8c1cf3850782706edd3a24da2e /src | |
parent | a9ef319e154c0a0b9a3455c3d10459ddc866b36d (diff) | |
download | qtdeclarative-8049154bd57394118a3eefdd63ab00940161e785.tar.gz qtdeclarative-8049154bd57394118a3eefdd63ab00940161e785.tar.bz2 qtdeclarative-8049154bd57394118a3eefdd63ab00940161e785.zip |
Also remove the QQmlValueTypeProvider::destroyValueType interface
After the removeal of the QQmlVMEVariant there is no user left.
Change-Id: I97224127aac57aba9a80827f9292018d03609b85
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/qml/qml/qqmlglobal.cpp | 14 | ||||
-rw-r--r-- | src/qml/qml/qqmlglobal_p.h | 2 | ||||
-rw-r--r-- | src/quick/util/qquickglobal.cpp | 41 |
3 files changed, 0 insertions, 57 deletions
diff --git a/src/qml/qml/qqmlglobal.cpp b/src/qml/qml/qqmlglobal.cpp index 17de696af..aa2b4b6ae 100644 --- a/src/qml/qml/qqmlglobal.cpp +++ b/src/qml/qml/qqmlglobal.cpp @@ -73,19 +73,6 @@ bool QQmlValueTypeProvider::initValueType(int type, QVariant& dst) return false; } -bool QQmlValueTypeProvider::destroyValueType(int type, void *data, size_t n) -{ - Q_ASSERT(data); - - QQmlValueTypeProvider *p = this; - do { - if (p->destroy(type, data, n)) - return true; - } while ((p = p->next)); - - return false; -} - QVariant QQmlValueTypeProvider::createValueType(int type, int argc, const void *argv[]) { QVariant v; @@ -227,7 +214,6 @@ bool QQmlValueTypeProvider::writeValueType(int type, const void *src, QVariant& const QMetaObject *QQmlValueTypeProvider::getMetaObjectForMetaType(int) { return 0; } bool QQmlValueTypeProvider::init(int, QVariant&) { return false; } -bool QQmlValueTypeProvider::destroy(int, void *, size_t) { return false; } bool QQmlValueTypeProvider::create(int, int, const void *[], QVariant *) { return false; } bool QQmlValueTypeProvider::createFromString(int, const QString &, void *, size_t) { return false; } bool QQmlValueTypeProvider::createStringFrom(int, const void *, QString *) { return false; } diff --git a/src/qml/qml/qqmlglobal_p.h b/src/qml/qml/qqmlglobal_p.h index c19f7dab6..d09ae21f5 100644 --- a/src/qml/qml/qqmlglobal_p.h +++ b/src/qml/qml/qqmlglobal_p.h @@ -225,7 +225,6 @@ public: const QMetaObject *metaObjectForMetaType(int); bool initValueType(int, QVariant&); - bool destroyValueType(int, void *, size_t); QVariant createValueType(int, int, const void *[]); bool createValueFromString(int, const QString &, void *, size_t); @@ -243,7 +242,6 @@ public: private: virtual const QMetaObject *getMetaObjectForMetaType(int); virtual bool init(int, QVariant&); - virtual bool destroy(int, void *, size_t); virtual bool create(int, int, const void *[], QVariant *); virtual bool createFromString(int, const QString &, void *, size_t); diff --git a/src/quick/util/qquickglobal.cpp b/src/quick/util/qquickglobal.cpp index adf3a68e9..d7f1158a6 100644 --- a/src/quick/util/qquickglobal.cpp +++ b/src/quick/util/qquickglobal.cpp @@ -427,47 +427,6 @@ public: return false; } - template<typename T> - bool typedDestroy(void *data, size_t dataSize) - { - ASSERT_VALID_SIZE(dataSize, sizeof(T)); - T *t = reinterpret_cast<T *>(data); - t->~T(); - return true; - } - - bool destroy(int type, void *data, size_t dataSize) - { - switch (type) { - case QMetaType::QColor: - return typedDestroy<QColor>(data, dataSize); - case QMetaType::QFont: - return typedDestroy<QFont>(data, dataSize); - case QMetaType::QVector2D: - return typedDestroy<QVector2D>(data, dataSize); - case QMetaType::QVector3D: - return typedDestroy<QVector3D>(data, dataSize); - case QMetaType::QVector4D: - return typedDestroy<QVector4D>(data, dataSize); - case QMetaType::QQuaternion: - return typedDestroy<QQuaternion>(data, dataSize); - case QMetaType::QMatrix4x4: - { - if (dataSize >= sizeof(QMatrix4x4)) - return typedDestroy<QMatrix4x4>(data, dataSize); - - // special case: destroying matrix-containing qvariant. - Q_ASSERT(dataSize >= sizeof(QVariant)); - QVariant *matvar = reinterpret_cast<QVariant *>(data); - matvar->~QVariant(); - return true; - } - default: break; - } - - return false; - } - bool create(int type, int argc, const void *argv[], QVariant *v) { switch (type) { |