summaryrefslogtreecommitdiffstats
path: root/src/tools
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2022-08-23 13:20:34 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2022-08-25 18:04:19 +0200
commit52f4d0b0d2a29a08e55293664bf1c8002cad0d17 (patch)
treeacef4b30366be0222aa50102aabe3241d24db80b /src/tools
parentb134300bc4890063fda8d762afc54a26eda2c7e1 (diff)
QAbstractItemDelegate: tolerate that editor gets reparented
An item delegate might override destroyEditor to merely reparent the existing editor out of the item view for later reuse, rather than actually destroying the editor. As of d0dffdfc012574da4a75241097b667d09bb39ba2, the code calling closeEditor() - which calls destroyEditor - might explicitly set focus back to the item view parent of the editor. This needs to handle that the parent of the editor might no longer be valid after the closeEditor call returns, and rather store the old parent widget explicitly. Add a test case that segfaults with nullptr access without the fix. Fixes: QTBUG-105231 Pick-to: 6.4 6.3 6.2 Change-Id: I04a355673823c4941865f7a575864e991ceeb5f0 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'src/tools')
0 files changed, 0 insertions, 0 deletions