┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/panels/places
diff options
context:
space:
mode:
authorLuca Beltrame <[email protected]>2012-09-21 10:55:08 +0200
committerLuca Beltrame <[email protected]>2012-09-21 10:55:08 +0200
commitf1b822d926316d739ec10d8b05917b6b0c2d92b5 (patch)
tree20e52bfd70694a34f86fa650d3797be67bda8f67 /src/panels/places
parent399c4b22ea9947047c7d2777d7f361df6b5e9636 (diff)
parentc8243401470156d9ee76e2015a23741570d3dba1 (diff)
Merge branch 'KDE/4.9'
Conflicts: konq-plugins/dirfilter/dirfilterplugin.cpp konq-plugins/dirfilter/dirfilterplugin.h
Diffstat (limited to 'src/panels/places')
-rw-r--r--src/panels/places/placesitemmodel.cpp24
1 files changed, 17 insertions, 7 deletions
diff --git a/src/panels/places/placesitemmodel.cpp b/src/panels/places/placesitemmodel.cpp
index 5eb1c35ea..4770c6b10 100644
--- a/src/panels/places/placesitemmodel.cpp
+++ b/src/panels/places/placesitemmodel.cpp
@@ -659,11 +659,22 @@ void PlacesItemModel::updateBookmarks()
}
if (!found) {
- PlacesItem* item = new PlacesItem(newBookmark);
- if (item->isHidden() && !m_hiddenItemsShown) {
- m_bookmarkedItems.append(item);
- } else {
- appendItemToGroup(item);
+ const QString udi = newBookmark.metaDataItem("UDI");
+
+ /*
+ * See Bug 304878
+ * Only add a new places item, if the item text is not empty
+ * and if the device is available. Fixes the strange behaviour -
+ * add a places item without text in the Places section - when you
+ * remove a device (e.g. a usb stick) without unmounting.
+ */
+ if (udi.isEmpty() || Solid::Device(udi).isValid()) {
+ PlacesItem* item = new PlacesItem(newBookmark);
+ if (item->isHidden() && !m_hiddenItemsShown) {
+ m_bookmarkedItems.append(item);
+ } else {
+ appendItemToGroup(item);
+ }
}
}
}
@@ -885,8 +896,7 @@ void PlacesItemModel::createSystemBookmarks()
Q_ASSERT(m_systemBookmarks.isEmpty());
Q_ASSERT(m_systemBookmarksIndexes.isEmpty());
- const QString timeLineIcon = "package_utility_time"; // TODO: Ask the Oxygen team to create
- // a custom icon for the timeline-protocol
+ const QString timeLineIcon = "chronometer";
// Note: The context of the I18N_NOOP2 must be "KFile System Bookmarks". The real
// i18nc call is done after reading the bookmark. The reason why the i18nc call is not