TextEditor: Remove invalid QTC_ASSERT

...in FunctionHintProposalWidget.

Typing the opening parenthesis triggers a function completion. If the
user types the closing parenthesis before the completion results arrive,
the prefix will be recognized as ")", for which it is valid to return -1
as the active/current argument and in consequence false for
updateAndCheck().

Change-Id: I2dd2382a402f277873302acfdf6a759e7b735d3f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
This commit is contained in:
Nikolai Kosjar
2016-04-26 16:22:54 +02:00
parent a717e980e7
commit 68974f2bd1

View File

@@ -159,7 +159,8 @@ void FunctionHintProposalWidget::showProposal(const QString &prefix)
d->m_pager->setVisible(d->m_totalHints > 1); d->m_pager->setVisible(d->m_totalHints > 1);
d->m_currentHint = 0; d->m_currentHint = 0;
QTC_ASSERT(updateAndCheck(prefix), abort(); return; ); if (!updateAndCheck(prefix))
return;
qApp->installEventFilter(this); qApp->installEventFilter(this);
d->m_popupFrame->show(); d->m_popupFrame->show();