Commit 09896892 authored by David Faure's avatar David Faure
Browse files

Merge remote-tracking branch 'origin/release/21.04'

parents 51cc5aa3 6e0b4d4e
......@@ -164,9 +164,11 @@ bool KFindItemModel::isInserted(const QUrl &url)
void KFindItemModel::clear()
{
beginRemoveRows(QModelIndex(), 0, m_itemList.size());
m_itemList.clear();
endRemoveRows();
if (!m_itemList.isEmpty()) {
beginRemoveRows(QModelIndex(), 0, m_itemList.size());
m_itemList.clear();
endRemoveRows();
}
}
Qt::ItemFlags KFindItemModel::flags(const QModelIndex &index) const
......
Markdown is supported
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