summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/thread')
-rw-r--r--src/corelib/thread/qthread.cpp2
-rw-r--r--src/corelib/thread/qthread_p.h11
2 files changed, 7 insertions, 6 deletions
diff --git a/src/corelib/thread/qthread.cpp b/src/corelib/thread/qthread.cpp
index 14209d8d8c..69f8d72b47 100644
--- a/src/corelib/thread/qthread.cpp
+++ b/src/corelib/thread/qthread.cpp
@@ -56,7 +56,7 @@ QT_BEGIN_NAMESPACE
*/
QThreadData::QThreadData(int initialRefCount)
- : _ref(initialRefCount), loopLevel(0), thread(0), threadId(0),
+ : _ref(initialRefCount), loopLevel(0), scopeLevel(0), thread(0), threadId(0),
eventDispatcher(0),
quitNow(false), canWait(true), isAdopted(false), requiresCoreApplication(true)
{
diff --git a/src/corelib/thread/qthread_p.h b/src/corelib/thread/qthread_p.h
index 39a41f1ef4..5f7d01f50f 100644
--- a/src/corelib/thread/qthread_p.h
+++ b/src/corelib/thread/qthread_p.h
@@ -280,6 +280,7 @@ private:
public:
int loopLevel;
+ int scopeLevel;
QStack<QEventLoop *> eventLoops;
QPostEventList postEventList;
@@ -295,15 +296,15 @@ public:
bool requiresCoreApplication;
};
-class QScopedLoopLevelCounter
+class QScopedScopeLevelCounter
{
QThreadData *threadData;
public:
- inline QScopedLoopLevelCounter(QThreadData *threadData)
+ inline QScopedScopeLevelCounter(QThreadData *threadData)
: threadData(threadData)
- { ++threadData->loopLevel; }
- inline ~QScopedLoopLevelCounter()
- { --threadData->loopLevel; }
+ { ++threadData->scopeLevel; }
+ inline ~QScopedScopeLevelCounter()
+ { --threadData->scopeLevel; }
};
// thread wrapper for the main() thread