Skip to content
Permalink
Browse files

Remove unimplemented setData method from QgsReportSectionModel

(cherry-picked from cd39885)
  • Loading branch information
nyalldawson committed Apr 6, 2018
1 parent 45d30a6 commit be2e2f329386e014a68ab1b1115c5b190e1d5e22
Showing with 0 additions and 26 deletions.
  1. +0 −25 src/app/layout/qgsreportsectionmodel.cpp
  2. +0 −1 src/app/layout/qgsreportsectionmodel.h
@@ -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() )
@@ -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 );

0 comments on commit be2e2f3

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