aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2018-04-27 11:40:35 +0200
committerLars Knoll <lars.knoll@qt.io>2018-05-02 14:20:38 +0000
commit481f69ef2b507454e15a2354a7b6e85d671ee793 (patch)
tree65eda4d057f5eb05348a206696ee4b7c63badf67 /src/qml/jsruntime
parenta6eb09fa2015a6cff1c8344e5784235d6292098f (diff)
Add attributes argument to defineDefaultProperty overload
Change-Id: I34da7966125b892a9a106b1a4ca8552abad45cdb Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime')
-rw-r--r--src/qml/jsruntime/qv4object.cpp4
-rw-r--r--src/qml/jsruntime/qv4object_p.h2
2 files changed, 3 insertions, 3 deletions
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,