Skip to content
Permalink
Browse files

Avoid use of old-style connect

  • Loading branch information
nyalldawson committed Jun 2, 2020
1 parent 2376263 commit e1be000c0c8264946b35e057a8c101cc2e7e99c2
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/gui/attributetable/qgsattributetableview.cpp
@@ -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;
@@ -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 );

0 comments on commit e1be000

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