diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2020-09-18 16:17:42 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2020-09-23 14:54:47 +0200 |
commit | 39b5be920cf65979df669d02a3410a7396be6ada (patch) | |
tree | 26f91a48ed294e48b907e0a8a98b2ad6baf187f0 /src/qml/qml/qqmlglobal.cpp | |
parent | 55158d25127173f4a96f2fa70fa7603fa81f8bd9 (diff) |
Eliminate QQmlValueTypeProvider::storeValueType()
It was only used for QColor. The string representation of QColor was
funneled through the color provider to get a numerical RGBA value and
that one was passed to storeValueType() which would create a QColor
object. The RGBA value was retrieved by creating a QColor object. We
can just directly create the QColor from the string, and we can use the
generic create() method for that.
Change-Id: If36775830882237e5e36f748872ce23530c3bb71
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlglobal.cpp')
-rw-r--r-- | src/qml/qml/qqmlglobal.cpp | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/src/qml/qml/qqmlglobal.cpp b/src/qml/qml/qqmlglobal.cpp index 73cc9abc93..22a87c2eec 100644 --- a/src/qml/qml/qqmlglobal.cpp +++ b/src/qml/qml/qqmlglobal.cpp @@ -115,20 +115,6 @@ bool QQmlValueTypeProvider::equalValueType(int type, const void *lhs, const QVar return QMetaType(type).equals(lhs, rhs.constData()); } -bool QQmlValueTypeProvider::storeValueType(int type, const void *src, void *dst, size_t dstSize) -{ - Q_ASSERT(src); - Q_ASSERT(dst); - - QQmlValueTypeProvider *p = this; - do { - if (p->store(type, src, dst, dstSize)) - return true; - } while ((p = p->next)); - - return false; -} - bool QQmlValueTypeProvider::readValueType(const QVariant& src, void *dst, int type) { Q_ASSERT(dst); @@ -153,7 +139,6 @@ bool QQmlValueTypeProvider::writeValueType(int type, const void *src, QVariant& } bool QQmlValueTypeProvider::create(int, const QJSValue &, QVariant *) { return false; } -bool QQmlValueTypeProvider::store(int, const void *, void *, size_t) { return false; } struct ValueTypeProviderList { QQmlValueTypeProvider nullProvider; |