diff options
Diffstat (limited to 'src/corelib/kernel/qsocketnotifier.cpp')
-rw-r--r-- | src/corelib/kernel/qsocketnotifier.cpp | 4 |
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"); |