Generate <polygon> when painting polygon using QPainter


There is a distniction in SVG between a closed path with the Z
command and a path that is closed manually by using the lineto
command. When generating a polygon fram QPainter draw functions,
QSvgGenerator used <path> instead of <polygon>, but the generated
path never had the Z command leading to the polygon being open.
Instead, QSvgGenerator can generate a <polygon> tag to draw the
points.

Fixes: QTBUG-143451
Pick-to: 6.11
Change-Id: I1f79ba46e2e65b825d24f8a0986fdfc819dd42b6
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
commit91f60007d0b7878b712f0ef85b812859b4d33554
parent28c6789e709ef1fbefbc237b8136a14509e2745b
authorHatem ElKharashy <hatem.elkharashy@qt.io>
committerEirik Aavitsland <eirik.aavitsland@qt.io>
commit timeMon, 19 Jan 2026 11:36:30 +0100