diff options
author | Jarek Kobus <jaroslaw.kobus@qt.io> | 2020-06-22 14:52:01 +0200 |
---|---|---|
committer | Jarek Kobus <jaroslaw.kobus@qt.io> | 2020-07-02 21:57:06 +0200 |
commit | 2a6cdec718934ca2cc7f6f9c616ebe62f6912123 (patch) | |
tree | c8b9ed8db47912dccd2e8d125d23760936820c29 /src/widgets/itemviews/qbsptree_p.h | |
parent | d4c04acc65657d29df5b790281a8d1ba896dd868 (diff) | |
download | qtbase-2a6cdec718934ca2cc7f6f9c616ebe62f6912123.tar.gz |
Use QList instead of QVector in widgets
Task-number: QTBUG-84469
Change-Id: I3007734f8e4f164ece9dd8850ef007cbef9e12ef
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Diffstat (limited to 'src/widgets/itemviews/qbsptree_p.h')
-rw-r--r-- | src/widgets/itemviews/qbsptree_p.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/widgets/itemviews/qbsptree_p.h b/src/widgets/itemviews/qbsptree_p.h index 5fd7a5c45f..58481491f1 100644 --- a/src/widgets/itemviews/qbsptree_p.h +++ b/src/widgets/itemviews/qbsptree_p.h @@ -52,7 +52,7 @@ // #include <QtWidgets/private/qtwidgetsglobal_p.h> -#include <qvector.h> +#include <qlist.h> #include <qrect.h> QT_BEGIN_NAMESPACE @@ -80,7 +80,7 @@ public: }; }; typedef QBspTree::Data QBspTreeData; - typedef void callback(QVector<int> &leaf, const QRect &area, uint visited, QBspTreeData data); + typedef void callback(QList<int> &leaf, const QRect &area, uint visited, QBspTreeData data); QBspTree(); @@ -92,7 +92,7 @@ public: void climbTree(const QRect &rect, callback *function, QBspTreeData data); inline int leafCount() const { return leaves.count(); } - inline QVector<int> &leaf(int i) { return leaves[i]; } + inline QList<int> &leaf(int i) { return leaves[i]; } inline void insertLeaf(const QRect &r, int i) { climbTree(r, &insert, i, 0); } inline void removeLeaf(const QRect &r, int i) { climbTree(r, &remove, i, 0); } @@ -103,14 +103,14 @@ protected: inline int parentIndex(int i) const { return (i & 1) ? ((i - 1) / 2) : ((i - 2) / 2); } inline int firstChildIndex(int i) const { return ((i * 2) + 1); } - static void insert(QVector<int> &leaf, const QRect &area, uint visited, QBspTreeData data); - static void remove(QVector<int> &leaf, const QRect &area, uint visited, QBspTreeData data); + static void insert(QList<int> &leaf, const QRect &area, uint visited, QBspTreeData data); + static void remove(QList<int> &leaf, const QRect &area, uint visited, QBspTreeData data); private: uint depth; mutable uint visited; - QVector<Node> nodes; - mutable QVector< QVector<int> > leaves; // the leaves are just indices into the items + QList<Node> nodes; + mutable QList<QList<int>> leaves; // the leaves are just indices into the items }; QT_END_NAMESPACE |