QSortFilterProxyModel: remove duplicate implementations
Since these functions perform the same operation as the base class QAbstractProxyModel, we can use the counterparts of the basic class directly to keep the implementation clean. Change-Id: Ie16a988f5ad25eb202351713e6aee73df266209b Reviewed-by: David Faure <david.faure@kdab.com>
This commit is contained in:
parent
79ef045ffd
commit
0ec1024ff8
@ -2435,11 +2435,7 @@ bool QSortFilterProxyModel::removeColumns(int column, int count, const QModelInd
|
|||||||
*/
|
*/
|
||||||
void QSortFilterProxyModel::fetchMore(const QModelIndex &parent)
|
void QSortFilterProxyModel::fetchMore(const QModelIndex &parent)
|
||||||
{
|
{
|
||||||
Q_D(QSortFilterProxyModel);
|
QAbstractProxyModel::fetchMore(parent);
|
||||||
QModelIndex source_parent;
|
|
||||||
if (d->indexValid(parent))
|
|
||||||
source_parent = mapToSource(parent);
|
|
||||||
d->model->fetchMore(source_parent);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -2447,11 +2443,7 @@ void QSortFilterProxyModel::fetchMore(const QModelIndex &parent)
|
|||||||
*/
|
*/
|
||||||
bool QSortFilterProxyModel::canFetchMore(const QModelIndex &parent) const
|
bool QSortFilterProxyModel::canFetchMore(const QModelIndex &parent) const
|
||||||
{
|
{
|
||||||
Q_D(const QSortFilterProxyModel);
|
return QAbstractProxyModel::canFetchMore(parent);
|
||||||
QModelIndex source_parent;
|
|
||||||
if (d->indexValid(parent))
|
|
||||||
source_parent = mapToSource(parent);
|
|
||||||
return d->model->canFetchMore(source_parent);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -2459,11 +2451,7 @@ bool QSortFilterProxyModel::canFetchMore(const QModelIndex &parent) const
|
|||||||
*/
|
*/
|
||||||
Qt::ItemFlags QSortFilterProxyModel::flags(const QModelIndex &index) const
|
Qt::ItemFlags QSortFilterProxyModel::flags(const QModelIndex &index) const
|
||||||
{
|
{
|
||||||
Q_D(const QSortFilterProxyModel);
|
return QAbstractProxyModel::flags(index);
|
||||||
QModelIndex source_index;
|
|
||||||
if (d->indexValid(index))
|
|
||||||
source_index = mapToSource(index);
|
|
||||||
return d->model->flags(source_index);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
Loading…
x
Reference in New Issue
Block a user