diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2013-06-04 16:35:00 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@digia.com> | 2013-06-05 10:55:08 +0200 |
commit | f0e32d311a791910acef672b1ab9a2ac4a80171e (patch) | |
tree | b4af025e391eb84e8a5ec7e6ec550e35aeac5488 /src/qml/types/qqmllistmodel.cpp | |
parent | c0a79111f7c08b482338df05e047da1ddbf95c9b (diff) |
Move QV8QObjectWrapper::newQObject into QV4::QObjectWrapper
...where it is just called wrap(), because it doesn't always create a new
JS wrapper for the QObject.
Change-Id: Ieed0fc97174eb51cd04df0149e715c234a5822bd
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/types/qqmllistmodel.cpp')
-rw-r--r-- | src/qml/types/qqmllistmodel.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qml/types/qqmllistmodel.cpp b/src/qml/types/qqmllistmodel.cpp index f016a9ab22..8e1821092b 100644 --- a/src/qml/types/qqmllistmodel.cpp +++ b/src/qml/types/qqmllistmodel.cpp @@ -2103,14 +2103,14 @@ QQmlV4Handle QQmlListModel::get(int index) const QV4::Value result = QV4::Value::undefinedValue(); if (index >= 0 && index < count()) { - QV8Engine *v8engine = engine(); + QV4::ExecutionEngine *v4 = QV8Engine::getV4(engine()); if (m_dynamicRoles) { DynamicRoleModelNode *object = m_modelObjects[index]; - result = v8engine->newQObject(object); + result = QV4::QObjectWrapper::wrap(v4, object); } else { ModelObject *object = m_listModel->getOrCreateModelObject(const_cast<QQmlListModel *>(this), index); - result = v8engine->newQObject(object); + result = QV4::QObjectWrapper::wrap(v4, object); } } |