diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2020-09-18 16:34:11 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2020-09-23 14:54:47 +0200 |
commit | 2d02307e73b63c8d2ce935a9d7dd7b177c017f87 (patch) | |
tree | 8751f6c3354d24bd4f13182e5178a98b8fca0263 /src/qml/qml/qqmlglobal.cpp | |
parent | 39b5be920cf65979df669d02a3410a7396be6ada (diff) |
Condense the different value type creation functions into one
They all did the same thing.
Change-Id: I7661b19ad16c0713d46c4df337899e3897349b2e
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlglobal.cpp')
-rw-r--r-- | src/qml/qml/qqmlglobal.cpp | 31 |
1 files changed, 1 insertions, 30 deletions
diff --git a/src/qml/qml/qqmlglobal.cpp b/src/qml/qml/qqmlglobal.cpp index 22a87c2eec..4d3c81037e 100644 --- a/src/qml/qml/qqmlglobal.cpp +++ b/src/qml/qml/qqmlglobal.cpp @@ -67,20 +67,7 @@ bool QQmlValueTypeProvider::initValueType(int type, QVariant& dst) return true; } -QVariant QQmlValueTypeProvider::createValueType(int type, const QJSValue ¶ms) -{ - QVariant v; - - QQmlValueTypeProvider *p = this; - do { - if (p->create(type, params, &v)) - return v; - } while ((p = p->next)); - - return QVariant(); -} - -bool QQmlValueTypeProvider::createValueFromString(int type, const QJSValue &s, QVariant *data) +bool QQmlValueTypeProvider::createValueType(int type, const QJSValue &s, QVariant *data) { Q_ASSERT(data); @@ -93,22 +80,6 @@ bool QQmlValueTypeProvider::createValueFromString(int type, const QJSValue &s, Q return false; } -QVariant QQmlValueTypeProvider::createVariantFromJsObject(int type, const QJSValue &obj, bool *ok) -{ - QVariant v; - - QQmlValueTypeProvider *p = this; - do { - if (p->create(type, obj, &v)) { - if (ok) *ok = true; - return v; - } - } while ((p = p->next)); - - if (ok) *ok = false; - return QVariant(); -} - bool QQmlValueTypeProvider::equalValueType(int type, const void *lhs, const QVariant& rhs) { Q_ASSERT(lhs); |