Remove unimplemented setData method from QgsReportSectionModel

This commit is contained in:
Nyall Dawson 2018-04-02 08:33:39 +10:00
parent 20c5e5415d
commit cd39885cd8
2 changed files with 0 additions and 26 deletions

View File

@ -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() )

View File

@ -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 );