]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/panels/places/placesitem.cpp
Remove unused #include
[dolphin.git] / src / panels / places / placesitem.cpp
index d7e87cf7a9e41944f2992fef09cbc966997c9b62..a1e4611a57fee875ac71b2a159fb70a215d6385a 100644 (file)
 
 #include "placesitem.h"
 
-#include <KBookmarkManager>
 #include "dolphindebug.h"
 #include <KDirLister>
 #include <KLocalizedString>
 #include "placesitemsignalhandler.h"
-#include <QDateTime>
 #include <Solid/Block>
 
 PlacesItem::PlacesItem(const KBookmark& bookmark, PlacesItem* parent) :
@@ -129,12 +127,15 @@ Solid::Device PlacesItem::device() const
 
 void PlacesItem::setBookmark(const KBookmark& bookmark)
 {
-    if (bookmark == m_bookmark) {
-        return;
-    }
+    const bool bookmarkDataChanged = !(bookmark == m_bookmark);
 
+    // bookmark object must be updated to keep in sync with source model
     m_bookmark = bookmark;
 
+    if (!bookmarkDataChanged) {
+        return;
+    }
+
     delete m_access;
     delete m_volume;
     delete m_disc;