mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-27 00:33:48 -05:00
Remove unimplemented setData method from QgsReportSectionModel
This commit is contained in:
parent
20c5e5415d
commit
cd39885cd8
@ -180,31 +180,6 @@ QModelIndex QgsReportSectionModel::parent( const QModelIndex &index ) const
|
|||||||
return createIndex( parentSection->row(), 0, parentSection != mReport ? parentSection : nullptr );
|
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
|
QgsAbstractReportSection *QgsReportSectionModel::sectionForIndex( const QModelIndex &index ) const
|
||||||
{
|
{
|
||||||
if ( !index.isValid() )
|
if ( !index.isValid() )
|
||||||
|
@ -47,7 +47,6 @@ class QgsReportSectionModel : public QAbstractItemModel
|
|||||||
|
|
||||||
QModelIndex index( int row, int column, const QModelIndex &parent = QModelIndex() ) const override;
|
QModelIndex index( int row, int column, const QModelIndex &parent = QModelIndex() ) const override;
|
||||||
QModelIndex parent( const QModelIndex &index ) 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;
|
bool removeRows( int row, int count, const QModelIndex &parent = QModelIndex() ) override;
|
||||||
|
|
||||||
void addSection( const QModelIndex &parent, std::unique_ptr< QgsAbstractReportSection > section );
|
void addSection( const QModelIndex &parent, std::unique_ptr< QgsAbstractReportSection > section );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user