diff options
author | Marc Mutz <[email protected]> | 2025-04-01 07:59:51 +0200 |
---|---|---|
committer | Volker Hilsheimer <[email protected]> | 2025-04-02 14:38:21 +0000 |
commit | e5f11eebc89ec041995cbbbc9b3db9eb3c6968c2 (patch) | |
tree | 5e730ee75301a450e663877294eecfcad2ff5d11 | |
parent | e55479ea4a2dca266b73a2a17ff77ec44e1c2135 (diff) |
QAbstractItemView: disconnect from the correct delegate
Purely from a symmetry argument, we should be disconnecting the old
item delegate, not the new one.
I didn't find a case where this actually causes test failures, nor did
I take the time to implement a test where it does.
Amends a126d3627cc347500c1a6bd82027efa6d451ccbd. That patch landed in
Qt 6.7, but that branch is "closed" at this point in time, so not
picking there now.
Pick-to: 6.9 6.8
Change-Id: I06b704e699616d61c65ad676ffe45dfbd9f8a870
Reviewed-by: Volker Hilsheimer <[email protected]>
-rw-r--r-- | src/widgets/itemviews/qabstractitemview.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/itemviews/qabstractitemview.cpp b/src/widgets/itemviews/qabstractitemview.cpp index 090ac232a6e..e84ea0a8b7b 100644 --- a/src/widgets/itemviews/qabstractitemview.cpp +++ b/src/widgets/itemviews/qabstractitemview.cpp @@ -861,7 +861,7 @@ void QAbstractItemView::setItemDelegate(QAbstractItemDelegate *delegate) if (d->itemDelegate) { if (d->delegateRefCount(d->itemDelegate) == 1) - d->disconnectDelegate(delegate); + d->disconnectDelegate(d->itemDelegate); } if (delegate) { |