Skip to content

Commit

Permalink
Remove unimplemented setData method from QgsReportSectionModel
Browse files Browse the repository at this point in the history
(cherry-picked from cd39885)
  • Loading branch information
nyalldawson committed Apr 6, 2018
1 parent 45d30a6 commit be2e2f3
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 26 deletions.
25 changes: 0 additions & 25 deletions src/app/layout/qgsreportsectionmodel.cpp
Expand Up @@ -180,31 +180,6 @@ QModelIndex QgsReportSectionModel::parent( const QModelIndex &index ) const
return createIndex( parentSection->row(), 0, parentSection != mReport ? parentSection : nullptr );
}

bool QgsReportSectionModel::setData( const QModelIndex &index, const QVariant &value, int role )
{
if ( !index.isValid() )
return false;

QgsAbstractReportSection *section = sectionForIndex( index );
( void )section;
( void )value;

if ( role != Qt::EditRole )
return false;

switch ( index.column() )
{
case 0:
return false;

default:
return false;
}

emit dataChanged( index, index );
return true;
}

QgsAbstractReportSection *QgsReportSectionModel::sectionForIndex( const QModelIndex &index ) const
{
if ( !index.isValid() )
Expand Down
1 change: 0 additions & 1 deletion src/app/layout/qgsreportsectionmodel.h
Expand Up @@ -47,7 +47,6 @@ class QgsReportSectionModel : public QAbstractItemModel

QModelIndex index( int row, int column, const QModelIndex &parent = QModelIndex() ) const override;
QModelIndex parent( const QModelIndex &index ) const override;
bool setData( const QModelIndex &index, const QVariant &value, int role = Qt::EditRole ) override;
bool removeRows( int row, int count, const QModelIndex &parent = QModelIndex() ) override;

void addSection( const QModelIndex &parent, std::unique_ptr< QgsAbstractReportSection > section );
Expand Down

0 comments on commit be2e2f3

Please sign in to comment.