Find: Allow empty prefix for completers

Change-Id: Ie59a7613775c7e5ab19524adc0c5658a81532e95
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
This commit is contained in:
Orgad Shaneh
2012-08-26 14:50:00 +03:00
committed by Eike Ziller
parent 9f98c27879
commit d03f33e482

View File

@@ -278,10 +278,15 @@ bool FindToolBar::eventFilter(QObject *obj, QEvent *event)
if (event->type() == QEvent::KeyPress) { if (event->type() == QEvent::KeyPress) {
QKeyEvent *ke = static_cast<QKeyEvent *>(event); QKeyEvent *ke = static_cast<QKeyEvent *>(event);
if (ke->key() == Qt::Key_Down) { if (ke->key() == Qt::Key_Down) {
if (obj == m_ui.findEdit) if (obj == m_ui.findEdit) {
if (m_ui.findEdit->text().isEmpty())
m_findCompleter->setCompletionPrefix(QString());
m_findCompleter->complete(); m_findCompleter->complete();
else if (obj == m_ui.replaceEdit) } else if (obj == m_ui.replaceEdit) {
if (m_ui.replaceEdit->text().isEmpty())
m_replaceCompleter->setCompletionPrefix(QString());
m_replaceCompleter->complete(); m_replaceCompleter->complete();
}
} }
} }