4#define BUILDING_QSOCKETNOTIFIER
6#undef BUILDING_QSOCKETNOTIFIER
8#include "qplatformdefs.h"
16#include <private/qthread_p.h>
18#include <QtCore/QLoggingCategory>
34 bool snenabled =
false;
127 qRegisterMetaType<QSocketDescriptor>();
128 qRegisterMetaType<QSocketNotifier::Type>();
154 auto thisThreadData =
d->threadData.loadRelaxed();
156 if (!
d->sockfd.isValid())
157 qWarning(
"QSocketNotifier: Invalid socket specified");
158 else if (!thisThreadData->hasEventDispatcher())
159 qWarning(
"QSocketNotifier: Can only be used with threads started with QThread");
161 thisThreadData->eventDispatcher.loadRelaxed()->registerSocketNotifier(
this);
253 return d->sockfd.isValid();
285 if (!
d->sockfd.isValid())
292 auto thisThreadData =
d->threadData.loadRelaxed();
294 if (!thisThreadData->hasEventDispatcher())
297 qWarning(
"QSocketNotifier: Socket notifiers cannot be enabled or disabled from another thread");
301 thisThreadData->eventDispatcher.loadRelaxed()->registerSocketNotifier(
this);
303 thisThreadData->eventDispatcher.loadRelaxed()->unregisterSocketNotifier(
this);
318 Q_ARG(
bool,
d->snenabled));
384#include "moc_qsocketnotifier.cpp"
virtual bool event(QEvent *event)
This virtual function receives events to an object and should return true if the event e was recogniz...
QThread * thread() const
Returns the thread in which the object lives.
QSocketNotifier::Type sntype
void setSocket(qintptr socket)
bool isEnabled() const
Returns true if the notifier is enabled; otherwise returns false.
void activated(QSocketDescriptor socket, QSocketNotifier::Type activationEvent, QPrivateSignal)
Type type() const
Returns the socket event type specified to the constructor.
void setEnabled(bool)
If enable is true, the notifier is enabled; otherwise the notifier is disabled.
Type
This enum describes the various types of events that a socket notifier can recognize.
~QSocketNotifier()
Destroys this socket notifier.
qintptr socket() const
Returns the socket identifier assigned to this object.
QSocketNotifier(Type, QObject *parent=nullptr)
bool event(QEvent *) override
\reimp
static QThread * currentThread()
Combined button and popup list for selecting options.
#define Q_LOGGING_CATEGORY(name,...)
#define Q_DECLARE_LOGGING_CATEGORY(name)
#define Q_ARG(Type, data)
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent