Commit 91dc7ddb authored by Yuchen Deng's avatar Yuchen Deng Committed by hjk
Browse files

HistoryCompleter: Fix removeRows scope

Change-Id: Ia951c1e816a4c333ebf099d774405c41003c4966
Reviewed-by: default avatarhjk <>
Reviewed-by: default avatarDaniel Teske <>
parent 3d5291ae
......@@ -129,8 +129,12 @@ QVariant HistoryCompleterPrivate::data(const QModelIndex &index, int role) const
bool HistoryCompleterPrivate::removeRows(int row, int count, const QModelIndex &parent)
beginRemoveRows (parent, row, row + count);
QTC_ASSERT(theSettings, return false);
if (row + count > list.count())
return false;
beginRemoveRows(parent, row, row + count -1);
for (int i = 0; i < count; ++i)
theSettings->setValue(historyKey, list);
return true;
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