┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/panels/places/placesitemmodel.h
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2012-05-13 23:29:28 +0200
committerPeter Penz <[email protected]>2012-05-13 23:30:38 +0200
commit6e9713c558ad07b0baa2a79ae69328fda7b61a15 (patch)
tree0ada814c2ca39dc9e88ea2294d7a1c8d8c567cdc /src/panels/places/placesitemmodel.h
parent1426b8d3c785e47fab6312e9d01a21dc265aadb8 (diff)
PlacesItemModel: Remove setItemHidden and isItemHidden
This should be handled automatically when the hidden-state of the item itself gets toggled.
Diffstat (limited to 'src/panels/places/placesitemmodel.h')
-rw-r--r--src/panels/places/placesitemmodel.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/panels/places/placesitemmodel.h b/src/panels/places/placesitemmodel.h
index 14d0accc1..e9604ad22 100644
--- a/src/panels/places/placesitemmodel.h
+++ b/src/panels/places/placesitemmodel.h
@@ -35,7 +35,7 @@ class KBookmarkManager;
class PlacesItem;
class QAction;
-#define PLACESITEMMODEL_DEBUG
+// #define PLACESITEMMODEL_DEBUG
/**
* @brief Model for maintaining the bookmarks of the places panel.
@@ -58,9 +58,6 @@ public:
int hiddenCount() const;
- void setItemHidden(int index, bool hide);
- bool isItemHidden(int index) const;
-
/**
* Search the item which is equal to the URL or at least
* is a parent URL. If there are more than one possible
@@ -90,12 +87,13 @@ signals:
protected:
virtual void onItemInserted(int index);
virtual void onItemRemoved(int index);
- virtual void onItemReplaced(int index);
+ virtual void onItemChanged(int index, const QSet<QByteArray>& changedRoles);
private slots:
void slotDeviceAdded(const QString& udi);
void slotDeviceRemoved(const QString& udi);
void slotStorageTeardownDone(Solid::ErrorType error, const QVariant& errorData);
+ void removeHiddenItem();
private:
void loadBookmarks();
@@ -155,6 +153,12 @@ private:
QHash<KUrl, int> m_systemBookmarksIndexes;
QList<PlacesItem*> m_hiddenItems;
+
+ // Index of the hidden item that should be removed in
+ // removeHiddenItem(). The removing must be done
+ // asynchronously as in the scope of onItemChanged()
+ // removing an item is not allowed.
+ int m_hiddenItemToRemove;
};
#endif