summaryrefslogtreecommitdiffstats
path: root/src/imports/xmllistmodel/qqmlxmllistmodel.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2019-04-12 08:20:26 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2019-04-12 07:45:19 +0000
commit1a2dca888989cd332053d4738e24cd81779cf008 (patch)
tree66d662821a53fae8fb40283596a1c35d2d71c1f0 /src/imports/xmllistmodel/qqmlxmllistmodel.cpp
parentcd2c6dbffc491cde219544368a32270cab42fb3a (diff)
QQuickXmlListModel: Fix compilation after removal of QQmlV4Handle
Replace by QJSValue after qtdeclarative/65299ce292180a845eb2d76756faeeaa1456d8f0. Change-Id: I3c74dcaebaf069f7f5b14e51de8fdbbba2fe9281 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/imports/xmllistmodel/qqmlxmllistmodel.cpp')
-rw-r--r--src/imports/xmllistmodel/qqmlxmllistmodel.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/imports/xmllistmodel/qqmlxmllistmodel.cpp b/src/imports/xmllistmodel/qqmlxmllistmodel.cpp
index 8455853a..9adef1e6 100644
--- a/src/imports/xmllistmodel/qqmlxmllistmodel.cpp
+++ b/src/imports/xmllistmodel/qqmlxmllistmodel.cpp
@@ -922,13 +922,13 @@ void QQuickXmlListModel::setNamespaceDeclarations(const QString &declarations)
var title = model.get(0).title;
\endjs
*/
-QQmlV4Handle QQuickXmlListModel::get(int index) const
+QJSValue QQuickXmlListModel::get(int index) const
{
// Must be called with a context and handle scope
Q_D(const QQuickXmlListModel);
if (index < 0 || index >= count())
- return QQmlV4Handle(Encode::undefined());
+ return QJSValue(QJSValue::UndefinedValue);
QQmlEngine *engine = qmlContext(this)->engine();
ExecutionEngine *v4engine = engine->handle();
@@ -942,7 +942,7 @@ QQmlV4Handle QQuickXmlListModel::get(int index) const
o->insertMember(name.getPointer(), value);
}
- return QQmlV4Handle(o);
+ return QJSValue(v4engine, o->asReturnedValue());
}
/*!