From 4e66baa6ffdee0c66cb8f4f0cd00f29e26181649 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Sun, 26 Aug 2012 11:40:32 +0300 Subject: [PATCH] HistoryCompleter: Correct reaction for Key_Down Change-Id: I9b0d56b6f615f567391349404250d05b5c0b9113 Reviewed-by: hjk --- src/libs/utils/historycompleter.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/libs/utils/historycompleter.cpp b/src/libs/utils/historycompleter.cpp index 8fcfa1436ba..8b1357a872c 100644 --- a/src/libs/utils/historycompleter.cpp +++ b/src/libs/utils/historycompleter.cpp @@ -180,7 +180,9 @@ HistoryCompleter::~HistoryCompleter() bool HistoryCompleter::eventFilter(QObject *obj, QEvent *event) { - if (event->type() == QEvent::KeyPress && static_cast(event)->key() == Qt::Key_Down) { + if (event->type() == QEvent::KeyPress && + static_cast(event)->key() == Qt::Key_Down && + static_cast(widget())->text().isEmpty()) { setCompletionPrefix(QString()); complete(); }