aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4functionobject_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2018-06-22 13:02:10 +0200
committerLars Knoll <lars.knoll@qt.io>2018-06-27 07:00:34 +0000
commit1cadc5071ced2ef3f60635d26f0b3c53cc37fc3f (patch)
treea222ce1bbc7bb6eeb7c3c4281c3b9dc9f9356bd9 /src/qml/jsruntime/qv4functionobject_p.h
parent1e8d4097860e4c92dd49c0df03ce6f9b68eef961 (diff)
Cleanups in FunctionObject
rename init() to setName() as that's the only thing it's doing. Change-Id: Iecf586bc6b6df0f169bc7d2969b711e758ea3813 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4functionobject_p.h')
-rw-r--r--src/qml/jsruntime/qv4functionobject_p.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/qml/jsruntime/qv4functionobject_p.h b/src/qml/jsruntime/qv4functionobject_p.h
index 3245137ac9..b87eab2fcf 100644
--- a/src/qml/jsruntime/qv4functionobject_p.h
+++ b/src/qml/jsruntime/qv4functionobject_p.h
@@ -163,9 +163,10 @@ struct Q_QML_EXPORT FunctionObject: Object {
unsigned int formalParameterCount() const { return d()->formalParameterCount(); }
unsigned int varCount() const { return d()->varCount(); }
- void init(String *name, bool createProto);
-
- void createDefaultPrototypeProperty();
+ void setName(String *name) {
+ defineReadonlyConfigurableProperty(engine()->id_name(), *name);
+ }
+ void createDefaultPrototypeProperty(uint protoSlot, uint protoConstructorSlot);
inline ReturnedValue callAsConstructor(const JSCallData &data) const;
ReturnedValue callAsConstructor(const Value *argv, int argc) const {