From f08af0d6dbe7688c6ce4fedbc83f2726e1b6e1c8 Mon Sep 17 00:00:00 2001 From: hjk Date: Fri, 27 Mar 2015 13:52:10 +0100 Subject: [PATCH] Utils: Don't filter HistoryLineEdit popup ... and make the list accessible on even if the content of the line edit is not empty. Change-Id: Ib9fdd379dd9c96e2e0ddf58d9f6e9ec3d4374527 Reviewed-by: Eike Ziller --- src/libs/utils/completinglineedit.cpp | 4 +--- src/libs/utils/historycompleter.cpp | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/libs/utils/completinglineedit.cpp b/src/libs/utils/completinglineedit.cpp index 5bbc5d88398..620609ef9cf 100644 --- a/src/libs/utils/completinglineedit.cpp +++ b/src/libs/utils/completinglineedit.cpp @@ -63,10 +63,8 @@ void CompletingLineEdit::keyPressEvent(QKeyEvent *e) { if (e->key() == Qt::Key_Down && !e->modifiers()) { if (QCompleter *comp = completer()) { - if (text().isEmpty() && !comp->popup()->isVisible()) { - comp->setCompletionPrefix(QString()); + if (!comp->popup()->isVisible()) comp->complete(); - } } } return QLineEdit::keyPressEvent(e); diff --git a/src/libs/utils/historycompleter.cpp b/src/libs/utils/historycompleter.cpp index 4cf055ae3c4..fcfb2905bbc 100644 --- a/src/libs/utils/historycompleter.cpp +++ b/src/libs/utils/historycompleter.cpp @@ -174,6 +174,7 @@ HistoryCompleter::HistoryCompleter(const QString &historyKey, QObject *parent) { QTC_ASSERT(!historyKey.isEmpty(), return); QTC_ASSERT(theSettings, return); + setCompletionMode(QCompleter::UnfilteredPopupCompletion); d->historyKey = QLatin1String("CompleterHistory/") + historyKey; d->list = theSettings->value(d->historyKey).toStringList();