diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2017-12-16 18:23:27 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2019-05-13 16:39:28 +0000 |
commit | 04e4835a94417386352b45743dedc5cfcc9d1100 (patch) | |
tree | 0e195299741804317140d8a77a8284c7181d6d09 /src/widgets/itemviews/qtableview_p.h | |
parent | 0d88721d772fd995a39cc2417a2a0dabee403b7d (diff) |
QTableView: don't convert QSet to QList just to iterate over it
Both in drawAndClipSpans(), as well as callee QSpanCollection::spansInRect(), a QSet is used
to ensure uniqueness of elements. In both cases, the QSet is converted to QList, and the list
is iterated over.
Just iterate over the QSet directly...
Change-Id: I8c7d17246a3cf836659026bfeadb987f37e476bb
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/widgets/itemviews/qtableview_p.h')
-rw-r--r-- | src/widgets/itemviews/qtableview_p.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/itemviews/qtableview_p.h b/src/widgets/itemviews/qtableview_p.h index f629dfcd09..7578e4b448 100644 --- a/src/widgets/itemviews/qtableview_p.h +++ b/src/widgets/itemviews/qtableview_p.h @@ -104,7 +104,7 @@ public: void updateSpan(Span *span, int old_height); Span *spanAt(int x, int y) const; void clear(); - QList<Span *> spansInRect(int x, int y, int w, int h) const; + QSet<Span *> spansInRect(int x, int y, int w, int h) const; void updateInsertedRows(int start, int end); void updateInsertedColumns(int start, int end); |