summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/declarative/qml/qmlengine.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/declarative/qml/qmlengine.cpp b/src/declarative/qml/qmlengine.cpp
index d06376a..4b98d1b 100644
--- a/src/declarative/qml/qmlengine.cpp
+++ b/src/declarative/qml/qmlengine.cpp
@@ -568,7 +568,7 @@ QScriptValue QmlEnginePrivate::qmlScriptObject(QObject* object,
QmlEngine* engine)
{
QScriptEngine *scriptEngine = QmlEnginePrivate::getScriptEngine(engine);
- return scriptEngine->newObject(new QmlObjectScriptClass(engine), scriptEngine->newQObject(object));
+ return scriptEngine->newObject(engine->d_func()->objectClass, scriptEngine->newQObject(object, QScriptEngine::AutoOwnership));
}
/*!