QAbstractItemViewPrivate: de-inline hasEditor()
This is in preparation of fixing a design problem with indexEditorHash. Change-Id: I6045ad3f15cd3087a894b96e9e068e42af7a1dea Reviewed-by: hjk <hjk@qt.io>bb10
parent
7bf002c3b3
commit
0e40781c16
|
|
@ -4275,6 +4275,11 @@ const QEditorInfo & QAbstractItemViewPrivate::editorForIndex(const QModelIndex &
|
|||
return it.value();
|
||||
}
|
||||
|
||||
bool QAbstractItemViewPrivate::hasEditor(const QModelIndex &index) const
|
||||
{
|
||||
return indexEditorHash.find(index) != indexEditorHash.constEnd();
|
||||
}
|
||||
|
||||
QModelIndex QAbstractItemViewPrivate::indexForEditor(QWidget *editor) const
|
||||
{
|
||||
// do not try to search to avoid slow implicit cast from QModelIndex to QPersistentModelIndex
|
||||
|
|
|
|||
|
|
@ -264,9 +264,7 @@ public:
|
|||
}
|
||||
|
||||
const QEditorInfo &editorForIndex(const QModelIndex &index) const;
|
||||
inline bool hasEditor(const QModelIndex &index) const {
|
||||
return indexEditorHash.find(index) != indexEditorHash.constEnd();
|
||||
}
|
||||
bool hasEditor(const QModelIndex &index) const;
|
||||
|
||||
QModelIndex indexForEditor(QWidget *editor) const;
|
||||
void addEditor(const QModelIndex &index, QWidget *editor, bool isStatic);
|
||||
|
|
|
|||
Loading…
Reference in New Issue