aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmltypemodule.cpp
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2019-06-24 15:46:26 +0200
committerLiang Qi <liang.qi@qt.io>2019-06-25 21:06:19 +0000
commitc060f6e765a2f155b38158f2ed73eac4aad37e02 (patch)
tree2cb7b1d9752b607bd4f55d4f14a4e6d5aa094e34 /src/qml/qml/qqmltypemodule.cpp
parentb1f238568214e6587b829d6695677e55a99b1d40 (diff)
Port towards load/storeRelaxed atomics
Plain load() / store() have been deprecated, so port away to their straight replacements. Task-number: QTBUG-76611 Change-Id: I79935b889cf7b2ba7698f70cc5e33994b034aa09 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'src/qml/qml/qqmltypemodule.cpp')
-rw-r--r--src/qml/qml/qqmltypemodule.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/qml/qml/qqmltypemodule.cpp b/src/qml/qml/qqmltypemodule.cpp
index 4d7553fbab..9c9bf3e48f 100644
--- a/src/qml/qml/qqmltypemodule.cpp
+++ b/src/qml/qml/qqmltypemodule.cpp
@@ -69,24 +69,24 @@ int QQmlTypeModule::majorVersion() const
int QQmlTypeModule::minimumMinorVersion() const
{
- return d->minMinorVersion.load();
+ return d->minMinorVersion.loadRelaxed();
}
int QQmlTypeModule::maximumMinorVersion() const
{
- return d->maxMinorVersion.load();
+ return d->maxMinorVersion.loadRelaxed();
}
void QQmlTypeModule::addMinorVersion(int version)
{
- for (int oldVersion = d->minMinorVersion.load();
+ for (int oldVersion = d->minMinorVersion.loadRelaxed();
oldVersion > version && !d->minMinorVersion.testAndSetOrdered(oldVersion, version);
- oldVersion = d->minMinorVersion.load()) {
+ oldVersion = d->minMinorVersion.loadRelaxed()) {
}
- for (int oldVersion = d->maxMinorVersion.load();
+ for (int oldVersion = d->maxMinorVersion.loadRelaxed();
oldVersion < version && !d->maxMinorVersion.testAndSetOrdered(oldVersion, version);
- oldVersion = d->maxMinorVersion.load()) {
+ oldVersion = d->maxMinorVersion.loadRelaxed()) {
}
}
@@ -125,12 +125,12 @@ void QQmlTypeModule::remove(const QQmlTypePrivate *type)
bool QQmlTypeModule::isLocked() const
{
- return d->locked.load() != 0;
+ return d->locked.loadRelaxed() != 0;
}
void QQmlTypeModule::lock()
{
- d->locked.store(1);
+ d->locked.storeRelaxed(1);
}
QQmlType QQmlTypeModule::type(const QHashedStringRef &name, int minor) const