diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-12-06 16:47:27 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-12-06 16:47:27 -0600 |
commit | 78125ea2f051107b84fdc0354acdedb7885308ee (patch) | |
tree | c162d7f55467f81a01e2e669ce297acce06b3947 /src/kernel/qapplication.h | |
parent | 7aa5ac7f0e76c5b87e4ca837b75b3edd522a3372 (diff) | |
download | qt3-78125ea2f051107b84fdc0354acdedb7885308ee.tar.gz qt3-78125ea2f051107b84fdc0354acdedb7885308ee.zip |
Add real threading support, including per-thread event loops, to QThread
Diffstat (limited to 'src/kernel/qapplication.h')
-rw-r--r-- | src/kernel/qapplication.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/kernel/qapplication.h b/src/kernel/qapplication.h index c34ff45..5611164 100644 --- a/src/kernel/qapplication.h +++ b/src/kernel/qapplication.h @@ -63,6 +63,7 @@ class QWSDecoration; #ifdef QT_THREAD_SUPPORT class QMutex; +class QThread; #endif // QT_THREAD_SUPPORT @@ -369,7 +370,9 @@ private: #ifndef QT_NO_CURSOR static QCursor *app_cursor; #endif +#ifndef QT_THREAD_SUPPORT static QEventLoop* eventloop; +#endif static int app_tracking; static bool is_app_running; static bool is_app_closing; @@ -425,6 +428,7 @@ private: static void removePostedEvent( QEvent * ); static void removePostedEvents( QObject *receiver, int event_type ); + friend class QObject; friend class QWidget; friend class QETWidget; friend class QDialog; @@ -444,6 +448,15 @@ private: // Disabled copy constructor and operator= QApplication( const QApplication & ); QApplication &operator=( const QApplication & ); #endif + +private: + static QEventLoop* currentEventLoop(); + +public: +#ifdef QT_THREAD_SUPPORT + static QThread* guiThread(); +#endif + static bool isGuiThread(); }; inline int QApplication::argc() const |