From 78125ea2f051107b84fdc0354acdedb7885308ee Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Thu, 6 Dec 2012 16:47:27 -0600 Subject: Add real threading support, including per-thread event loops, to QThread --- src/kernel/qthread.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/kernel/qthread.h') diff --git a/src/kernel/qthread.h b/src/kernel/qthread.h index 160919f..0188ea6 100644 --- a/src/kernel/qthread.h +++ b/src/kernel/qthread.h @@ -118,11 +118,25 @@ protected: private: QThreadInstance * d; friend class QThreadInstance; + friend class QCoreApplicationThread; + friend class QApplication; + friend class QEventLoop; #if defined(Q_DISABLE_COPY) QThread( const QThread & ); QThread &operator=( const QThread & ); #endif // Q_DISABLE_COPY + +public: + static QThread* currentThreadObject(); +}; + +class Q_EXPORT QEventLoopThread : public QThread +{ + public: + QEventLoopThread(); + ~QEventLoopThread(); + virtual void run(); }; #endif // QT_THREAD_SUPPORT -- cgit v1.2.1