Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.12.0 RC2, 6.5.0 Beta1
-
None
Description
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.