Details
-
Bug
-
Resolution: Done
-
P2: Important
-
4.6.1
-
None
-
Windows XP SP3, Qt 4.6 RC
-
fb78a402b512b017c850e7410745c4d20da04a7c
Description
When QGraphicsItem::setGraphicsEffect is called with an effect pointer that is different than the previously set one, the previous effect is uninstalled and deleted. This is fine. However if the new effect ptr is NULL then the previously set effect is just uninstalled, but not deleted. This causes leaks in applications that expect that the previously set effect is deleted properly also when unsetting it via passing NULL.
Attached is a test application to demonstrate the problem, there will be an assertion due to an effect pointer that is not deleted.