From a17d40559d01fc188cc22e285750c5cbfed9fc0b Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Thu, 12 Nov 2015 09:58:07 +0100 Subject: [PATCH] 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 --- src/plugins/texteditor/codeassist/functionhintproposalwidget.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/plugins/texteditor/codeassist/functionhintproposalwidget.cpp b/src/plugins/texteditor/codeassist/functionhintproposalwidget.cpp index 734e0dd019b..18b8444d7af 100644 --- a/src/plugins/texteditor/codeassist/functionhintproposalwidget.cpp +++ b/src/plugins/texteditor/codeassist/functionhintproposalwidget.cpp @@ -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); }