From 481f69ef2b507454e15a2354a7b6e85d671ee793 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Fri, 27 Apr 2018 11:40:35 +0200 Subject: Add attributes argument to defineDefaultProperty overload Change-Id: I34da7966125b892a9a106b1a4ca8552abad45cdb Reviewed-by: Simon Hausmann --- src/qml/jsruntime/qv4object.cpp | 4 ++-- src/qml/jsruntime/qv4object_p.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/qml/jsruntime') diff --git a/src/qml/jsruntime/qv4object.cpp b/src/qml/jsruntime/qv4object.cpp index a1a126a0e0..586fa1ee4b 100644 --- a/src/qml/jsruntime/qv4object.cpp +++ b/src/qml/jsruntime/qv4object.cpp @@ -148,12 +148,12 @@ bool Object::putValue(uint memberIndex, const Value &value) return true; } -void Object::defineDefaultProperty(const QString &name, const Value &value) +void Object::defineDefaultProperty(const QString &name, const Value &value, PropertyAttributes attributes) { ExecutionEngine *e = engine(); Scope scope(e); ScopedString s(scope, e->newIdentifier(name)); - defineDefaultProperty(s, value); + defineDefaultProperty(s, value, attributes); } void Object::defineDefaultProperty(const QString &name, jsCallFunction code, diff --git a/src/qml/jsruntime/qv4object_p.h b/src/qml/jsruntime/qv4object_p.h index 44ad35b44b..93cc3a1e4b 100644 --- a/src/qml/jsruntime/qv4object_p.h +++ b/src/qml/jsruntime/qv4object_p.h @@ -277,7 +277,7 @@ struct Q_QML_EXPORT Object: Managed { void defineDefaultProperty(StringOrSymbol *name, const Value &value, PropertyAttributes attributes = Attr_Data|Attr_NotEnumerable) { insertMember(name, value, attributes); } - void defineDefaultProperty(const QString &name, const Value &value); + void defineDefaultProperty(const QString &name, const Value &value, PropertyAttributes attributes = Attr_Data|Attr_NotEnumerable); void defineDefaultProperty(const QString &name, jsCallFunction code, int argumentCount = 0, PropertyAttributes attributes = Attr_Data|Attr_NotEnumerable); void defineDefaultProperty(StringOrSymbol *name, jsCallFunction code, -- cgit v1.2.3