Fix failing QJSValue test for QObject JS wrapper prototype

We need to initialize the prototype correctly.

Change-Id: I466c132b5f6bd5761b5943aaea91ed811b82a8f7
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
This commit is contained in:
Simon Hausmann 2013-06-03 12:52:53 +02:00 committed by Lars Knoll
parent 0812afeaa7
commit 2e391fec75
1 changed files with 2 additions and 0 deletions

View File

@ -60,6 +60,7 @@
#include <private/qv4runtime_p.h>
#include <private/qv4variantobject_p.h>
#include <private/qv4sequenceobject_p.h>
#include <private/qv4objectproto_p.h>
#include <QtQml/qjsvalue.h>
#include <QtCore/qjsonarray.h>
@ -88,6 +89,7 @@ QObjectWrapper::QObjectWrapper(ExecutionEngine *engine, QObject *object)
{
this->v8Engine = QV8Engine::get(engine->publicEngine);
vtbl = &static_vtbl;
prototype = engine->objectPrototype;
m_destroy = engine->newIdentifier(QStringLiteral("destroy"));
m_toString = engine->newIdentifier(QStringLiteral("toString"));