diff options
Diffstat (limited to 'src/widgets/itemviews/qabstractitemview.cpp')
-rw-r--r-- | src/widgets/itemviews/qabstractitemview.cpp | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/src/widgets/itemviews/qabstractitemview.cpp b/src/widgets/itemviews/qabstractitemview.cpp index 396016c44d..78189c13c3 100644 --- a/src/widgets/itemviews/qabstractitemview.cpp +++ b/src/widgets/itemviews/qabstractitemview.cpp @@ -2255,7 +2255,7 @@ void QAbstractItemView::focusInEvent(QFocusEvent *event) /*! This function is called with the given \a event when the widget - looses the focus. By default, the event is ignored. + loses the focus. By default, the event is ignored. \sa clearFocus(), focusInEvent() */ @@ -3135,7 +3135,7 @@ int QAbstractItemView::sizeHintForColumn(int column) const Opens a persistent editor on the item at the given \a index. If no editor exists, the delegate will create a new editor. - \sa closePersistentEditor() + \sa closePersistentEditor(), isPersistentEditorOpen() */ void QAbstractItemView::openPersistentEditor(const QModelIndex &index) { @@ -3154,7 +3154,7 @@ void QAbstractItemView::openPersistentEditor(const QModelIndex &index) /*! Closes the persistent editor for the item at the given \a index. - \sa openPersistentEditor() + \sa openPersistentEditor(), isPersistentEditorOpen() */ void QAbstractItemView::closePersistentEditor(const QModelIndex &index) { @@ -3169,6 +3169,19 @@ void QAbstractItemView::closePersistentEditor(const QModelIndex &index) } /*! + \since 5.10 + + Returns whether a persistent editor is open for the item at index \a index. + + \sa openPersistentEditor(), closePersistentEditor() +*/ +bool QAbstractItemView::isPersistentEditorOpen(const QModelIndex &index) const +{ + Q_D(const QAbstractItemView); + return d->editorForIndex(index).widget; +} + +/*! \since 4.1 Sets the given \a widget on the item at the given \a index, passing the @@ -4417,8 +4430,7 @@ QItemViewPaintPairs QAbstractItemViewPrivate::draggablePaintPairs(const QModelIn for (const auto &index : indexes) { const QRect current = q->visualRect(index); if (current.intersects(viewportRect)) { - QItemViewPaintPair p = { current, index }; - ret += p; + ret.append({current, index}); rect |= current; } } |