From 3ff6e83491e2da9678af0bc149e450ff87db5e8d Mon Sep 17 00:00:00 2001 From: Emmanuel Pescosta Date: Sun, 12 Jan 2014 23:24:00 +0100 Subject: 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 --- src/kitemviews/kitemlistview.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/kitemviews/kitemlistview.cpp') 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& sizeHints) const { - return widgetCreator()->itemSizeHint(index, this); + widgetCreator()->calculateItemSizeHints(sizeHints, this); } void KItemListView::setSupportsItemExpanding(bool supportsExpanding) -- cgit v1.3