Skip to content

Commit

Permalink
Avoid use of old-style connect
Browse files Browse the repository at this point in the history
(cherry picked from commit 285ce72)
(cherry picked from commit fcbedd3)
  • Loading branch information
nyalldawson committed Jun 19, 2020
1 parent 3302b92 commit 15e8cf5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/gui/attributetable/qgsattributetableview.cpp
Expand Up @@ -358,7 +358,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 @@ -370,7 +370,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 15e8cf5

Please sign in to comment.