forked from qt-creator/qt-creator
HistoryCompleter: Correct reaction for Key_Down
Change-Id: I9b0d56b6f615f567391349404250d05b5c0b9113 Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
@@ -180,7 +180,9 @@ HistoryCompleter::~HistoryCompleter()
|
|||||||
|
|
||||||
bool HistoryCompleter::eventFilter(QObject *obj, QEvent *event)
|
bool HistoryCompleter::eventFilter(QObject *obj, QEvent *event)
|
||||||
{
|
{
|
||||||
if (event->type() == QEvent::KeyPress && static_cast<QKeyEvent *>(event)->key() == Qt::Key_Down) {
|
if (event->type() == QEvent::KeyPress &&
|
||||||
|
static_cast<QKeyEvent *>(event)->key() == Qt::Key_Down &&
|
||||||
|
static_cast<QLineEdit *>(widget())->text().isEmpty()) {
|
||||||
setCompletionPrefix(QString());
|
setCompletionPrefix(QString());
|
||||||
complete();
|
complete();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user