diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-04-12 08:20:26 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-04-12 07:45:19 +0000 |
commit | 1a2dca888989cd332053d4738e24cd81779cf008 (patch) | |
tree | 66d662821a53fae8fb40283596a1c35d2d71c1f0 | |
parent | cd2c6dbffc491cde219544368a32270cab42fb3a (diff) | |
download | qtxmlpatterns-1a2dca888989cd332053d4738e24cd81779cf008.tar.gz |
QQuickXmlListModel: Fix compilation after removal of QQmlV4Handle
Replace by QJSValue after
qtdeclarative/65299ce292180a845eb2d76756faeeaa1456d8f0.
Change-Id: I3c74dcaebaf069f7f5b14e51de8fdbbba2fe9281
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
-rw-r--r-- | src/imports/xmllistmodel/qqmlxmllistmodel.cpp | 6 | ||||
-rw-r--r-- | src/imports/xmllistmodel/qqmlxmllistmodel_p.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/imports/xmllistmodel/qqmlxmllistmodel.cpp b/src/imports/xmllistmodel/qqmlxmllistmodel.cpp index 8455853..9adef1e 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 65f1299..388b6ae 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) |