aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2020-09-16 12:59:31 +0200
committerUlf Hermann <ulf.hermann@qt.io>2020-09-16 14:55:27 +0200
commitae9bef00159fa3362309ccf3a9999f75bd45e81e (patch)
treeece223ac23956d44421579cd87e7b439ceba5220 /src/qml/qml
parent876408197b0b2fc8e11e82d318b8ea420206880e (diff)
QQmlValueTypeProvider: Remove dead code
The more adventurous variant/string conversions are luckily unused. Let's remove them before anyone gets ideas. Change-Id: I6f95cbdf9ead12ab723cafdbb2b0f02a0ff461fa Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/qml')
-rw-r--r--src/qml/qml/qqmlglobal.cpp30
-rw-r--r--src/qml/qml/qqmlglobal_p.h4
2 files changed, 0 insertions, 34 deletions
diff --git a/src/qml/qml/qqmlglobal.cpp b/src/qml/qml/qqmlglobal.cpp
index b6a1075c67..1c0bb41804 100644
--- a/src/qml/qml/qqmlglobal.cpp
+++ b/src/qml/qml/qqmlglobal.cpp
@@ -105,34 +105,6 @@ bool QQmlValueTypeProvider::createValueFromString(int type, const QString &s, vo
return false;
}
-bool QQmlValueTypeProvider::createStringFromValue(int type, const void *data, QString *s)
-{
- Q_ASSERT(data);
- Q_ASSERT(s);
-
- QQmlValueTypeProvider *p = this;
- do {
- if (p->createStringFrom(type, data, s))
- return true;
- } while ((p = p->next));
-
- return false;
-}
-
-QVariant QQmlValueTypeProvider::createVariantFromString(const QString &s)
-{
- QVariant v;
-
- QQmlValueTypeProvider *p = this;
- do {
- if (p->variantFromString(s, &v))
- return v;
- } while ((p = p->next));
-
- // Return a variant containing the string itself
- return QVariant(s);
-}
-
QVariant QQmlValueTypeProvider::createVariantFromString(int type, const QString &s, bool *ok)
{
QVariant v;
@@ -223,8 +195,6 @@ const QMetaObject *QQmlValueTypeProvider::getMetaObjectForMetaType(int) { return
bool QQmlValueTypeProvider::init(int, QVariant&) { 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; }
-bool QQmlValueTypeProvider::variantFromString(const QString &, QVariant *) { return false; }
bool QQmlValueTypeProvider::variantFromString(int, const QString &, QVariant *) { return false; }
bool QQmlValueTypeProvider::variantFromJsObject(int, const QV4::Value &, QV4::ExecutionEngine *, QVariant *) { return false; }
bool QQmlValueTypeProvider::equal(int, const void *, const QVariant&) { return false; }
diff --git a/src/qml/qml/qqmlglobal_p.h b/src/qml/qml/qqmlglobal_p.h
index b0f239e398..f2a11e5456 100644
--- a/src/qml/qml/qqmlglobal_p.h
+++ b/src/qml/qml/qqmlglobal_p.h
@@ -228,9 +228,7 @@ public:
QVariant createValueType(int, int, const void *[]);
bool createValueFromString(int, const QString &, void *, size_t);
- bool createStringFromValue(int, const void *, QString *);
- QVariant createVariantFromString(const QString &);
QVariant createVariantFromString(int, const QString &, bool *);
QVariant createVariantFromJsObject(int, const QV4::Value &, QV4::ExecutionEngine *, bool *);
@@ -245,9 +243,7 @@ private:
virtual bool create(int, int, const void *[], QVariant *);
virtual bool createFromString(int, const QString &, void *, size_t);
- virtual bool createStringFrom(int, const void *, QString *);
- virtual bool variantFromString(const QString &, QVariant *);
virtual bool variantFromString(int, const QString &, QVariant *);
virtual bool variantFromJsObject(int, const QV4::Value &, QV4::ExecutionEngine *, QVariant *);