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/kitemlistview.cpp | |
| 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/kitemlistview.cpp')
| -rw-r--r-- | src/kitemviews/kitemlistview.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/kitemviews/kitemlistview.cpp b/src/kitemviews/kitemlistview.cpp index 7f497210c..38ce63af0 100644 --- a/src/kitemviews/kitemlistview.cpp +++ b/src/kitemviews/kitemlistview.cpp @@ -460,9 +460,9 @@ int KItemListView::lastVisibleIndex() const return m_layouter->lastVisibleIndex(); } -QSizeF KItemListView::itemSizeHint(int index) const +void KItemListView::calculateItemSizeHints(QVector<QSizeF>& sizeHints) const { - return widgetCreator()->itemSizeHint(index, this); + widgetCreator()->calculateItemSizeHints(sizeHints, this); } void KItemListView::setSupportsItemExpanding(bool supportsExpanding) |
