-
Bug
-
Resolution: Fixed
-
P3: Somewhat important
-
5.12.0 RC2, 6.8.0
-
None
-
c8b7db36a (dev), 0ae648250 (6.10)
The recently (5.10) added QAbstractItemView::isPersistentEditorOpen() is not checking the persistent editor list and it is returning true even if the index has a regular (non persistent) editor.
I'm attaching a simple test case but it should be obvious by looking at the source code:
(from http://code.qt.io/cgit/qt/qtbase.git/tree/src/widgets/itemviews/qabstractitemview.cpp)
bool QAbstractItemView::isPersistentEditorOpen(const QModelIndex &index) const { Q_D(const QAbstractItemView); return d->editorForIndex(index).widget; }
I'd expect the method to do something similar to this instead:
bool QAbstractItemView::isPersistentEditorOpen(const QModelIndex &index) const { Q_D(const QAbstractItemView); return d->persistent.contains(d->editorForIndex(index).widget); }
PS: the issue appears to affect Qt 6 as well.