mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2026-11-24 11:01:38 -08:00
Protect against emitting inactivityDetected() while it'is still processed.
This commit is contained in:
1 parent
721bec9794
commit
8ad48d6774
2 files changed
+9
No files matched your search
@@ -67,7 +67,14 @@ bool InactivityTimer::eventFilter(QObject* watched, QEvent* event)
|
||||
|
||||
void InactivityTimer::timeout()
|
||||
{
|
||||
// make sure we don't emit the signal a second time while it's still processed
|
||||
if (!m_emitMutx.tryLock()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_active && !m_timer->isActive()) {
|
||||
Q_EMIT inactivityDetected();
|
||||
}
|
||||
|
||||
m_emitMutx.unlock();
|
||||
}
|
||||
Reference in new issue
Block a user