]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Fix triggering of Q_ASSERT in PlacesItemModel
authorPeter Penz <peter.penz19@gmail.com>
Sat, 26 May 2012 19:59:07 +0000 (21:59 +0200)
committerPeter Penz <peter.penz19@gmail.com>
Sat, 26 May 2012 20:01:37 +0000 (22:01 +0200)
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

index ca79acb95cc97d616a13769b967cbff1ffa5e0a9..bc9975c47689a704389858c7e45dcc023801dee9 100644 (file)
@@ -602,10 +602,10 @@ void PlacesItemModel::loadBookmarks()
     QList<PlacesItem*> 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();