QCocoaEventDispatcher: Save interrupt state between embedded calls
Since QCocoaEventDispatcher::processEvents() resets the interrupt state, this may prevent a higher level event loop from returning. For example, calling QMenu::exec() and, as a result of an action being triggered, the application calls QCoreApplication::processEvents() after QMenu::hideEvent(). In this case, the menu event loop can be stuck until we run another event loop. Task-number: QTBUG-53947 Change-Id: If7efe1c3c07f7222c695195cbb4f41715e49b02e Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com> Reviewed-by: Wayne Arnold <wayne.arnold@autodesk.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>bb10
parent
37ad51a44e
commit
9ab60b9c0d
|
|
@ -342,7 +342,7 @@ static inline void qt_mac_waitForMoreEvents(NSString *runLoopMode = NSDefaultRun
|
|||
bool QCocoaEventDispatcher::processEvents(QEventLoop::ProcessEventsFlags flags)
|
||||
{
|
||||
Q_D(QCocoaEventDispatcher);
|
||||
d->interrupt = false;
|
||||
QBoolBlocker interruptBlocker(d->interrupt, false);
|
||||
|
||||
bool interruptLater = false;
|
||||
QtCocoaInterruptDispatcher::cancelInterruptLater();
|
||||
|
|
|
|||
Loading…
Reference in New Issue