From 61440411a979c7c317bafccfbf5201d969819a06 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Mon, 25 Jun 2018 23:18:33 +0200 Subject: 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 --- src/qml/qml/qqmltypewrapper_p.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/qml/qml/qqmltypewrapper_p.h') diff --git a/src/qml/qml/qqmltypewrapper_p.h b/src/qml/qml/qqmltypewrapper_p.h index 01c3f8b0d0..c0eb534d36 100644 --- a/src/qml/qml/qqmltypewrapper_p.h +++ b/src/qml/qml/qqmltypewrapper_p.h @@ -111,12 +111,12 @@ struct Q_QML_EXPORT QQmlTypeWrapper : Object static ReturnedValue create(ExecutionEngine *, QObject *, const QQmlRefPointer &, const QQmlImportRef *, Heap::QQmlTypeWrapper::TypeNameMode = Heap::QQmlTypeWrapper::IncludeEnums); - - static ReturnedValue get(const Managed *m, PropertyKey id, const Value *receiver, bool *hasProperty); - static bool put(Managed *m, PropertyKey id, const Value &value, Value *receiver); - static PropertyAttributes getOwnProperty(Managed *m, PropertyKey id, Property *p); - static bool isEqualTo(Managed *that, Managed *o); - static ReturnedValue instanceOf(const Object *typeObject, const Value &var); +protected: + static ReturnedValue virtualGet(const Managed *m, PropertyKey id, const Value *receiver, bool *hasProperty); + static bool virtualPut(Managed *m, PropertyKey id, const Value &value, Value *receiver); + static PropertyAttributes virtualGetOwnProperty(Managed *m, PropertyKey id, Property *p); + static bool virtualIsEqualTo(Managed *that, Managed *o); + static ReturnedValue virtualInstanceOf(const Object *typeObject, const Value &var); }; struct Q_QML_EXPORT QQmlScopedEnumWrapper : Object @@ -124,7 +124,7 @@ struct Q_QML_EXPORT QQmlScopedEnumWrapper : Object V4_OBJECT2(QQmlScopedEnumWrapper, Object) V4_NEEDS_DESTROY - static ReturnedValue get(const Managed *m, PropertyKey id, const Value *receiver, bool *hasProperty); + static ReturnedValue virtualGet(const Managed *m, PropertyKey id, const Value *receiver, bool *hasProperty); }; } -- cgit v1.2.3