forked from qt-creator/qt-creator
Find: Allow empty prefix for completers
Change-Id: Ie59a7613775c7e5ab19524adc0c5658a81532e95 Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
This commit is contained in:
committed by
Eike Ziller
parent
9f98c27879
commit
d03f33e482
@@ -278,12 +278,17 @@ 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)
|
||||
if (obj == m_ui.findEdit) {
|
||||
if (m_ui.findEdit->text().isEmpty())
|
||||
m_findCompleter->setCompletionPrefix(QString());
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ((obj == m_ui.findEdit || obj == m_findCompleter->popup())
|
||||
&& event->type() == QEvent::KeyPress) {
|
||||
|
Reference in New Issue
Block a user