summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/imports/xmllistmodel/qqmlxmllistmodel.cpp6
-rw-r--r--src/imports/xmllistmodel/qqmlxmllistmodel_p.h2
2 files changed, 4 insertions, 4 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());
}
/*!
diff --git a/src/imports/xmllistmodel/qqmlxmllistmodel_p.h b/src/imports/xmllistmodel/qqmlxmllistmodel_p.h
index 65f12993..388b6aec 100644
--- a/src/imports/xmllistmodel/qqmlxmllistmodel_p.h
+++ b/src/imports/xmllistmodel/qqmlxmllistmodel_p.h
@@ -115,7 +115,7 @@ public:
QString namespaceDeclarations() const;
void setNamespaceDeclarations(const QString&);
- Q_INVOKABLE QQmlV4Handle get(int index) const;
+ Q_INVOKABLE QJSValue get(int index) const;
enum Status { Null, Ready, Loading, Error };
Q_ENUM(Status)