Skip to content

Commit

Permalink
Remove unimplemented setData method from QgsReportSectionModel
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Apr 3, 2018
1 parent 20c5e54 commit cd39885
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 cd39885

Please sign in to comment.