From 99fee33fd1a5e82b7be3d17a74229efaaf7571ef Mon Sep 17 00:00:00 2001
From: Leandro Melo <leandro.melo@nokia.com>
Date: Fri, 20 May 2011 11:14:48 +0200
Subject: [PATCH] Completion: Complete prematuraly only if invoked explicitly

Change-Id: I941a94df2f8fb86f340ee04338641fe50c55e1b2
Reviewed-on: http://codereview.qt.nokia.com/45
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
---
 src/plugins/texteditor/codeassist/genericproposalwidget.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/plugins/texteditor/codeassist/genericproposalwidget.cpp b/src/plugins/texteditor/codeassist/genericproposalwidget.cpp
index f0fe01419a6..8f9127f0c38 100644
--- a/src/plugins/texteditor/codeassist/genericproposalwidget.cpp
+++ b/src/plugins/texteditor/codeassist/genericproposalwidget.cpp
@@ -552,6 +552,7 @@ bool GenericProposalWidget::eventFilter(QObject *o, QEvent *e)
 
         if (ke->text().length() == 1
                 && m_d->m_completionListView->currentIndex().isValid()
+                && m_d->m_reason == ExplicitlyInvoked
                 && qApp->focusWidget() == o) {
             const QChar &typedChar = ke->text().at(0);
             IAssistProposalItem *item =
-- 
GitLab