Qt 4.8
Public Functions | Public Variables | Properties | List of all members
QEventDispatcherQPAPrivate Class Reference
Inheritance diagram for QEventDispatcherQPAPrivate:
QEventDispatcherUNIXPrivate QAbstractEventDispatcherPrivate QObjectPrivate QObjectData

Public Functions

bool hasIntegration () const
 
bool isEventLoopIntegrationRunning () const
 
 QEventDispatcherQPAPrivate ()
 
void runEventLoopIntegration ()
 
 ~QEventDispatcherQPAPrivate ()
 
- Public Functions inherited from QEventDispatcherUNIXPrivate
int doSelect (QEventLoop::ProcessEventsFlags flags, timeval *timeout)
 
virtual int initThreadWakeUp ()
 
virtual int processThreadWakeUp (int nsel)
 
 QEventDispatcherUNIXPrivate ()
 
 ~QEventDispatcherUNIXPrivate ()
 
- Public Functions inherited from QAbstractEventDispatcherPrivate
void init ()
 
 QAbstractEventDispatcherPrivate ()
 
- Public Functions inherited from QObjectPrivate
void _q_reregisterTimers (void *pointer)
 
void addConnection (int signal, Connection *c)
 
void cleanConnectionLists ()
 
void connectNotify (const char *signal)
 
void deleteChildren ()
 
void disconnectNotify (const char *signal)
 
bool isSender (const QObject *receiver, const char *signal) const
 
bool isSignalConnected (uint signalIdx) const
 Returns true if the signal with index signal_index from object sender is connected. More...
 
void moveToThread_helper ()
 
 QObjectPrivate (int version=QObjectPrivateVersion)
 
QObjectList receiverList (const char *signal) const
 
QObjectList senderList () const
 
void setParent_helper (QObject *)
 
void setThreadData_helper (QThreadData *currentData, QThreadData *targetData)
 
int signalIndex (const char *signalName) const
 Returns the signal index used in the internal connectionLists vector. More...
 
virtual ~QObjectPrivate ()
 
- Public Functions inherited from QObjectData
virtual ~QObjectData ()=0
 

Public Variables

RendezvousbarrierBeforeBlocking
 
RendezvousbarrierReturnValue
 
QPlatformEventLoopIntegrationeventLoopIntegration
 
QMutexselectReturnMutex
 
SelectWorkerselectWorker
 
bool selectWorkerHasResult
 
bool selectWorkerNeedsSync
 
- Public Variables inherited from QEventDispatcherUNIXPrivate
bool interrupt
 
bool mainThread
 
int sn_highest
 
QSockNotType::List sn_pending_list
 
QSockNotType sn_vec [3]
 
int thread_pipe [2]
 
QTimerInfoList timerList
 
QAtomicInt wakeUps
 
- Public Variables inherited from QAbstractEventDispatcherPrivate
QAbstractEventDispatcher::EventFilter event_filter
 
- Public Variables inherited from QObjectPrivate
union {
   QObject *   currentChildBeingDeleted
 
   QAbstractDeclarativeData *   declarativeData
 
}; 
 
quint32 connectedSignals [2]
 
QObjectConnectionListVectorconnectionLists
 
SendercurrentSender
 
QList< QPointer< QObject > > eventFilters
 
ExtraDataextraData
 
QString objectName
 
Connectionsenders
 
QAtomicPointer< QtSharedPointer::ExternalRefCountData > sharedRefcount
 
QThreadDatathreadData
 
void * unused
 
- Public Variables inherited from QObjectData
uint blockSig: 1
 
QObjectList children
 
uint hasGuards: 1
 
uint inEventHandler: 1
 
uint inThreadChangeEvent: 1
 
uint isWidget: 1
 
QMetaObjectmetaObject
 
uint ownObjectName: 1
 
QObjectparent
 
uint pendTimer: 1
 
int postedEvents
 
QObjectq_ptr
 
uint receiveChildEvents: 1
 
uint sendChildEvents: 1
 
uint unused: 22
 
uint wasDeleted: 1
 

Properties

bool m_hasIntegration
 
bool m_integrationInitialised
 
bool m_isEventLoopIntegrationRunning
 

Additional Inherited Members

- Public Types inherited from QObjectPrivate
typedef void(* StaticMetaCallFunction) (QObject *, QMetaObject::Call, int, void **)
 
- Static Public Functions inherited from QAbstractEventDispatcherPrivate
static int allocateTimerId ()
 
static void releaseTimerId (int id)
 
- Static Public Functions inherited from QObjectPrivate
static void clearGuards (QObject *)
 
static QObjectPrivateget (QObject *o)
 
static void resetCurrentSender (QObject *receiver, Sender *currentSender, Sender *previousSender)
 
static SendersetCurrentSender (QObject *receiver, Sender *sender)
 
static void signalSignature (const QMetaMethod &signal, QVarLengthArray< char > *result)
 

Detailed Description

Definition at line 116 of file qeventdispatcher_qpa.cpp.

Constructors and Destructors

◆ QEventDispatcherQPAPrivate()

QEventDispatcherQPAPrivate::QEventDispatcherQPAPrivate ( )
inline

Definition at line 120 of file qeventdispatcher_qpa.cpp.

