summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qpathclipper.cpp
diff options
context:
space:
mode:
authorJarek Kobus <jaroslaw.kobus@qt.io>2020-07-06 11:55:39 +0200
committerJarek Kobus <jaroslaw.kobus@qt.io>2020-07-07 20:35:05 +0200
commit471e4fcb226c4523efe93b1bdaf0db026495da94 (patch)
treebb963937b2446eb32d7632568433083a386f2c68 /src/gui/painting/qpathclipper.cpp
parent7f400522c39f6a1abf083dc1af49ea3109635cc8 (diff)
Use QList instead of QVector in gui implementation
Task-number: QTBUG-84469 Change-Id: I366e845249203d80d640355a7780ac2f91a762f1 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'src/gui/painting/qpathclipper.cpp')
-rw-r--r--src/gui/painting/qpathclipper.cpp18
1 files changed, 9 insertions, 9 deletions
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<QIntersection> &intersections);
QPathSegments &m_segments;
- QVector<int> m_index;
+ QList<int> m_index;
RectF m_bounds;
- QVector<TreeNode> m_tree;
+ QList<TreeNode> m_tree;
QDataBuffer<QIntersection> m_intersections;
};
@@ -1618,7 +1618,7 @@ QPainterPath QPathClipper::clip(Operation operation)
bool QPathClipper::doClip(QWingedEdge &list, ClipperMode mode)
{
- QVector<qreal> y_coords;
+ QList<qreal> 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<QCrossingEdge> findCrossings(const QWingedEdge &list, qreal y)
+static QList<QCrossingEdge> findCrossings(const QWingedEdge &list, qreal y)
{
- QVector<QCrossingEdge> crossings;
+ QList<QCrossingEdge> 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<QCrossingEdge> findCrossings(const QWingedEdge &list, qreal y)
bool QPathClipper::handleCrossingEdges(QWingedEdge &list, qreal y, ClipperMode mode)
{
- QVector<QCrossingEdge> crossings = findCrossings(list, y);
+ QList<QCrossingEdge> 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<QPainterPath> toSubpaths(const QPainterPath &path)
+QList<QPainterPath> toSubpaths(const QPainterPath &path)
{
- QVector<QPainterPath> subpaths;
+ QList<QPainterPath> 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<QPainterPath> subpaths = toSubpaths(path);
+ QList<QPainterPath> subpaths = toSubpaths(path);
QPainterPath result;
result.setFillRule(path.fillRule());