@@ -474,7 +474,11 @@ void QgsDualView::viewWillShowContextMenu( QMenu *menu, const QModelIndex &atInd
474
474
continue ;
475
475
476
476
QgsAttributeTableAction *a = new QgsAttributeTableAction ( action.name (), this , action.id (), sourceIndex );
477
+ #if QT_VERSION < QT_VERSION_CHECK(5, 6, 0)
478
+ menu->addAction ( action.name (), a, SLOT ( execute () ) );
479
+ #else
477
480
menu->addAction ( action.name (), a, &QgsAttributeTableAction::execute );
481
+ #endif
478
482
}
479
483
}
480
484
@@ -488,13 +492,21 @@ void QgsDualView::viewWillShowContextMenu( QMenu *menu, const QModelIndex &atInd
488
492
Q_FOREACH ( QgsMapLayerAction *action, registeredActions )
489
493
{
490
494
QgsAttributeTableMapLayerAction *a = new QgsAttributeTableMapLayerAction ( action->text (), this , action, sourceIndex );
495
+ #if QT_VERSION < QT_VERSION_CHECK(5, 6, 0)
496
+ menu->addAction ( action->text (), a, SLOT ( execut () ) );
497
+ #else
491
498
menu->addAction ( action->text (), a, &QgsAttributeTableMapLayerAction::execute );
499
+ #endif
492
500
}
493
501
}
494
502
495
503
menu->addSeparator ();
496
504
QgsAttributeTableAction *a = new QgsAttributeTableAction ( tr ( " Open form" ), this , QString (), sourceIndex );
505
+ #if QT_VERSION < QT_VERSION_CHECK(5, 6, 0)
506
+ menu->addAction ( tr ( " Open form" ), a, SLOT ( featureForm () ) );
507
+ #else
497
508
menu->addAction ( tr ( " Open form" ), a, &QgsAttributeTableAction::featureForm );
509
+ #endif
498
510
}
499
511
500
512
void QgsDualView::showViewHeaderMenu ( QPoint point )
0 commit comments