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
Marc Mutz 2016-07-21 21:51:12 +03:00
parent 7bf002c3b3
commit 0e40781c16
2 changed files with 6 additions and 3 deletions

View File

@ -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

View File

@ -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);