aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlnotifier.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2017-02-14 15:17:16 -0800
committerThiago Macieira <thiago.macieira@intel.com>2017-03-06 21:27:05 +0000
commitfb0490dd653e4856a3595bd7e49c3127215170d1 (patch)
treef29b7d98f74f9cb461cf76f8d23b37dd20c9524e /src/qml/qml/qqmlnotifier.cpp
parent13335bdee5482ae04d5b0d4c933ca328a1100cb6 (diff)
QThreadData::threadId is now QAtomicPointer, so relax loads from Acquire
operator T() does loadAcquire, to match std::atomic behavior. We don't need that, so let's use a relaxed load. Side note: why does QtQml need to access the thread ID this way? Couldn't it do object->thread()? This code comes from a pre-5.0 commit 5570040771ec610583473e2d9e8e069474364cf1 ("Permit signals to be emitted in a different thread"). Change-Id: I4139d5f93dcb4b429ae9fffd14a34a84d3255a6f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'src/qml/qml/qqmlnotifier.cpp')
-rw-r--r--src/qml/qml/qqmlnotifier.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/qml/qqmlnotifier.cpp b/src/qml/qml/qqmlnotifier.cpp
index 185f9687fb..538ca822ee 100644
--- a/src/qml/qml/qqmlnotifier.cpp
+++ b/src/qml/qml/qqmlnotifier.cpp
@@ -122,8 +122,8 @@ void QQmlNotifierEndpoint::connect(QObject *source, int sourceSignal, QQmlEngine
disconnect();
Q_ASSERT(engine);
- if (QObjectPrivate::get(source)->threadData->threadId !=
- QObjectPrivate::get(engine)->threadData->threadId) {
+ if (QObjectPrivate::get(source)->threadData->threadId.load() !=
+ QObjectPrivate::get(engine)->threadData->threadId.load()) {
QString sourceName;
QDebug(&sourceName) << source;