Skip to content
Permalink
Browse files

Deprecate unrequired methods

  • Loading branch information
m-kuhn committed May 15, 2018
1 parent b0ccafe commit 2325fe5a397ccd24869eb089d5b4ec50f4808497
@@ -133,10 +133,34 @@ Sort this model by its display expression.
%End

public slots:
void onBeginRemoveRows( const QModelIndex &parent, int first, int last );
void onEndRemoveRows( const QModelIndex &parent, int first, int last );
void onBeginInsertRows( const QModelIndex &parent, int first, int last );
void onEndInsertRows( const QModelIndex &parent, int first, int last );

void onBeginRemoveRows( const QModelIndex &parent, int first, int last );
%Docstring
Does nothing except for calling beginRemoveRows()

\deprecated
%End

void onEndRemoveRows( const QModelIndex &parent, int first, int last );
%Docstring
Does nothing except for calling endRemoveRows()

\deprecated
%End

void onBeginInsertRows( const QModelIndex &parent, int first, int last );
%Docstring
Does nothing except for calling beginInsertRows()

\deprecated
%End

void onEndInsertRows( const QModelIndex &parent, int first, int last );
%Docstring
Does nothing except for calling endInsertRows()

\deprecated
%End

};

@@ -34,21 +34,6 @@ void QgsFeatureListModel::setSourceModel( QgsAttributeTableFilterModel *sourceMo
mExpressionContext = sourceModel->layer()->createExpressionContext();
mFilterModel = sourceModel;

if ( mFilterModel )
{
#if 0
// rewire (filter-)change events in the source model so this proxy reflects the changes
connect( mFilterModel, &QAbstractItemModel::rowsAboutToBeRemoved, this, &QgsFeatureListModel::onBeginRemoveRows );
connect( mFilterModel, &QAbstractItemModel::rowsRemoved, this, &QgsFeatureListModel::onEndRemoveRows );
connect( mFilterModel, &QAbstractItemModel::rowsAboutToBeInserted, this, &QgsFeatureListModel::onBeginInsertRows );
connect( mFilterModel, &QAbstractItemModel::rowsInserted, this, &QgsFeatureListModel::onEndInsertRows );
// propagate sort order changes from source model to views connected to this model
connect( mFilterModel, &QAbstractItemModel::layoutAboutToBeChanged, this, &QAbstractItemModel::layoutAboutToBeChanged );
connect( mFilterModel, &QAbstractItemModel::layoutChanged, this, &QAbstractItemModel::layoutChanged );
connect( mFilterModel, &QAbstractItemModel::modelAboutToBeReset, this, &QAbstractItemModel::modelAboutToBeReset );
connect( mFilterModel, &QAbstractItemModel::modelReset, this, &QAbstractItemModel::modelReset );
#endif
}
}

QgsVectorLayerCache *QgsFeatureListModel::layerCache()
@@ -139,10 +139,34 @@ class GUI_EXPORT QgsFeatureListModel : public QSortFilterProxyModel, public QgsF
void setSortByDisplayExpression( bool sortByDisplayExpression );

public slots:
void onBeginRemoveRows( const QModelIndex &parent, int first, int last );
void onEndRemoveRows( const QModelIndex &parent, int first, int last );
void onBeginInsertRows( const QModelIndex &parent, int first, int last );
void onEndInsertRows( const QModelIndex &parent, int first, int last );

/**
* Does nothing except for calling beginRemoveRows()
*
* \deprecated
*/
Q_DECL_DEPRECATED void onBeginRemoveRows( const QModelIndex &parent, int first, int last );

/**
* Does nothing except for calling endRemoveRows()
*
* \deprecated
*/
Q_DECL_DEPRECATED void onEndRemoveRows( const QModelIndex &parent, int first, int last );

/**
* Does nothing except for calling beginInsertRows()
*
* \deprecated
*/
Q_DECL_DEPRECATED void onBeginInsertRows( const QModelIndex &parent, int first, int last );

/**
* Does nothing except for calling endInsertRows()
*
* \deprecated
*/
Q_DECL_DEPRECATED void onEndInsertRows( const QModelIndex &parent, int first, int last );

private:
mutable QgsExpression mDisplayExpression;

0 comments on commit 2325fe5

Please sign in to comment.
You can’t perform that action at this time.