summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread/qfutureinterface_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/thread/qfutureinterface_p.h')
-rw-r--r--src/corelib/thread/qfutureinterface_p.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/corelib/thread/qfutureinterface_p.h b/src/corelib/thread/qfutureinterface_p.h
index 8b38ebfc66..7d9fc850fa 100644
--- a/src/corelib/thread/qfutureinterface_p.h
+++ b/src/corelib/thread/qfutureinterface_p.h
@@ -58,6 +58,7 @@
#include <QtCore/qlist.h>
#include <QtCore/qwaitcondition.h>
#include <QtCore/qrunnable.h>
+#include <QtCore/qthreadpool.h>
QT_BEGIN_NAMESPACE
@@ -169,6 +170,10 @@ public:
QtPrivate::ExceptionStore m_exceptionStore;
QString m_progressText;
QRunnable *runnable;
+ QThreadPool *m_pool;
+
+ inline QThreadPool *pool() const
+ { return m_pool ? m_pool : QThreadPool::globalInstance(); }
// Internal functions that does not change the mutex state.
// The mutex must be locked when calling these.