forked from qt-creator/qt-creator
Fix crash with reload prompt in presence of modal dialog
When a modal dialog is open, we delay the opening of the reload prompt, which is good. We should not directly open the reload prompt while processing a focus change signal, because that will interfere too much with the focus itself. Queue the signal processing. Fixes: QDS-381 Change-Id: I8973aa986de5a46bf874529cbbda0b325222fcac Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
committed by
Thomas Hartmann
parent
de076eb889
commit
d8920f923f
@@ -215,7 +215,12 @@ void DocumentManagerPrivate::onApplicationFocusChange()
|
||||
|
||||
DocumentManagerPrivate::DocumentManagerPrivate()
|
||||
{
|
||||
connect(qApp, &QApplication::focusChanged, this, &DocumentManagerPrivate::onApplicationFocusChange);
|
||||
// we do not want to do too much directly in the focus change event, so queue the connection
|
||||
connect(qApp,
|
||||
&QApplication::focusChanged,
|
||||
this,
|
||||
&DocumentManagerPrivate::onApplicationFocusChange,
|
||||
Qt::QueuedConnection);
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
|
Reference in New Issue
Block a user