Show completer on arrow down key in find toolbar.

Reviewed-by: Thorbjorn Lindeijer
This commit is contained in:
Denis Dzyubenko
2009-09-18 20:26:20 +02:00
parent 58ab6111ca
commit e9bf505ca9

View File

@@ -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);