forked from qt-creator/qt-creator
Utils: Don't filter HistoryLineEdit popup
... and make the list accessible on <Down> even if the content of the line edit is not empty. Change-Id: Ib9fdd379dd9c96e2e0ddf58d9f6e9ec3d4374527 Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
@@ -63,12 +63,10 @@ void CompletingLineEdit::keyPressEvent(QKeyEvent *e)
|
|||||||
{
|
{
|
||||||
if (e->key() == Qt::Key_Down && !e->modifiers()) {
|
if (e->key() == Qt::Key_Down && !e->modifiers()) {
|
||||||
if (QCompleter *comp = completer()) {
|
if (QCompleter *comp = completer()) {
|
||||||
if (text().isEmpty() && !comp->popup()->isVisible()) {
|
if (!comp->popup()->isVisible())
|
||||||
comp->setCompletionPrefix(QString());
|
|
||||||
comp->complete();
|
comp->complete();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return QLineEdit::keyPressEvent(e);
|
return QLineEdit::keyPressEvent(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -174,6 +174,7 @@ HistoryCompleter::HistoryCompleter(const QString &historyKey, QObject *parent)
|
|||||||
{
|
{
|
||||||
QTC_ASSERT(!historyKey.isEmpty(), return);
|
QTC_ASSERT(!historyKey.isEmpty(), return);
|
||||||
QTC_ASSERT(theSettings, return);
|
QTC_ASSERT(theSettings, return);
|
||||||
|
setCompletionMode(QCompleter::UnfilteredPopupCompletion);
|
||||||
|
|
||||||
d->historyKey = QLatin1String("CompleterHistory/") + historyKey;
|
d->historyKey = QLatin1String("CompleterHistory/") + historyKey;
|
||||||
d->list = theSettings->value(d->historyKey).toStringList();
|
d->list = theSettings->value(d->historyKey).toStringList();
|
||||||
|
|||||||
Reference in New Issue
Block a user