summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread/qthread_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/thread/qthread_p.h')
-rw-r--r--src/corelib/thread/qthread_p.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/corelib/thread/qthread_p.h b/src/corelib/thread/qthread_p.h
index 04f9bf23cf..66dd8db7c7 100644
--- a/src/corelib/thread/qthread_p.h
+++ b/src/corelib/thread/qthread_p.h
@@ -227,6 +227,17 @@ public:
bool isAdopted;
};
+class QScopedLoopLevelCounter
+{
+ QThreadData *threadData;
+public:
+ inline QScopedLoopLevelCounter(QThreadData *threadData)
+ : threadData(threadData)
+ { ++threadData->loopLevel; }
+ inline ~QScopedLoopLevelCounter()
+ { --threadData->loopLevel; }
+};
+
// thread wrapper for the main() thread
class QAdoptedThread : public QThread
{