summaryrefslogtreecommitdiff
path: root/src/imports/xmllistmodel
diff options
context:
space:
mode:
Diffstat (limited to 'src/imports/xmllistmodel')
-rw-r--r--src/imports/xmllistmodel/qqmlxmllistmodel.cpp13
-rw-r--r--src/imports/xmllistmodel/qqmlxmllistmodel_p.h4
2 files changed, 8 insertions, 9 deletions
diff --git a/src/imports/xmllistmodel/qqmlxmllistmodel.cpp b/src/imports/xmllistmodel/qqmlxmllistmodel.cpp
index 8455853..aff35e5 100644
--- a/src/imports/xmllistmodel/qqmlxmllistmodel.cpp
+++ b/src/imports/xmllistmodel/qqmlxmllistmodel.cpp
@@ -41,7 +41,6 @@
#include <qqmlcontext.h>
#include <private/qqmlengine_p.h>
-#include <private/qv8engine_p.h>
#include <private/qv4value_p.h>
#include <private/qv4engine_p.h>
#include <private/qv4object_p.h>
@@ -276,12 +275,12 @@ int QQuickXmlQueryEngine::doQuery(QString query, QString namespaces, QByteArray
{
QMutexLocker m1(&m_mutex);
m_queryIds.ref();
- if (m_queryIds.load() <= 0)
- m_queryIds.store(1);
+ if (m_queryIds.loadRelaxed() <= 0)
+ m_queryIds.storeRelaxed(1);
}
XmlQueryJob job;
- job.queryId = m_queryIds.load();
+ job.queryId = m_queryIds.loadRelaxed();
job.data = data;
job.query = QLatin1String("doc($src)") + query;
job.namespaces = namespaces;
@@ -922,13 +921,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 +941,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..ea3736a 100644
--- a/src/imports/xmllistmodel/qqmlxmllistmodel_p.h
+++ b/src/imports/xmllistmodel/qqmlxmllistmodel_p.h
@@ -53,11 +53,11 @@
#include <qqml.h>
#include <qqmlinfo.h>
+#include <qjsvalue.h>
#include <QtCore/qurl.h>
#include <QtCore/qstringlist.h>
#include <QtCore/qabstractitemmodel.h>
-#include <private/qv8engine_p.h>
QT_BEGIN_NAMESPACE
@@ -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)