Fix zero width strokes on paths


This commit 2b3f18092316e49bb0f122375fbeca935219166f made a change to
draw a path element in one pass instead of two. As a side effect, a path
drawn in one pass and has a stroke width of 0 will end up with a stroke.
This is because a stroke width of 0 in QPainter means cosmetic pen. This
was not an issue for the fillThenStroke function because it checks for
zero width strokes. If the stroke width is set to zero, let
fillThenStroke handle it.

Fixes: QTBUG-144383
Pick-to: 6.11
Change-Id: I8b56908d20a3c662a5a4d34db9d4fe1a7d0c4210
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
commitc649e5d88a0c9c5a82944f6609834c0c86283388
parent88e76da025dd8c4c445a6cc44c7ba3b0dad63af2
authorHatem ElKharashy <hatem.elkharashy@qt.io>
committerHatem ElKharashy <hatem.elkharashy@qt.io>
commit timeWed, 25 Feb 2026 09:45:40 +0200