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:
Eike Ziller
2015-11-12 09:58:07 +01:00
parent 3e7089865d
commit a17d40559d

View File

@@ -115,6 +115,7 @@ FunctionHintProposalWidget::FunctionHintProposalWidget()
connect(upArrow, SIGNAL(clicked()), SLOT(previousPage()));
connect(downArrow, SIGNAL(clicked()), SLOT(nextPage()));
connect(d->m_popupFrame, &QObject::destroyed, this, &FunctionHintProposalWidget::abort);
setFocusPolicy(Qt::NoFocus);
}