summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qsocketnotifier.cpp
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2018-02-13 14:47:18 +0100
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2018-02-14 10:33:37 +0000
commit4266c541284c9ba4e490c0b0b6ae0ef709fc01fe (patch)
tree84c13cf8690f77b1ba721b87c133dd110667f8f7 /src/corelib/kernel/qsocketnotifier.cpp
parent08f9dc1d325ac945c2e6f8f1ff6f8093b091b2fd (diff)
Use explicit QThreadData::hasEventDispatcher() where possible
Change-Id: Ibce1a82dabb4e1381486211dbfb14eee9572e0ac Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/kernel/qsocketnotifier.cpp')
-rw-r--r--src/corelib/kernel/qsocketnotifier.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/kernel/qsocketnotifier.cpp b/src/corelib/kernel/qsocketnotifier.cpp
index 2268cb83bb..6ff8268978 100644
--- a/src/corelib/kernel/qsocketnotifier.cpp
+++ b/src/corelib/kernel/qsocketnotifier.cpp
@@ -149,7 +149,7 @@ QSocketNotifier::QSocketNotifier(qintptr socket, Type type, QObject *parent)
if (socket < 0)
qWarning("QSocketNotifier: Invalid socket specified");
- else if (!d->threadData->eventDispatcher.load())
+ else if (!d->threadData->hasEventDispatcher())
qWarning("QSocketNotifier: Can only be used with threads started with QThread");
else
d->threadData->eventDispatcher.load()->registerSocketNotifier(this);
@@ -234,7 +234,7 @@ void QSocketNotifier::setEnabled(bool enable)
return;
d->snenabled = enable;
- if (!d->threadData->eventDispatcher.load()) // perhaps application/thread is shutting down
+ if (!d->threadData->hasEventDispatcher()) // perhaps application/thread is shutting down
return;
if (Q_UNLIKELY(thread() != QThread::currentThread())) {
qWarning("QSocketNotifier: Socket notifiers cannot be enabled or disabled from another thread");