Fix vertex count assert in rounded Rectangle with gradient


When a rounded Rectangle with a gradient got very small (e.g. height
animating towards 0), the minimal inner radius could cover the whole
gradient length. Gradient stops counted in vertexCount were then never
reached and never inserted, which triggered
Q_ASSERT(index == vertexCount).

Insert all remaining gradient stops before the last vertex, and keep
the inserted vertices and their interpolation within the current
segment.

Assisted-by: Claude Code
Pick-to: 6.12 6.11 6.8
Task-number: QTBUG-151367
Change-Id: I9b0eedbbc795c8b44fe1cfc701de923e531b12d9
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
commit1142f0aebc348946d0ac675129c0cdb6cf493bd6
parent2f7f658b2a12724c8fe0ecfe77a39b612eab2aec
authorKaj Grönholm <kaj.gronholm@qt.io>
committerKaj Grönholm <kaj.gronholm@qt.io>
commit timeTue, 20 Oct 2026 21:46:03 +0000