Use deleteLater in Part::slotWidgetDestroyed().
Review Request #125711 - Created Oct. 19, 2015 and submitted
When a part's main widget is destroyed, we should not delete the part immediately - both because deleting an object from inside one of its signals is not safe generally, and because derived classes may well hold QPointers to the widgets, expecting them to be cleared between the widget being destroyed and the part being destroyed.
Unit tests for KParts pass.
Running akregator under valgrind no longer produces a bunch of "invalid reads" from KHTMLPart when switching around between articles.
Review request changed
Status: Closed (submitted)
Submitted with commit b72fc5e56579035bf987075e16324ef95ef8e3d4 by Alex Merry to branch master.