Commit e9cf16b7 authored by Tobias Hunger's avatar Tobias Hunger Committed by hjk
Browse files

HistoryCompleter: Do not overwrite text in the FancyLineEdit

Do only set the first item of the completion list if there is no
text in the line edit when the completer gets attached. Otherwise
we might overwrite default values that we actually expect to stick

Task-number: QTCREATORBUG-11291
Change-Id: Iee9aa2a5475b840ede201f306e3b4164c6e88120
Reviewed-by: default avatarhjk <>
parent 242b8393
......@@ -171,7 +171,7 @@ HistoryCompleter::HistoryCompleter(FancyLineEdit *lineEdit, const QString &histo
d->historyKey = QLatin1String("CompleterHistory/") + historyKey;
d->list = theSettings->value(d->historyKey).toStringList();
d->lineEdit = lineEdit;
if (d->list.count())
if (d->list.count() && lineEdit->text().isEmpty())
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment