qt5base-lts/tests/auto/widgets/graphicsview
Andreas Aardal Hanssen ed15e4eb07 Fix focusproxy-relayed crash in QGraphicsItem destructor.
Makes tst_qgraphicsitem::tst_focusProxyDeletion not crash.

valgrind reported the error when running tst_qgraphicsitem. The crash
was very real; when deleting an item that has another item as a focus
proxy, the proxy still had a reference to the deleted item's focusProxy
pointer. I'm not a huge fan of whitebox testing but thought this crash
justifies a modification of the test to make it fail, instead of just
passing silently with a warning only given by valgrind and friends.

FTR the reason the test doesn't crash hard is that the memory is freed
but not reused within the scope of the test. So the access to the
pointer d_ptr->focusProxy succeeds, it just accesses memory that might
as well have been reclaimed. But this is quite undefined...

Task-number: QTBUG-28321
Change-Id: I2624631f5e5c2a8aa8bd4efe1fc128eba6c61f56
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2012-12-17 11:57:02 +01:00
..
qgraphicsanchorlayout GV auto tests: kill QWindowsStyle dependencies 2012-11-27 23:10:09 +01:00
qgraphicsanchorlayout1 Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
qgraphicseffectsource Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
qgraphicsgridlayout Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
qgraphicsitem Fix focusproxy-relayed crash in QGraphicsItem destructor. 2012-12-17 11:57:02 +01:00
qgraphicsitemanimation Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
qgraphicslayout Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
qgraphicslayoutitem Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
qgraphicslinearlayout GV auto tests: kill QWindowsStyle dependencies 2012-11-27 23:10:09 +01:00
qgraphicsobject Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
qgraphicspixmapitem Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
qgraphicspolygonitem Make QPen default to 1-width non-cosmetic. 2012-10-22 19:36:43 +02:00
qgraphicsproxywidget GV auto tests: kill QWindowsStyle dependencies 2012-11-27 23:10:09 +01:00
qgraphicsscene GV auto tests: kill QWindowsStyle dependencies 2012-11-27 23:10:09 +01:00
qgraphicssceneindex Make QPen default to 1-width non-cosmetic. 2012-10-22 19:36:43 +02:00
qgraphicstransform Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
qgraphicsview GV auto tests: kill QWindowsStyle dependencies 2012-11-27 23:10:09 +01:00
qgraphicswidget Made QFusionStyle internal 2012-11-21 11:03:48 +01:00
graphicsview.pro Moved tests into integrationtests/ and widgets/ 2011-10-20 19:45:41 +02:00