Skip to content
Snippets Groups Projects
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
around.

Task-number: QTCREATORBUG-11291
Change-Id: Iee9aa2a5475b840ede201f306e3b4164c6e88120
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
parent 242b8393
No related branches found
No related tags found
No related merge requests found
......@@ -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())
lineEdit->setText(d->list.at(0));
setModel(d);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment