|author||Andreas Aardal Hanssen <email@example.com>||2013-02-15 18:04:07 +0100|
|committer||The Qt Project <firstname.lastname@example.org>||2013-02-18 11:07:23 +0100|
Remove QGraphicsProxyWidget crash in QWidget::hasFocus().
A QGraphicsProxyWidget embeds a focusable widget (e.g., QComboBox). When deleting QGraphicsProxyWidget, the QWidget will be deleted. The QWidget clears focus, and QWidget::hasFocus() is nice enough to check if its embedder QGraphicsProxyWidget has focus - because if it does, it wants to clear focus from that item too. QGraphicsItem's destructor already calls clearFocus() however, so this call is unnecessary; we can simply stop clearing the QWidget's focus in its destructor if the widget is embedded. QWidget::hasFocus checks QGraphicsItem::hasFocus (on the proxy widget that is being deleted), which checks its d_ptr, which is gone. It's generally unfavorable for an object deleting a child to have the child go back and poke at the parent object, which is in many ways what's happening here. Task-number: QTBUG-29684 Change-Id: I1e52bf28f47b2824752de28dff2d0de13733ee48 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Diffstat (limited to 'configure')
0 files changed, 0 insertions, 0 deletions