diff options
| author | Peter Penz <[email protected]> | 2012-02-21 16:46:56 +0100 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2012-02-21 16:49:38 +0100 |
| commit | 7deb601f317d7c806e69d0d82d99a03d0859ca85 (patch) | |
| tree | 49f4347edb8377156b19e52708a01690795bfd5b /src/kitemviews/kitemlistview.h | |
| parent | a89bc63f6c2807e92c4e8f9b860ae32d93014e96 (diff) | |
Don't trigger assert when switching to details-view
If the visible roles of the details-view are equal to the visible roles
of other views, then switching to the details-view will trigger an
assert because the invisible roles don't get updated.
Thanks to Frank Reininghaus for the detailed analyses!
In the context of this fix optimizations have been done when switching
view-modes: The "don't-animate-workaround" could be removed.
BUG: 294531
FIXED-IN: 4.8.1
Diffstat (limited to 'src/kitemviews/kitemlistview.h')
| -rw-r--r-- | src/kitemviews/kitemlistview.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/kitemviews/kitemlistview.h b/src/kitemviews/kitemlistview.h index 293f4b1ec..d524dbdf4 100644 --- a/src/kitemviews/kitemlistview.h +++ b/src/kitemviews/kitemlistview.h @@ -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; |
