@@ -63,11 +63,11 @@ QgsAttributeTableView::QgsAttributeTableView( QWidget *parent )
63
63
64
64
verticalHeader ()->viewport ()->installEventFilter ( this );
65
65
66
- connect ( verticalHeader (), SIGNAL ( sectionPressed ( int ) ), this , SLOT ( selectRow ( int ) ) );
67
- connect ( verticalHeader (), SIGNAL ( sectionEntered ( int ) ) , this , SLOT ( _q_selectRow ( int ) ) );
68
- connect ( horizontalHeader (), SIGNAL ( sectionResized ( int , int , int ) ), this , SLOT ( columnSizeChanged ( int , int , int ) ) );
69
- connect ( horizontalHeader (), SIGNAL ( sortIndicatorChanged ( int , Qt::SortOrder ) ) , this , SLOT ( showHorizontalSortIndicator () ) );
70
- connect ( QgsMapLayerActionRegistry::instance (), SIGNAL ( changed () ) , this , SLOT ( recreateActionWidgets () ) );
66
+ connect ( verticalHeader (), &QHeaderView:: sectionPressed, this , [ = ] ( int row ) { selectRow ( row, false ); } );
67
+ connect ( verticalHeader (), &QHeaderView:: sectionEntered, this , &QgsAttributeTableView:: _q_selectRow );
68
+ connect ( horizontalHeader (), &QHeaderView:: sectionResized, this , &QgsAttributeTableView:: columnSizeChanged );
69
+ connect ( horizontalHeader (), &QHeaderView::sortIndicatorChanged , this , &QgsAttributeTableView:: showHorizontalSortIndicator );
70
+ connect ( QgsMapLayerActionRegistry::instance (), &QgsMapLayerActionRegistry:: changed, this , &QgsAttributeTableView:: recreateActionWidgets );
71
71
}
72
72
73
73
bool QgsAttributeTableView::eventFilter ( QObject *object, QEvent *event )
@@ -118,8 +118,8 @@ void QgsAttributeTableView::setModel( QgsAttributeTableFilterModel *filterModel
118
118
119
119
if ( mFilterModel )
120
120
{
121
- connect ( mFilterModel , SIGNAL ( destroyed () ) , this , SLOT ( modelDeleted () ) );
122
- connect ( mTableDelegate , SIGNAL ( actionColumnItemPainted ( QModelIndex ) ) , this , SLOT ( onActionColumnItemPainted ( QModelIndex ) ) );
121
+ connect ( mFilterModel , &QObject:: destroyed, this , &QgsAttributeTableView:: modelDeleted );
122
+ connect ( mTableDelegate , &QgsAttributeTableDelegate:: actionColumnItemPainted, this , &QgsAttributeTableView:: onActionColumnItemPainted );
123
123
}
124
124
125
125
delete mFeatureSelectionModel ;
@@ -135,8 +135,10 @@ void QgsAttributeTableView::setModel( QgsAttributeTableFilterModel *filterModel
135
135
mFeatureSelectionModel = new QgsFeatureSelectionModel ( mFilterModel , mFilterModel , mFeatureSelectionManager , mFilterModel );
136
136
setSelectionModel ( mFeatureSelectionModel );
137
137
mTableDelegate ->setFeatureSelectionModel ( mFeatureSelectionModel );
138
- connect ( mFeatureSelectionModel , SIGNAL ( requestRepaint ( QModelIndexList ) ), this , SLOT ( repaintRequested ( QModelIndexList ) ) );
139
- connect ( mFeatureSelectionModel , SIGNAL ( requestRepaint () ), this , SLOT ( repaintRequested () ) );
138
+ connect ( mFeatureSelectionModel , static_cast <void ( QgsFeatureSelectionModel::* )( const QModelIndexList &indexes )>( &QgsFeatureSelectionModel::requestRepaint ),
139
+ this , static_cast <void ( QgsAttributeTableView::* )( const QModelIndexList &indexes )>( &QgsAttributeTableView::repaintRequested ) );
140
+ connect ( mFeatureSelectionModel , static_cast <void ( QgsFeatureSelectionModel::* )()>( &QgsFeatureSelectionModel::requestRepaint ),
141
+ this , static_cast <void ( QgsAttributeTableView::* )()>( &QgsAttributeTableView::repaintRequested ) );
140
142
}
141
143
}
142
144
@@ -185,7 +187,7 @@ QWidget *QgsAttributeTableView::createActionWidget( QgsFeatureId fid )
185
187
act->setData ( " user_action" );
186
188
act->setProperty ( " fid" , fid );
187
189
act->setProperty ( " action_id" , action.id () );
188
- connect ( act, SIGNAL ( triggered ( bool ) ) , this , SLOT ( actionTriggered () ) );
190
+ connect ( act, &QAction:: triggered, this , &QgsAttributeTableView:: actionTriggered );
189
191
actionList << act;
190
192
191
193
if ( mFilterModel ->layer ()->actions ()->defaultAction ( QStringLiteral ( " AttributeTableRow" ) ).id () == action.id () )
@@ -202,7 +204,7 @@ QWidget *QgsAttributeTableView::createActionWidget( QgsFeatureId fid )
202
204
action->setToolTip ( mapLayerAction->text () );
203
205
action->setProperty ( " fid" , fid );
204
206
action->setProperty ( " action" , qVariantFromValue ( qobject_cast<QObject *>( mapLayerAction ) ) );
205
- connect ( action, SIGNAL ( triggered () ) , this , SLOT ( actionTriggered () ) );
207
+ connect ( action, &QAction:: triggered, this , &QgsAttributeTableView:: actionTriggered );
206
208
actionList << action;
207
209
208
210
if ( !defaultAction &&
0 commit comments