aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmllistwrapper.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2018-06-25 23:18:33 +0200
committerLars Knoll <lars.knoll@qt.io>2018-07-03 08:08:35 +0000
commit61440411a979c7c317bafccfbf5201d969819a06 (patch)
tree6c5825e21e75587121351bc612a76a7af81ef7be /src/qml/qml/qqmllistwrapper.cpp
parent2aabdd187aae8a953cfcebac8f6c1ba7b19a0727 (diff)
Prefix vtable methods with virtual
Turns out that the overloading of vtable methods and regular ones is problematic in some cases. So let's rather make it explicit which methods are part of the vtable, and which aren't. Change-Id: Ifee32a26104d30f3c82bca8b5a9cdea2d4f4f526 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/qml/qqmllistwrapper.cpp')
-rw-r--r--src/qml/qml/qqmllistwrapper.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/qml/qml/qqmllistwrapper.cpp b/src/qml/qml/qqmllistwrapper.cpp
index 82eb08ddc9..7c35f73e6c 100644
--- a/src/qml/qml/qqmllistwrapper.cpp
+++ b/src/qml/qml/qqmllistwrapper.cpp
@@ -102,7 +102,7 @@ QVariant QmlListWrapper::toVariant() const
}
-ReturnedValue QmlListWrapper::get(const Managed *m, PropertyKey id, const Value *receiver, bool *hasProperty)
+ReturnedValue QmlListWrapper::virtualGet(const Managed *m, PropertyKey id, const Value *receiver, bool *hasProperty)
{
Q_ASSERT(m->as<QmlListWrapper>());
const QmlListWrapper *w = static_cast<const QmlListWrapper *>(m);
@@ -127,10 +127,10 @@ ReturnedValue QmlListWrapper::get(const Managed *m, PropertyKey id, const Value
}
}
- return Object::get(m, id, receiver, hasProperty);
+ return Object::virtualGet(m, id, receiver, hasProperty);
}
-bool QmlListWrapper::put(Managed *m, PropertyKey id, const Value &value, Value *receiver)
+bool QmlListWrapper::virtualPut(Managed *m, PropertyKey id, const Value &value, Value *receiver)
{
// doesn't do anything. Should we throw?
Q_UNUSED(m);
@@ -140,7 +140,7 @@ bool QmlListWrapper::put(Managed *m, PropertyKey id, const Value &value, Value *
return false;
}
-void QmlListWrapper::advanceIterator(Managed *m, ObjectIterator *it, Value *name, uint *index, Property *p, PropertyAttributes *attrs)
+void QmlListWrapper::virtualAdvanceIterator(Managed *m, ObjectIterator *it, Value *name, uint *index, Property *p, PropertyAttributes *attrs)
{
name->setM(nullptr);
*index = UINT_MAX;
@@ -154,7 +154,7 @@ void QmlListWrapper::advanceIterator(Managed *m, ObjectIterator *it, Value *name
p->value = QV4::QObjectWrapper::wrap(w->engine(), w->d()->property().at(&w->d()->property(), *index));
return;
}
- return QV4::Object::advanceIterator(m, it, name, index, p, attrs);
+ return QV4::Object::virtualAdvanceIterator(m, it, name, index, p, attrs);
}
void PropertyListPrototype::init(ExecutionEngine *)