]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/kitemviews/kitemlistview.h
Don't trigger assert when switching to details-view
[dolphin.git] / src / kitemviews / kitemlistview.h
index 293f4b1ecd2d2c8c4bbf7fb0f8f14f32a5f89b05..d524dbdf4f98f6f8dfbbf7a4d4f7fce147b882b1 100644 (file)
@@ -176,7 +176,7 @@ public:
      *         has to take care itself how to visually represent the expanded items provided
      *         by the model.
      */
-    virtual bool supportsItemExpanding() const;
+    bool supportsItemExpanding() const;
 
     /**
      * @return The rectangle of the item relative to the top/left of
@@ -298,6 +298,13 @@ protected:
 
     QList<KItemListWidget*> visibleItemListWidgets() const;
 
+    /**
+     * Must be called by the derived class if it supports the expanding
+     * of items.
+     * @see supportsItemExpanding()
+     */
+    void setSupportsItemExpanding(bool supportsExpanding);
+
 protected slots:
     virtual void slotItemsInserted(const KItemRangeList& itemRanges);
     virtual void slotItemsRemoved(const KItemRangeList& itemRanges);
@@ -547,6 +554,7 @@ private:
 private:
     bool m_enabledSelectionToggles;
     bool m_grouped;
+    bool m_supportsItemExpanding;
     int m_activeTransactions; // Counter for beginTransaction()/endTransaction()
     LayoutAnimationHint m_endTransactionAnimationHint;