diff options
| author | Frank Reininghaus <[email protected]> | 2014-06-05 08:50:52 +0200 |
|---|---|---|
| committer | Frank Reininghaus <[email protected]> | 2014-06-05 08:50:52 +0200 |
| commit | e07468c7840caeff97360edf08826aa38e8d96ae (patch) | |
| tree | 3d81de17ff4470ea5012c23fcc97b6b4a54eee9f /src/kitemviews/kitemlistview.cpp | |
| parent | 90e27974a4a4a3cb4d08717b5270bea8645b063e (diff) | |
Separate width and height info in the layouting code
By separating the width and height info, we can save some unnecessary
overhead in terms of memory and CPU cycles, and make the calculation of
the height of a row (or the width of a column in Compact View) a bit
simpler.
To achieve this, this patch extends the concept of "logical rows"
(which are actually columns in Compact View) to "logical width" and
"logical height" (which is the actual height and width, respectively, in
Compact View). The distinction between rows/columns and "logical"
rows/columns may be a bit confusing, but the confusion is already in the
current code, and I hope that it will be mitigated a bit by prefixing
the corresponding variables with "logical".
REVIEW: 118454
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 222a29cf5..281258898 100644 --- a/src/kitemviews/kitemlistview.cpp +++ b/src/kitemviews/kitemlistview.cpp @@ -459,9 +459,9 @@ int KItemListView::lastVisibleIndex() const return m_layouter->lastVisibleIndex(); } -void KItemListView::calculateItemSizeHints(QVector<QSizeF>& sizeHints) const +void KItemListView::calculateItemSizeHints(QVector<qreal>& logicalHeightHints, qreal& logicalWidthHint) const { - widgetCreator()->calculateItemSizeHints(sizeHints, this); + widgetCreator()->calculateItemSizeHints(logicalHeightHints, logicalWidthHint, this); } void KItemListView::setSupportsItemExpanding(bool supportsExpanding) |
