From 0e40781c1637f575acc842044b67da412c8e2026 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Thu, 21 Jul 2016 21:51:12 +0300 Subject: [PATCH] QAbstractItemViewPrivate: de-inline hasEditor() This is in preparation of fixing a design problem with indexEditorHash. Change-Id: I6045ad3f15cd3087a894b96e9e068e42af7a1dea Reviewed-by: hjk --- src/widgets/itemviews/qabstractitemview.cpp | 5 +++++ src/widgets/itemviews/qabstractitemview_p.h | 4 +--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/widgets/itemviews/qabstractitemview.cpp b/src/widgets/itemviews/qabstractitemview.cpp index 057718cdba..f31f2f5256 100644 --- a/src/widgets/itemviews/qabstractitemview.cpp +++ b/src/widgets/itemviews/qabstractitemview.cpp @@ -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 diff --git a/src/widgets/itemviews/qabstractitemview_p.h b/src/widgets/itemviews/qabstractitemview_p.h index bb88b25652..8b0b08fd94 100644 --- a/src/widgets/itemviews/qabstractitemview_p.h +++ b/src/widgets/itemviews/qabstractitemview_p.h @@ -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);