diff options
author | Paul Olav Tvete <paul.tvete@qt.io> | 2023-10-03 13:45:30 +0200 |
---|---|---|
committer | Paul Olav Tvete <paul.tvete@qt.io> | 2023-10-03 12:10:25 +0000 |
commit | e559d5cf2b66c4a973f83f173d57676a21d287ef (patch) | |
tree | 26410978b7384fd6997ec2474d28ff280d83dce8 | |
parent | f69412e623d05376617b79bc11d61be5d90e8c68 (diff) |
Use the correct type to avoid dependence on compiler-specific memory
layout.
Pick-to: 6.6
Change-Id: I5af56074d4710be444816011367bc8cbf965b2e2
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
-rw-r--r-- | src/quickshapes/qquickshapecurverenderer.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/quickshapes/qquickshapecurverenderer.cpp b/src/quickshapes/qquickshapecurverenderer.cpp index 820c16fe6d..a950b71752 100644 --- a/src/quickshapes/qquickshapecurverenderer.cpp +++ b/src/quickshapes/qquickshapecurverenderer.cpp @@ -309,8 +309,13 @@ void QQuickShapeCurveRenderer::updateNode() static_cast<QQuickShapeCurveNode *>(pathNode)->setColor(pathData.fillColor); } if (!(dirtyFlags & StrokeDirty)) { - for (auto &strokeNode : std::as_const(pathData.strokeNodes)) - static_cast<QQuickShapeCurveNode *>(strokeNode)->setColor(pathData.pen.color()); + if (useTriangulatingStroker) { + for (auto &strokeNode : std::as_const(pathData.strokeNodes)) + static_cast<QQuickShapeCurveNode *>(strokeNode)->setColor(pathData.pen.color()); + } else { + for (auto &strokeNode : std::as_const(pathData.strokeNodes)) + static_cast<QQuickShapeStrokeNode *>(strokeNode)->setColor(pathData.pen.color()); + } } } |