2D: Fix crash when removing pie slices more than once


QQuickShape keeps raw pointers to its ShapePaths and never drops a path
that gets destroyed, and it has no API for removing a single path.
PieRenderer::freeSlice() deleted the shape path of a removed slice but
left it in the shape's list. The next shape path change then made
QQuickShape::boundingRect() dereference the freed path, which crashed
on the second removal of a slice.

Rebuild the shape's path list from the remaining active slices after
slices are removed.

Pick-to: 6.12
Assisted-by: Claude Code
Change-Id: Ib4095c711f074b1aec8379bc26b06a2dbf51a96f
Reviewed-by: Tomi Korpipaa <tomi.korpipaa@qt.io>
commit659893e8964d3d9aea54ada9c4cb01f3053fd245
parent74ef443e8e18d92a68fd186b0621d6d2bfccef05
authorSami Varanka <sami.varanka@qt.io>
committerSami Varanka <sami.varanka@qt.io>
commit timeFri, 9 Oct 2026 12:05:24 +0000