diff options
author | Lars Knoll <lars.knoll@qt.io> | 2018-08-04 10:39:09 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2018-08-06 10:00:45 +0000 |
commit | d046de0ddb7a8d8762821915d3973a1bea9d499c (patch) | |
tree | 3e75616f9cb1e4bf9cbb5fdaa337223365e01dd5 /src/qml/jsruntime/qv4functionobject.cpp | |
parent | 15ef80f1d92eb3a88dc135b4e6347f57a5982f9c (diff) |
Setup the prototype correctly when subclassing error objects
Change-Id: I5e394ef8d4d6d87bedb26070d51660e3ebe3ab1b
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4functionobject.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4functionobject.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4functionobject.cpp b/src/qml/jsruntime/qv4functionobject.cpp index b0f9f5198e..35d8fe18e0 100644 --- a/src/qml/jsruntime/qv4functionobject.cpp +++ b/src/qml/jsruntime/qv4functionobject.cpp @@ -602,7 +602,7 @@ ReturnedValue DefaultClassConstructorFunction::virtualCallAsConstructor(const Fu Scope scope(v4); if (!c->d()->isDerivedConstructor) { - ScopedObject proto(scope, static_cast<const Object *>(newTarget) ->get(scope.engine->id_prototype())); + ScopedObject proto(scope, static_cast<const Object *>(newTarget)->get(scope.engine->id_prototype())); ScopedObject c(scope, scope.engine->newObject()); c->setPrototypeUnchecked(proto); return c->asReturnedValue(); |