forked from qt-creator/qt-creator
TextEditor: Fix is visible check of function hint
Since the FunctionHintProposalWidget is just a proxy witget that uses a FakeToolTip it is not shown directly so we cannot check the visibility with isVisible. Fixes: QTCREATORBUG-25664 Change-Id: I6888e373afcfc79565ce8e3dad1bb05501d58200 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -219,10 +219,15 @@ void FunctionHintProposalWidget::closeProposal()
|
||||
abort();
|
||||
}
|
||||
|
||||
bool FunctionHintProposalWidget::proposalIsVisible() const
|
||||
{
|
||||
return d->m_popupFrame->isVisible();
|
||||
}
|
||||
|
||||
void FunctionHintProposalWidget::abort()
|
||||
{
|
||||
qApp->removeEventFilter(this);
|
||||
if (d->m_popupFrame->isVisible())
|
||||
if (proposalIsVisible())
|
||||
d->m_popupFrame->close();
|
||||
deleteLater();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user