summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread
diff options
context:
space:
mode:
authorJohn Stanley <jpsinthemix@verizon.net>2012-01-30 12:27:49 (GMT)
committerQt by Nokia <qt-info@nokia.com>2012-02-10 15:11:54 (GMT)
commit6bab6fccd2d8ee8e83e968864d729c1bbee39a66 (patch)
tree570406d5cfa34e47c95359a402b296ce36af3286 /src/corelib/thread
parent69ada23a75bb51b4efc90c6128cce22d5ee6a779 (diff)
downloadQt-6bab6fccd2d8ee8e83e968864d729c1bbee39a66.zip
Qt-6bab6fccd2d8ee8e83e968864d729c1bbee39a66.tar.gz
Qt-6bab6fccd2d8ee8e83e968864d729c1bbee39a66.tar.bz2
Raise loopLevel for deleteLater in event filters
Change-Id: I163f510f6e99d86a35cc78965fa383e7f4618f42 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Diffstat (limited to 'src/corelib/thread')
-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 9b71d02..bb90de7 100644
--- a/src/corelib/thread/qthread_p.h
+++ b/src/corelib/thread/qthread_p.h
@@ -238,6 +238,17 @@ public:
# endif
};
+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
{