This can lead to crashes and is inconsistent with the KIO file picker dialog, which shows duplicated entries.
BUG: 393528
Differential Revision: https://phabricator.kde.org/D12558
const KBookmark bookmark = m_sourceModel->bookmarkForIndex(index);
Q_ASSERT(!bookmark.isNull());
const KBookmark bookmark = m_sourceModel->bookmarkForIndex(index);
Q_ASSERT(!bookmark.isNull());
- PlacesItem *item = itemFromBookmark(bookmark);
- if (!item) {
- item = new PlacesItem(bookmark);
- }
+ PlacesItem *item = new PlacesItem(bookmark);
updateItem(item, index);
insertSortedItem(item);
updateItem(item, index);
insertSortedItem(item);