From 471e4fcb226c4523efe93b1bdaf0db026495da94 Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Mon, 6 Jul 2020 11:55:39 +0200 Subject: Use QList instead of QVector in gui implementation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Task-number: QTBUG-84469 Change-Id: I366e845249203d80d640355a7780ac2f91a762f1 Reviewed-by: Tor Arne Vestbø Reviewed-by: Friedemann Kleint --- src/gui/painting/qpathclipper.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/gui/painting/qpathclipper.cpp') diff --git a/src/gui/painting/qpathclipper.cpp b/src/gui/painting/qpathclipper.cpp index 2fbf8bdcba..f2a45025f6 100644 --- a/src/gui/painting/qpathclipper.cpp +++ b/src/gui/painting/qpathclipper.cpp @@ -268,11 +268,11 @@ private: void intersectLines(const QLineF &a, const QLineF &b, QDataBuffer &intersections); QPathSegments &m_segments; - QVector m_index; + QList m_index; RectF m_bounds; - QVector m_tree; + QList m_tree; QDataBuffer m_intersections; }; @@ -1618,7 +1618,7 @@ QPainterPath QPathClipper::clip(Operation operation) bool QPathClipper::doClip(QWingedEdge &list, ClipperMode mode) { - QVector y_coords; + QList y_coords; y_coords.reserve(list.vertexCount()); for (int i = 0; i < list.vertexCount(); ++i) y_coords << list.vertex(i)->y; @@ -1778,9 +1778,9 @@ bool QWingedEdge::isInside(qreal x, qreal y) const return winding & 1; } -static QVector findCrossings(const QWingedEdge &list, qreal y) +static QList findCrossings(const QWingedEdge &list, qreal y) { - QVector crossings; + QList crossings; for (int i = 0; i < list.edgeCount(); ++i) { const QPathEdge *edge = list.edge(i); QPointF a = *list.vertex(edge->first); @@ -1797,7 +1797,7 @@ static QVector findCrossings(const QWingedEdge &list, qreal y) bool QPathClipper::handleCrossingEdges(QWingedEdge &list, qreal y, ClipperMode mode) { - QVector crossings = findCrossings(list, y); + QList crossings = findCrossings(list, y); Q_ASSERT(!crossings.isEmpty()); std::sort(crossings.begin(), crossings.end()); @@ -1869,10 +1869,10 @@ bool QPathClipper::handleCrossingEdges(QWingedEdge &list, qreal y, ClipperMode m namespace { -QVector toSubpaths(const QPainterPath &path) +QList toSubpaths(const QPainterPath &path) { - QVector subpaths; + QList subpaths; if (path.isEmpty()) return subpaths; @@ -2072,7 +2072,7 @@ QPainterPath clip(const QPainterPath &path, qreal t) QPainterPath intersectPath(const QPainterPath &path, const QRectF &rect) { - QVector subpaths = toSubpaths(path); + QList subpaths = toSubpaths(path); QPainterPath result; result.setFillRule(path.fillRule()); -- cgit v1.2.3