From e9bf505ca96526259d232a47a46316d864fd7f0f Mon Sep 17 00:00:00 2001
From: Denis Dzyubenko <denis.dzyubenko@nokia.com>
Date: Fri, 18 Sep 2009 20:26:20 +0200
Subject: [PATCH] Show completer on arrow down key in find toolbar.

Reviewed-by: Thorbjorn Lindeijer
---
 src/plugins/find/findtoolbar.cpp | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/plugins/find/findtoolbar.cpp b/src/plugins/find/findtoolbar.cpp
index 1c2c59ca503..01d6449aaca 100644
--- a/src/plugins/find/findtoolbar.cpp
+++ b/src/plugins/find/findtoolbar.cpp
@@ -230,6 +230,16 @@ FindToolBar::~FindToolBar()
 
 bool FindToolBar::eventFilter(QObject *obj, QEvent *event)
 {
+    if (event->type() == QEvent::KeyPress) {
+        QKeyEvent *ke = static_cast<QKeyEvent *>(event);
+        if (ke->key() == Qt::Key_Down) {
+            if (obj == m_ui.findEdit)
+                m_findCompleter->complete();
+            else if (obj == m_ui.replaceEdit)
+                m_replaceCompleter->complete();
+        }
+    }
+
     if ((obj == m_ui.findEdit || obj == m_findCompleter->popup())
                && event->type() == QEvent::KeyPress) {
         QKeyEvent *ke = static_cast<QKeyEvent *>(event);
-- 
GitLab