diff options
author | Alexander Volkov <a.volkov@rusbitech.ru> | 2016-10-12 16:29:37 +0300 |
---|---|---|
committer | Alexander Volkov <a.volkov@rusbitech.ru> | 2016-11-11 09:17:16 +0000 |
commit | 19a16a822927a1b09a6a2b88af9cb24538a5f721 (patch) | |
tree | 4e4c9b11a5188950cbf54be23eb91e0e7bf7a804 /src/widgets/itemviews/qlistview.cpp | |
parent | 8eb3f586094294ab09a69d98fba374e236b0e095 (diff) |
QListView: remove pointless QVector::resize() callings
The construction 'vector.resize(vector.count())' has no effect.
Change-Id: I3d8ba7aa408599470b3a1ba4d1c1d859cf509d00
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/widgets/itemviews/qlistview.cpp')
-rw-r--r-- | src/widgets/itemviews/qlistview.cpp | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/widgets/itemviews/qlistview.cpp b/src/widgets/itemviews/qlistview.cpp index 0788e0287a..d19e5d9a9f 100644 --- a/src/widgets/itemviews/qlistview.cpp +++ b/src/widgets/itemviews/qlistview.cpp @@ -2335,13 +2335,7 @@ void QListModeViewBase::scrollContentsBy(int dx, int dy, bool scrollElasticBand) bool QListModeViewBase::doBatchedItemLayout(const QListViewLayoutInfo &info, int max) { doStaticLayout(info); - if (batchStartRow > max) { // stop items layout - flowPositions.resize(flowPositions.count()); - segmentPositions.resize(segmentPositions.count()); - segmentStartRows.resize(segmentStartRows.count()); - return true; // done - } - return false; // not done + return batchStartRow > max; // returning true stops items layout } QListViewItem QListModeViewBase::indexToListViewItem(const QModelIndex &index) const |