OSDN Git Service

Completion: Apply perfect match whenever not invoked explicitly
authorLeandro Melo <leandro.melo@nokia.com>
Thu, 26 May 2011 09:07:41 +0000 (11:07 +0200)
committerLeandro T. C. Melo <leandro.melo@nokia.com>
Thu, 26 May 2011 10:14:24 +0000 (12:14 +0200)
This should not only be when the editor is idle but whenever the
completion was not invoked explicitly.

Change-Id: I0f3dbbe2f5db66ae3e1f57c7039a93f74f31e1dc
Reviewed-on: http://codereview.qt.nokia.com/130
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
src/plugins/texteditor/codeassist/genericproposalwidget.cpp

index 8ee8e26..7ed8e66 100644 (file)
@@ -425,7 +425,7 @@ bool GenericProposalWidget::updateAndCheck(const QString &prefix)
     if (!prefix.isEmpty())
         m_d->m_model->filter(prefix);
     if (m_d->m_model->size() == 0
-            || (m_d->m_reason == IdleEditor && hasMatch(prefix, m_d->m_model))) {
+            || (m_d->m_reason != ExplicitlyInvoked && hasMatch(prefix, m_d->m_model))) {
         abort();
         return false;
     }