diff options
Diffstat (limited to 'src/corelib/thread/qthread.cpp')
-rw-r--r-- | src/corelib/thread/qthread.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/corelib/thread/qthread.cpp b/src/corelib/thread/qthread.cpp index f119828e8e..acee337642 100644 --- a/src/corelib/thread/qthread.cpp +++ b/src/corelib/thread/qthread.cpp @@ -711,6 +711,19 @@ QThread::Priority QThread::priority() const \sa terminate() */ +/*! + Returns the current event loop level for the thread. + + \note This can only be called within the thread itself, i.e. when + it is the current thread. +*/ + +int QThread::loopLevel() const +{ + Q_D(const QThread); + return d->data->eventLoops.size(); +} + #else // QT_NO_THREAD QThread::QThread(QObject *parent) |