summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qcoreapplication.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/kernel/qcoreapplication.cpp')
-rw-r--r--src/corelib/kernel/qcoreapplication.cpp11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp
index c30f6135a9..2a80d39620 100644
--- a/src/corelib/kernel/qcoreapplication.cpp
+++ b/src/corelib/kernel/qcoreapplication.cpp
@@ -809,16 +809,7 @@ bool QCoreApplication::notifyInternal(QObject *receiver, QEvent *event)
// call overhead.
QObjectPrivate *d = receiver->d_func();
QThreadData *threadData = d->threadData;
-
- // Exception-safety without try/catch
- struct Incrementer {
- int &variable;
- inline Incrementer(int &variable) : variable(variable)
- { ++variable; }
- inline ~Incrementer()
- { --variable; }
- };
- Incrementer inc(threadData->loopLevel);
+ QScopedLoopLevelCounter loopLevelCounter(threadData);
#ifdef QT_JAMBI_BUILD
int deleteWatch = 0;