57 #include "qplatformdefs.h" 58 #include "QtCore/qthread.h" 59 #include "QtCore/qmutex.h" 60 #include "QtCore/qstack.h" 61 #include "QtCore/qwaitcondition.h" 62 #include "QtCore/qmap.h" 63 #include "private/qobject_p.h" 81 : receiver(0), event(0), priority(0)
84 : receiver(r), event(e), priority(p)
112 :
QList<
QPostEvent>(), recursion(0), startOffset(0), insertionOffset(0)
117 if (
isEmpty() || last().priority >= priority) {
158 static QThread *threadForId(
int id);
164 static void *start(
void *arg);
165 #if defined(Q_OS_SYMBIAN) 166 static void finish(
void *arg,
bool lockAnyway=
true,
bool closeNativeHandle=
true);
168 static void finish(
void *);
173 #if defined(Q_OS_WIN32) || defined(Q_OS_WINCE) 178 static unsigned int __stdcall start(
void *);
179 static void finish(
void *,
bool lockAnyway=
true);
182 #if defined(Q_OS_WIN32) || defined(Q_OS_WINCE) || defined (Q_OS_SYMBIAN) 187 static void createEventDispatcher(
QThreadData *data);
190 #else // QT_NO_THREAD 200 static void setCurrentThread(
QThread*) {}
202 static void createEventDispatcher(
QThreadData *data);
207 #endif // QT_NO_THREAD 218 static void clearCurrentThreadData();
220 {
Q_ASSERT_X(thread != 0,
"QThread",
"internal error");
return thread->d_func()->data; }
239 const char* locations[Count];
244 for (
uint i = 0; i < Count; ++i)
249 { locations[idx++ % Count] = method; }
253 for (
uint i = 0; i < Count; ++i)
254 if (locations[i] == method)
272 RThread symbian_thread_handle;
283 : threadData(threadData)
299 static QThread *createThreadForAdoption();
306 #endif // QTHREAD_P_H
QPostEvent(QObject *r, QEvent *e, int p)
Q_OUTOFLINE_TEMPLATE RandomAccessIterator qUpperBound(RandomAccessIterator begin, RandomAccessIterator end, const T &value)
#define QT_END_NAMESPACE
This macro expands to.
The QMutex class provides access serialization between threads.
The QAtomicInt class provides platform-independent atomic operations on integers. ...
#define at(className, varName)
~QScopedLoopLevelCounter()
QScopedLoopLevelCounter(QThreadData *threadData)
void addEvent(const QPostEvent &ev)
FlaggedDebugSignatures flaggedSignatures
The QStack class is a template class that provides a stack.
The QVector class is a template class that provides a dynamic array.
The QObject class is the base class of all Qt objects.
Priority
This enum type indicates how the operating system should schedule newly created threads.
static QThread * currentThread()
Returns a pointer to a QThread which manages the currently executing thread.
static QThreadData * get2(QThread *thread)
#define QT_BEGIN_NAMESPACE
This macro expands to.
static bool isEmpty(const char *str)
The QEventLoop class provides a means of entering and leaving an event loop.
static const char * data(const QByteArray &arr)
QPostEventList postEventList
#define Q_ASSERT_X(cond, where, what)
The QMutexLocker class is a convenience class that simplifies locking and unlocking mutexes...
void store(const char *method)
#define Q_DECLARE_PUBLIC(Class)
bool operator<(int priority, const QPostEvent &pe)
QWaitCondition thread_done
QFuture< T > run(Function function,...)
QThread::Priority priority
#define Q_DECLARE_PRIVATE(Class)
static const KeyPair *const end
The QEvent class is the base class of all event classes.
The QThread class provides a platform-independent way to manage threads.
QAbstractEventDispatcher * eventDispatcher
bool contains(const char *method) const
The QAbstractEventDispatcher class provides an interface to manage Qt's event queue.
The QList class is a template class that provides lists.
QStack< QEventLoop * > eventLoops