diff options
author | Lars Knoll <lars.knoll@qt.io> | 2018-09-18 10:39:47 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2018-09-23 17:27:35 +0000 |
commit | 3ff776b74e3d9c0af911e331cdb649fd3fa0dd09 (patch) | |
tree | 98f3a8b8f1fcf19885add0bc4c1402ee8d1783a7 | |
parent | c7d097297d789dd7c32a77d8a038067db364734b (diff) |
Remove unused argument
Change-Id: I1f2c796b50d05c238fad36434b2545604a401fbf
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
-rw-r--r-- | src/qml/jsruntime/qv4functionobject.cpp | 13 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4functionobject_p.h | 4 |
2 files changed, 8 insertions, 9 deletions
diff --git a/src/qml/jsruntime/qv4functionobject.cpp b/src/qml/jsruntime/qv4functionobject.cpp index a2a5cdd474..b4d68717d3 100644 --- a/src/qml/jsruntime/qv4functionobject.cpp +++ b/src/qml/jsruntime/qv4functionobject.cpp @@ -83,20 +83,19 @@ void Heap::FunctionObject::init(QV4::ExecutionContext *scope, QV4::String *name, f->setName(name); } -void Heap::FunctionObject::init(QV4::ExecutionContext *scope, QV4::String *name, bool createProto) +void Heap::FunctionObject::init(QV4::ExecutionContext *scope, QV4::String *name) { + ExecutionEngine *e = scope->engine(); + jsCall = vtable()->call; jsConstruct = vtable()->callAsConstructor; Object::init(); this->scope.set(scope->engine(), scope->d()); - Scope s(scope->engine()); + Scope s(e); ScopedFunctionObject f(s, this); if (name) f->setName(name); - - if (createProto) - f->createDefaultPrototypeProperty(Heap::FunctionObject::Index_ProtoConstructor); } @@ -116,11 +115,11 @@ void Heap::FunctionObject::init(QV4::ExecutionContext *scope, Function *function f->setName(name); } -void Heap::FunctionObject::init(QV4::ExecutionContext *scope, const QString &name, bool createProto) +void Heap::FunctionObject::init(QV4::ExecutionContext *scope, const QString &name) { Scope valueScope(scope); ScopedString s(valueScope, valueScope.engine->newString(name)); - init(scope, s, createProto); + init(scope, s); } void Heap::FunctionObject::init() diff --git a/src/qml/jsruntime/qv4functionobject_p.h b/src/qml/jsruntime/qv4functionobject_p.h index 43f4921875..bc0d22986b 100644 --- a/src/qml/jsruntime/qv4functionobject_p.h +++ b/src/qml/jsruntime/qv4functionobject_p.h @@ -84,9 +84,9 @@ DECLARE_HEAP_OBJECT(FunctionObject, Object) { } Q_QML_PRIVATE_EXPORT void init(QV4::ExecutionContext *scope, QV4::String *name, VTable::Call call); - void init(QV4::ExecutionContext *scope, QV4::String *name = nullptr, bool createProto = false); + void init(QV4::ExecutionContext *scope, QV4::String *name = nullptr); void init(QV4::ExecutionContext *scope, QV4::Function *function, QV4::String *n = nullptr); - void init(QV4::ExecutionContext *scope, const QString &name, bool createProto = false); + void init(QV4::ExecutionContext *scope, const QString &name); void init(); void destroy(); |