diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2022-08-23 13:20:34 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-08-25 16:04:30 +0000 |
commit | 6dd2dbaef60f9b4ba6fc6faf294c91dabb9604f1 (patch) | |
tree | b168f8754e81d3ea39b29e786449af1916cb03df /LICENSES | |
parent | a20d257015ba94ae759dbb5bf7d5f3933a1a259c (diff) |
QAbstractItemDelegate: tolerate that editor gets reparentedv6.4.0-beta4
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
Change-Id: I04a355673823c4941865f7a575864e991ceeb5f0
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
(cherry picked from commit 52f4d0b0d2a29a08e55293664bf1c8002cad0d17)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'LICENSES')
0 files changed, 0 insertions, 0 deletions