Skip to content
Permalink
Browse files

Avoid use of old-style connect

(cherry picked from commit 285ce72)
(cherry picked from commit fcbedd3)
  • Loading branch information
nyalldawson committed Jun 19, 2020
1 parent 3302b92 commit 15e8cf5f79e6136f549a7d2b8352faaff814bbcd
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/gui/attributetable/qgsattributetableview.cpp
@@ -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;
@@ -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 );

0 comments on commit 15e8cf5

Please sign in to comment.
You can’t perform that action at this time.