From 276100dcecf19b8037d4da37109c1f8fe6d85459 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Sat, 26 May 2012 21:59:07 +0200 Subject: [PATCH] Fix triggering of Q_ASSERT in PlacesItemModel Check the group-type of an item to decide whether the item should be inserted as device or not. BUG: 300671 FIXED-IN: 4.9.0 --- src/panels/places/placesitemmodel.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/panels/places/placesitemmodel.cpp b/src/panels/places/placesitemmodel.cpp index ca79acb95..bc9975c47 100644 --- a/src/panels/places/placesitemmodel.cpp +++ b/src/panels/places/placesitemmodel.cpp @@ -602,10 +602,10 @@ void PlacesItemModel::loadBookmarks() QList devicesItems; while (!bookmark.isNull()) { - const bool deviceAvailable = devices.remove(bookmark.metaDataItem("UDI")); if (acceptBookmark(bookmark)) { PlacesItem* item = new PlacesItem(bookmark); - if (deviceAvailable) { + if (item->groupType() == PlacesItem::DevicesType) { + devices.remove(item->udi()); devicesItems.append(item); } else { const KUrl url = bookmark.url(); -- 2.47.3