2D: Fix memory leaks with QPieSlicePrivate


When a pieslice is rendered, its dynamically allocated private api
members are parented to pierenderer. When the pierenderer gets
destroyed, the parented slice members are freed. However, if the slice
is never rendered those members aren't parented to the pierenderer.

Change the labelItem, shapePath, labelShape, and labelPath to be
QPointers. In the PieSlicePrivate dtor, delete them if they are not
parented.

Pick-to: 6.12 6.11.3
Change-Id: I149c7aaba35333e5a523dcbd7ab6ded526cd4742
Reviewed-by: Sami Varanka <sami.varanka@qt.io>
Reviewed-by: Owais Akhtar <owais.akhtar@qt.io>
commitaaa59b9ed8a35f15466ef55c42d310c5a522ab30
parent4fafe2b247488865ef0b5b91c9e281489c2e7262
authorSami Varanka <sami.varanka@qt.io>
committerSami Varanka <sami.varanka@qt.io>
commit timeMon, 28 Sep 2026 13:04:31 +0000