diff options
Diffstat (limited to 'src/kernel/qapplication.cpp')
-rw-r--r-- | src/kernel/qapplication.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/kernel/qapplication.cpp b/src/kernel/qapplication.cpp index f3b0119..5b43301 100644 --- a/src/kernel/qapplication.cpp +++ b/src/kernel/qapplication.cpp @@ -2767,18 +2767,21 @@ bool QApplication::internalNotify( QObject *receiver, QEvent * e) if (!handled) { #if defined(QT_THREAD_SUPPORT) - bool locked = false; + int locklevel = 0; + int llcount; if (QApplication::qt_mutex) { - locked = QApplication::qt_mutex->locked(); - } - if (locked) { - QApplication::qt_mutex->unlock(); + QApplication::qt_mutex->lock(); // 1 of 2 + locklevel = qt_mutex->level() - 1; + for (llcount=0; llcount<locklevel; llcount++) { + QApplication::qt_mutex->unlock(); + } + QApplication::qt_mutex->unlock(); // 2 of 2 } #endif consumed = receiver->event( e ); #if defined(QT_THREAD_SUPPORT) - if (locked) { - if (QApplication::qt_mutex) { + if (QApplication::qt_mutex) { + for (llcount=0; llcount<locklevel; llcount++) { QApplication::qt_mutex->lock(); } } |