125  selectWorkerNeedsSync(true),
126  selectWorkerHasResult(false),
127  selectWorker(0),
129  m_hasIntegration(false),
131  {
132 
133  }
QPlatformEventLoopIntegration * eventLoopIntegration

◆ ~QEventDispatcherQPAPrivate()

QEventDispatcherQPAPrivate::~QEventDispatcherQPAPrivate ( )
inline

Definition at line 135 of file qeventdispatcher_qpa.cpp.

136  {
137  delete selectWorker;
138  delete eventLoopIntegration;
139  delete barrierBeforeBlocking;
140  delete barrierReturnValue;
141  delete selectReturnMutex;
142  }
QPlatformEventLoopIntegration * eventLoopIntegration

Functions

◆ hasIntegration()

bool QEventDispatcherQPAPrivate::hasIntegration ( ) const
inline

Definition at line 144 of file qeventdispatcher_qpa.cpp.

145  {
147  QEventDispatcherQPAPrivate *that = const_cast<QEventDispatcherQPAPrivate *>(this);
148  if (qApp && (qApp->thread() == QThread::currentThread())) { // guiThread
149  if (QApplicationPrivate::platformIntegration()) {
150  that->eventLoopIntegration = QApplicationPrivate::platformIntegration()->createEventLoopIntegration();
151  if (that->eventLoopIntegration) {
152  that->selectWorker = new SelectWorker(that);
153  that->barrierBeforeBlocking = new Rendezvous;
154  that->barrierReturnValue = new Rendezvous;
155  that->selectReturnMutex = new QMutex;
156  that->selectWorker->start();
157  that->m_hasIntegration = true;
159  qWarning("Having eventloop integration without monotonic timers can lead to undefined behaviour");
160  }
161  }
162  }
163  that->m_integrationInitialised = true;
164  }
165  return m_hasIntegration;
166  }
The QMutex class provides access serialization between threads.
Definition: qmutex.h:60
static bool isMonotonic()
Returns true if this is a monotonic clock, false otherwise.
static QThread * currentThread()
Returns a pointer to a QThread which manages the currently executing thread.
Definition: qthread.cpp:419
#define qApp
Q_CORE_EXPORT void qWarning(const char *,...)
void start(Priority=InheritPriority)
Begins execution of the thread by calling run().
QPlatformEventLoopIntegration * eventLoopIntegration

◆ isEventLoopIntegrationRunning()

bool QEventDispatcherQPAPrivate::isEventLoopIntegrationRunning ( ) const
inline

Definition at line 168 of file qeventdispatcher_qpa.cpp.

169  {
171  }

◆ runEventLoopIntegration()

void QEventDispatcherQPAPrivate::runEventLoopIntegration ( )
inline

Definition at line 173 of file qeventdispatcher_qpa.cpp.

174  {
175  if (qApp && (qApp->thread() == QThread::currentThread())) {
178  }
179  }
virtual void startEventLoop()=0
static QThread * currentThread()
Returns a pointer to a QThread which manages the currently executing thread.
Definition: qthread.cpp:419
#define qApp
QPlatformEventLoopIntegration * eventLoopIntegration

Properties

◆ barrierBeforeBlocking

Rendezvous* QEventDispatcherQPAPrivate::barrierBeforeBlocking

Definition at line 182 of file qeventdispatcher_qpa.cpp.

Referenced by hasIntegration().

◆ barrierReturnValue

Rendezvous* QEventDispatcherQPAPrivate::barrierReturnValue

Definition at line 183 of file qeventdispatcher_qpa.cpp.

Referenced by hasIntegration().

◆ eventLoopIntegration

QPlatformEventLoopIntegration* QEventDispatcherQPAPrivate::eventLoopIntegration

Definition at line 181 of file qeventdispatcher_qpa.cpp.

Referenced by hasIntegration().

◆ m_hasIntegration

bool QEventDispatcherQPAPrivate::m_hasIntegration
private

Definition at line 192 of file qeventdispatcher_qpa.cpp.

Referenced by hasIntegration().

◆ m_integrationInitialised

bool QEventDispatcherQPAPrivate::m_integrationInitialised
private

Definition at line 191 of file qeventdispatcher_qpa.cpp.

Referenced by hasIntegration().

◆ m_isEventLoopIntegrationRunning

bool QEventDispatcherQPAPrivate::m_isEventLoopIntegrationRunning
private

Definition at line 193 of file qeventdispatcher_qpa.cpp.

◆ selectReturnMutex

QMutex* QEventDispatcherQPAPrivate::selectReturnMutex

Definition at line 185 of file qeventdispatcher_qpa.cpp.

Referenced by hasIntegration().

◆ selectWorker

SelectWorker* QEventDispatcherQPAPrivate::selectWorker

Definition at line 189 of file qeventdispatcher_qpa.cpp.

Referenced by hasIntegration().

◆ selectWorkerHasResult

bool QEventDispatcherQPAPrivate::selectWorkerHasResult

Definition at line 187 of file qeventdispatcher_qpa.cpp.

◆ selectWorkerNeedsSync

bool QEventDispatcherQPAPrivate::selectWorkerNeedsSync

Definition at line 186 of file qeventdispatcher_qpa.cpp.


The documentation for this class was generated from the following file: