Modernize connections to actions

Use function references rather than SLOTs
This commit is contained in:
Matthias Kuhn 2017-07-20 14:14:12 +02:00
parent b7a4366c40
commit cd83c3c6d1
No known key found for this signature in database
GPG Key ID: A0E766808764D73F

View File

@ -489,13 +489,13 @@ void QgsDualView::viewWillShowContextMenu( QMenu *menu, const QModelIndex &atInd
for ( actionIt = registeredActions.begin(); actionIt != registeredActions.end(); ++actionIt )
{
QgsAttributeTableMapLayerAction *a = new QgsAttributeTableMapLayerAction( ( *actionIt )->text(), this, ( *actionIt ), sourceIndex );
menu->addAction( ( *actionIt )->text(), a, SLOT( execute() ) );
menu->addAction( ( *actionIt )->text(), a, &QgsAttributeTableMapLayerAction::execute );
}
}
menu->addSeparator();
QgsAttributeTableAction *a = new QgsAttributeTableAction( tr( "Open form" ), this, QString(), sourceIndex );
menu->addAction( tr( "Open form" ), a, SLOT( featureForm() ) );
menu->addAction( tr( "Open form" ), a, &QgsAttributeTableAction::featureForm );
}
void QgsDualView::showViewHeaderMenu( QPoint point )