diff options
Diffstat (limited to 'src/imports/xmllistmodel/qqmlxmllistmodel.cpp')
-rw-r--r-- | src/imports/xmllistmodel/qqmlxmllistmodel.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/imports/xmllistmodel/qqmlxmllistmodel.cpp b/src/imports/xmllistmodel/qqmlxmllistmodel.cpp index 8455853..053e16a 100644 --- a/src/imports/xmllistmodel/qqmlxmllistmodel.cpp +++ b/src/imports/xmllistmodel/qqmlxmllistmodel.cpp @@ -40,8 +40,8 @@ #include "qqmlxmllistmodel_p.h" #include <qqmlcontext.h> +#include <qqmlfile.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 +276,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 +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()); } /*! |