forked from qt-creator/qt-creator
CodeAssit: Fix completion if function hint is shown
This reverts commit c5dfcce948, but the
bug addressed by that commit remains fixed. FunctionHintProposals need
to be fragile so they can be replaced by e.g. GenericProposals. Only one
proposal can be "active".
Change-Id: Ibca40063d46b8ef3bce4d72be7488f70885e75da
Reviewed-by: David Schulz <david.schulz@digia.com>
This commit is contained in:
committed by
David Schulz
parent
d2b1d7ac0d
commit
77c212329a
@@ -43,7 +43,7 @@ FunctionHintProposal::~FunctionHintProposal()
|
|||||||
|
|
||||||
bool FunctionHintProposal::isFragile() const
|
bool FunctionHintProposal::isFragile() const
|
||||||
{
|
{
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
int FunctionHintProposal::basePosition() const
|
int FunctionHintProposal::basePosition() const
|
||||||
|
|||||||
@@ -212,13 +212,18 @@ bool FunctionHintProposalWidget::eventFilter(QObject *obj, QEvent *e)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case QEvent::KeyRelease:
|
case QEvent::KeyRelease: {
|
||||||
if (static_cast<QKeyEvent*>(e)->key() == Qt::Key_Escape && d->m_escapePressed) {
|
QKeyEvent *ke = static_cast<QKeyEvent*>(e);
|
||||||
abort();
|
if (ke->key() == Qt::Key_Escape && d->m_escapePressed) {
|
||||||
emit explicitlyAborted();
|
abort();
|
||||||
return false;
|
emit explicitlyAborted();
|
||||||
|
return false;
|
||||||
|
} else if (ke->key() == Qt::Key_Up || ke->key() == Qt::Key_Down) {
|
||||||
|
if (d->m_model->size() > 1)
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
d->m_assistant->notifyChange();
|
||||||
}
|
}
|
||||||
d->m_assistant->notifyChange();
|
|
||||||
break;
|
break;
|
||||||
case QEvent::WindowDeactivate:
|
case QEvent::WindowDeactivate:
|
||||||
case QEvent::FocusOut:
|
case QEvent::FocusOut:
|
||||||
|
|||||||
Reference in New Issue
Block a user