Reimplement QIdentityProxyModel::headerData().
The one in the base class is slower due to parent<->source mappings. Change-Id: Ib0b337ef5d4b5b8cd9f6e1d7c5c19a770b53e0e8 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
This commit is contained in:
parent
8eab9cbce2
commit
2614e16c41
@ -316,6 +316,15 @@ int QIdentityProxyModel::rowCount(const QModelIndex& parent) const
|
||||
return d->model->rowCount(mapToSource(parent));
|
||||
}
|
||||
|
||||
/*!
|
||||
\reimp
|
||||
*/
|
||||
QVariant QIdentityProxyModel::headerData(int section, Qt::Orientation orientation, int role) const
|
||||
{
|
||||
Q_D(const QIdentityProxyModel);
|
||||
return d->model->headerData(section, orientation, role);
|
||||
}
|
||||
|
||||
/*!
|
||||
\reimp
|
||||
*/
|
||||
|
@ -67,6 +67,7 @@ public:
|
||||
QModelIndex mapToSource(const QModelIndex& proxyIndex) const;
|
||||
QModelIndex parent(const QModelIndex& child) const;
|
||||
int rowCount(const QModelIndex& parent = QModelIndex()) const;
|
||||
QVariant headerData(int section, Qt::Orientation orientation, int role) const;
|
||||
bool dropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent);
|
||||
|
||||
QItemSelection mapSelectionFromSource(const QItemSelection& selection) const;
|
||||
|
Loading…
Reference in New Issue
Block a user