Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Avoid use of old-style connect
  • Loading branch information
nyalldawson committed Jun 2, 2020
1 parent 2376263 commit e1be000
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/gui/attributetable/qgsattributetableview.cpp
Expand Up @@ -359,7 +359,7 @@ void QgsAttributeTableView::contextMenuEvent( QContextMenuEvent *event )
delete mActionPopup;
mActionPopup = nullptr;

QModelIndex idx = mFilterModel->mapToMaster( indexAt( event->pos() ) );
const QModelIndex idx = mFilterModel->mapToMaster( indexAt( event->pos() ) );
if ( !idx.isValid() )
{
return;
Expand All @@ -371,7 +371,9 @@ void QgsAttributeTableView::contextMenuEvent( QContextMenuEvent *event )

mActionPopup = new QMenu( this );

mActionPopup->addAction( tr( "Select All" ), this, SLOT( selectAll() ), QKeySequence::SelectAll );
QAction *selectAllAction = mActionPopup->addAction( tr( "Select All" ) );
selectAllAction->setShortcut( QKeySequence::SelectAll );
connect( selectAllAction, &QAction::triggered, this, &QgsAttributeTableView::selectAll );

// let some other parts of the application add some actions
emit willShowContextMenu( mActionPopup, idx );
Expand Down

0 comments on commit e1be000

Please sign in to comment.