mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-07-29 01:28:47 -04:00
Handle DeferredDelete events in Tools::wait().
This commit is contained in:
parent
8347fd36ba
commit
6b3fed1ce5
1 changed files with 2 additions and 0 deletions
|
@ -189,6 +189,7 @@ void wait(int ms)
|
||||||
|
|
||||||
if (ms <= 50) {
|
if (ms <= 50) {
|
||||||
QCoreApplication::processEvents(QEventLoop::AllEvents, ms);
|
QCoreApplication::processEvents(QEventLoop::AllEvents, ms);
|
||||||
|
QCoreApplication::sendPostedEvents(0, QEvent::DeferredDelete);
|
||||||
sleep(qMax(ms - static_cast<int>(timer.elapsed()), 0));
|
sleep(qMax(ms - static_cast<int>(timer.elapsed()), 0));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -197,6 +198,7 @@ void wait(int ms)
|
||||||
timeLeft = ms - timer.elapsed();
|
timeLeft = ms - timer.elapsed();
|
||||||
if (timeLeft > 0) {
|
if (timeLeft > 0) {
|
||||||
QCoreApplication::processEvents(QEventLoop::AllEvents, timeLeft);
|
QCoreApplication::processEvents(QEventLoop::AllEvents, timeLeft);
|
||||||
|
QCoreApplication::sendPostedEvents(0, QEvent::DeferredDelete);
|
||||||
sleep(10);
|
sleep(10);
|
||||||
}
|
}
|
||||||
} while (timer.elapsed() < ms);
|
} while (timer.elapsed() < ms);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue