From: Peter Penz Date: Sat, 26 May 2012 19:59:07 +0000 (+0200) Subject: Fix triggering of Q_ASSERT in PlacesItemModel X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/276100dcecf19b8037d4da37109c1f8fe6d85459?ds=inline 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 --- 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();