diff options
| author | Marc Mutz <marc.mutz@qt.io> | 2025-03-26 16:16:25 +0100 |
|---|---|---|
| committer | Marc Mutz <marc.mutz@qt.io> | 2025-03-28 02:50:58 +0100 |
| commit | a8c55cb54767bd3519c91872b0d9992dcb9b13fd (patch) | |
| tree | 14fef12cc93b6bcd6c9916c91fd1c71c04b86e23 /src/corelib/tools/qbitarray.cpp | |
| parent | 78e785122b023a02347c093b0fc1ea0d8fa94eaa (diff) | |
tst_QTreeView: fix memleak in expandAfterTake()
QStandardItems that were taken out of their QStandardItemModel need to
be deleted by the caller, which this test function forgot to do.
Store the item in a unique_ptr, so it isn't deleted until after the
next populateModel() call. Deleting immediately may change what the
test function checks for.
Amends 6012285e7dedb4364e2db087b7d5cbfc2973320a.
Pick-to: 6.9 6.8 6.5
Change-Id: I45a0a2f598febc75fd9ef683525c973476dcd7e0
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Diffstat (limited to 'src/corelib/tools/qbitarray.cpp')
0 files changed, 0 insertions, 0 deletions
