From ea76ab2b2ded0197ddf9e33e8d6a8af909fce31c Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Sun, 6 Oct 2013 22:50:12 +0200 Subject: QtWidgets: replace uses of inefficient QLists with QVectors These QPairs are larger than a void*, so holding them in QLists is needlessly inefficient. Worse, the code could come to depend on the fragile property of (inefficient) QLists that references to elements therein never are invalidated. Fix by holding them in QVector instead. Change-Id: I3c205f5326cfd96482563078bdca1747d718457f Reviewed-by: Olivier Goffart (Woboq GmbH) --- src/widgets/itemviews/qtreeview_p.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/widgets/itemviews/qtreeview_p.h') diff --git a/src/widgets/itemviews/qtreeview_p.h b/src/widgets/itemviews/qtreeview_p.h index 9d2f496c5d..a3619ce13b 100644 --- a/src/widgets/itemviews/qtreeview_p.h +++ b/src/widgets/itemviews/qtreeview_p.h @@ -54,6 +54,7 @@ #include "private/qabstractitemview_p.h" #include #include +#include #ifndef QT_NO_TREEVIEW @@ -164,7 +165,7 @@ public: QRect itemDecorationRect(const QModelIndex &index) const; - QList > columnRanges(const QModelIndex &topIndex, const QModelIndex &bottomIndex) const; + QVector > columnRanges(const QModelIndex &topIndex, const QModelIndex &bottomIndex) const; void select(const QModelIndex &start, const QModelIndex &stop, QItemSelectionModel::SelectionFlags command); QPair startAndEndColumns(const QRect &rect) const; -- cgit v1.2.3