A QGraphicsScene owns the items added to it, but if we later removeItem() one again, then we're also responsible for freeing the item. The test functions didn't do that, so we leaked the item. In order to not change the rest of the functions by deleting the item earlier than it had been before, install a qScopeGuard() to delete it, right after we removed it from the scene again. Amends the start of the public history. Pick-to: 6.8 6.5 5.15 Change-Id: I8ab50626a0b5d52825bb329233ab8efe6c1291dc Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 3651769d52108b01b142a3bcaae530e949eafa68) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
…
…
Description
Languages
C++
84.3%
HTML
4.9%
C
3.9%
CMake
3.6%
Objective-C++
2%
Other
0.8%