diff options
| author | Lars Knoll <lars.knoll@theqtcompany.com> | 2014-11-07 19:07:54 +0100 |
|---|---|---|
| committer | Simon Hausmann <simon.hausmann@digia.com> | 2014-11-12 12:13:33 +0100 |
| commit | f2532fd6112341d247bb2a35d28fa54293004ade (patch) | |
| tree | 8c4b5585796ca3573093ca296ec951d532307fc3 /src/qml/jsruntime/qv4functionobject.cpp | |
| parent | 31084c37f60a54d0d1ab2e07a79e070268540498 (diff) | |
Cleanups
Remove a few reinterpret_cast's
Change-Id: I800b8c41123eaa22cf879571c747b4de0375e8cb
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4functionobject.cpp')
| -rw-r--r-- | src/qml/jsruntime/qv4functionobject.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4functionobject.cpp b/src/qml/jsruntime/qv4functionobject.cpp index 54853eea4a..cd860f4c2b 100644 --- a/src/qml/jsruntime/qv4functionobject.cpp +++ b/src/qml/jsruntime/qv4functionobject.cpp @@ -81,6 +81,16 @@ Heap::FunctionObject::FunctionObject(QV4::ExecutionContext *scope, const QString f->init(n.getPointer(), createProto); } +Heap::FunctionObject::FunctionObject(ExecutionContext *scope, const QString &name, bool createProto) + : Heap::Object(scope->engine->functionClass) + , scope(scope) +{ + Scope s(scope->engine); + ScopedFunctionObject f(s, this); + ScopedString n(s, s.engine->newString(name)); + f->init(n.getPointer(), createProto); +} + Heap::FunctionObject::FunctionObject(QV4::ExecutionContext *scope, const ReturnedValue name) : Heap::Object(scope->d()->engine->functionClass) , scope(scope->d()) |
