From eb47c180810eaaf9a44664e5b67a12b2624a466e Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Sun, 17 Aug 2014 20:44:39 +0200 Subject: 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) --- src/gui/painting/qpathclipper.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/gui/painting/qpathclipper.cpp') 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 toSubpaths(const QPainterPath &path) +QVector toSubpaths(const QPainterPath &path) { - QList subpaths; + QVector 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 subpaths = toSubpaths(path); + QVector subpaths = toSubpaths(path); QPainterPath result; result.setFillRule(path.fillRule()); -- cgit v1.2.3