QSvgGenerator: Simplify writing "curve to" data elements


The old code had two nested loops which both used the same index
variable. This was hard to read and we even had to introduce an
additional check to avoid crashes when the index leaves its expected
range.

Task-number: QTBUG-145372
Change-Id: I915847799cc25b212ab027347763a220223773fa
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Reviewed-by: Hatem ElKharashy <hatem.elkharashy@qt.io>
commit187031ce0cf5521aca89158ebd0f780ab9664938
parent0711a0080c9234220c83eb03d901cb199b419f1f
authorRobert Löhning <robert.loehning@qt.io>
committerRobert Löhning <robert.loehning@qt.io>
commit timeThu, 28 May 2026 19:55:29 +0000