summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qpathclipper.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2014-08-17 20:44:39 +0200
committerMarc Mutz <marc.mutz@kdab.com>2015-06-24 13:21:40 +0000
commiteb47c180810eaaf9a44664e5b67a12b2624a466e (patch)
treed074bf27b8b3757b2cc0724c170b852e42fb7c56 /src/gui/painting/qpathclipper.cpp
parentaa79adef6f7ce985138db535ef4d8fe3325b3fc3 (diff)
QtGui: don't hold QPainterPath in QList
QPainterPath isn't marked movable , so holding them in a QList 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. Change-Id: Id4dae8037401c52fd57a2274e45399a9b70beb69 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/gui/painting/qpathclipper.cpp')
-rw-r--r--src/gui/painting/qpathclipper.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/painting/qpathclipper.cpp b/src/gui/painting/qpathclipper.cpp
index 0798418c17..513fdfa2b6 100644
--- a/src/gui/painting/qpathclipper.cpp
+++ b/src/gui/painting/qpathclipper.cpp
@@ -1889,10 +1889,10 @@ bool QPathClipper::handleCrossingEdges(QWingedEdge &list, qreal y, ClipperMode m
namespace {
-QList<QPainterPath> toSubpaths(const QPainterPath &path)
+QVector<QPainterPath> toSubpaths(const QPainterPath &path)
{
- QList<QPainterPath> subpaths;
+ QVector<QPainterPath> subpaths;
if (path.isEmpty())
return subpaths;
@@ -2092,7 +2092,7 @@ QPainterPath clip(const QPainterPath &path, qreal t)
QPainterPath intersectPath(const QPainterPath &path, const QRectF &rect)
{
- QList<QPainterPath> subpaths = toSubpaths(path);
+ QVector<QPainterPath> subpaths = toSubpaths(path);
QPainterPath result;
result.setFillRule(path.fillRule());