Fix failing QJSValue test for QObject JS wrapper prototype
authorSimon Hausmann <simon.hausmann@digia.com>
Mon, 3 Jun 2013 10:52:53 +0000 (12:52 +0200)
committerLars Knoll <lars.knoll@digia.com>
Mon, 3 Jun 2013 12:51:07 +0000 (14:51 +0200)
We need to initialize the prototype correctly.

Change-Id: I466c132b5f6bd5761b5943aaea91ed811b82a8f7
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
src/qml/qml/v8/qv8qobjectwrapper.cpp

index 0a6f15b..110bec4 100644 (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"));