diff options
| author | Emmanuel Pescosta <[email protected]> | 2014-01-12 23:24:00 +0100 |
|---|---|---|
| committer | Emmanuel Pescosta <[email protected]> | 2014-01-12 23:24:00 +0100 |
| commit | 3ff6e83491e2da9678af0bc149e450ff87db5e8d (patch) | |
| tree | 8a172fb62079c2eef38d8c79b786e0998f9b2d84 /src/kitemviews/private/kitemlistsizehintresolver.h | |
| parent | ace34ac134af5bb4b4fcf8cbb11b979ea40ec30f (diff) | |
Calculate all item size hints at once.
The speed up is really small, but theses changes are mostly straightforward and make the code a bit nicer - break
the KStandardItemListWidgetInformant::itemSizeHint beast into three smaller functions.
FIXED-IN: 4.13
REVIEW: 112979
Diffstat (limited to 'src/kitemviews/private/kitemlistsizehintresolver.h')
| -rw-r--r-- | src/kitemviews/private/kitemlistsizehintresolver.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/kitemviews/private/kitemlistsizehintresolver.h b/src/kitemviews/private/kitemlistsizehintresolver.h index 486f9b631..86580bf7b 100644 --- a/src/kitemviews/private/kitemlistsizehintresolver.h +++ b/src/kitemviews/private/kitemlistsizehintresolver.h @@ -36,7 +36,7 @@ class LIBDOLPHINPRIVATE_EXPORT KItemListSizeHintResolver public: KItemListSizeHintResolver(const KItemListView* itemListView); virtual ~KItemListSizeHintResolver(); - QSizeF sizeHint(int index) const; + QSizeF sizeHint(int index); void itemsInserted(const KItemRangeList& itemRanges); void itemsRemoved(const KItemRangeList& itemRanges); @@ -44,10 +44,12 @@ public: void itemsChanged(int index, int count, const QSet<QByteArray>& roles); void clearCache(); + void updateCache(); private: const KItemListView* m_itemListView; mutable QVector<QSizeF> m_sizeHintCache; + bool m_needsResolving; }; #endif |
