From 2e391fec759c2075f95509c5dbda6fb21e88f3ee Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Mon, 3 Jun 2013 12:52:53 +0200 Subject: [PATCH] Fix failing QJSValue test for QObject JS wrapper prototype We need to initialize the prototype correctly. Change-Id: I466c132b5f6bd5761b5943aaea91ed811b82a8f7 Reviewed-by: Lars Knoll --- src/qml/qml/v8/qv8qobjectwrapper.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/qml/qml/v8/qv8qobjectwrapper.cpp b/src/qml/qml/v8/qv8qobjectwrapper.cpp index 0a6f15b..110bec4 100644 --- a/src/qml/qml/v8/qv8qobjectwrapper.cpp +++ b/src/qml/qml/v8/qv8qobjectwrapper.cpp @@ -60,6 +60,7 @@ #include #include #include +#include #include #include @@ -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")); -- 2.7.4