diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-06-25 08:16:55 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-06-25 08:16:55 +0200 |
commit | d7c7daf790d87e7d670846b6ccf7700368a4d7e0 (patch) | |
tree | 0b5b98276e1ffd8dc0af6489a5a91d67b407a1b9 /src | |
parent | 357deebd7ae3005ca02ea1818ffae64c1440bc51 (diff) | |
download | qtxmlpatterns-d7c7daf790d87e7d670846b6ccf7700368a4d7e0.tar.gz |
Port towards load/storeRelaxed atomics
Plain load() / store() have been deprecated, so port away
to their straight replacements.
Change-Id: Id026544af12f93ba7bd1b0ba6ff95c1efaff8106
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/imports/xmllistmodel/qqmlxmllistmodel.cpp | 6 | ||||
-rw-r--r-- | src/xmlpatterns/schema/qxsdschemaparsercontext.cpp | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/imports/xmllistmodel/qqmlxmllistmodel.cpp b/src/imports/xmllistmodel/qqmlxmllistmodel.cpp index d334de1..aff35e5 100644 --- a/src/imports/xmllistmodel/qqmlxmllistmodel.cpp +++ b/src/imports/xmllistmodel/qqmlxmllistmodel.cpp @@ -275,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; diff --git a/src/xmlpatterns/schema/qxsdschemaparsercontext.cpp b/src/xmlpatterns/schema/qxsdschemaparsercontext.cpp index 0708c1d..5602483 100644 --- a/src/xmlpatterns/schema/qxsdschemaparsercontext.cpp +++ b/src/xmlpatterns/schema/qxsdschemaparsercontext.cpp @@ -81,7 +81,7 @@ QXmlName XsdSchemaParserContext::createAnonymousName(const QString &targetNamesp { m_anonymousNameCounter.ref(); - const QString name = QString::fromLatin1("__AnonymousClass_%1").arg(m_anonymousNameCounter.load()); + const QString name = QString::fromLatin1("__AnonymousClass_%1").arg(m_anonymousNameCounter.loadRelaxed()); return m_namePool->allocateQName(targetNamespace, name); } |