| 55 | } |
| 56 | |
| 57 | void unlockForegroundMutexInternal(bool duringDestruction = false) |
| 58 | { |
| 59 | /// Note: QThread::currentThread() might already be invalid during destruction. |
| 60 | if (!duringDestruction) { |
| 61 | Q_ASSERT(holderThread == QThread::currentThread()); |
| 62 | } |
| 63 | |
| 64 | Q_ASSERT(recursion > 0); |
| 65 | recursion -= 1; |
| 66 | if (recursion == 0) { |
| 67 | holderThread = nullptr; |
| 68 | internalMutex.unlock(); |
| 69 | } |
| 70 | } |
| 71 | } |
| 72 | |
| 73 | ForegroundLock::ForegroundLock(bool lock) |
no test coverage detected