forked from qt-creator/qt-creator
Fix crashes with FunctionHintProposalWidget
The FunctionHintProposalWidget actually is not visible, but the FakeToolTip popup is. That is also checked for visibility to decide if we currently have a proposal open. Now, clicking anywhere while the popup is open, closes the popup (as it is a tool tip). The FunctionHintProposalWidget is never closed though, which is bad since e.g. CodeAssistant expects the FunctionhintProposalWidget to die. The patch just aborts the FunctionHintProposalWidget when the popup dies. Task-number: QTCREATORBUG-15275 Change-Id: I890f8f2a61859f86b2c4b6e3700f1df504f37595 Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
This commit is contained in:
@@ -115,6 +115,7 @@ FunctionHintProposalWidget::FunctionHintProposalWidget()
|
|||||||
|
|
||||||
connect(upArrow, SIGNAL(clicked()), SLOT(previousPage()));
|
connect(upArrow, SIGNAL(clicked()), SLOT(previousPage()));
|
||||||
connect(downArrow, SIGNAL(clicked()), SLOT(nextPage()));
|
connect(downArrow, SIGNAL(clicked()), SLOT(nextPage()));
|
||||||
|
connect(d->m_popupFrame, &QObject::destroyed, this, &FunctionHintProposalWidget::abort);
|
||||||
|
|
||||||
setFocusPolicy(Qt::NoFocus);
|
setFocusPolicy(Qt::NoFocus);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user