┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews/private/kitemlistviewlayouter.h
diff options
context:
space:
mode:
authorFrank Reininghaus <[email protected]>2013-06-30 14:26:24 +0200
committerFrank Reininghaus <[email protected]>2013-06-30 14:26:24 +0200
commit2a612e12cee9d19fe94c069f56b5e5a47421d5cf (patch)
tree38940a78a30ee816984ae0b4339f77726327bc9f /src/kitemviews/private/kitemlistviewlayouter.h
parentdedebed4683014f8604d2319f266c7990ab53daf (diff)
Replace QList by QVector if the elements are larger than a pointer
If the elements are larger than a pointer, QList does not store the elements themselves, but pointers to them in a contiguous block of memory. This wastes quite a bit of memory. This can be prevented easily by using QVector instead. REVIEW: 111304
Diffstat (limited to 'src/kitemviews/private/kitemlistviewlayouter.h')
-rw-r--r--src/kitemviews/private/kitemlistviewlayouter.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/kitemviews/private/kitemlistviewlayouter.h b/src/kitemviews/private/kitemlistviewlayouter.h
index 5ca73e1ad..306fcd360 100644
--- a/src/kitemviews/private/kitemlistviewlayouter.h
+++ b/src/kitemviews/private/kitemlistviewlayouter.h
@@ -26,6 +26,7 @@
#include <QRectF>
#include <QSet>
#include <QSizeF>
+#include <QVector>
class KItemModelBase;
class KItemListSizeHintResolver;
@@ -230,7 +231,7 @@ private:
int column;
int row;
};
- QList<ItemInfo> m_itemInfos;
+ QVector<ItemInfo> m_itemInfos;
friend class KItemListControllerTest;
};