Skip to content

Commit f43df12

Browse files
committedJul 28, 2017
Pre-Qt 5.6 compatibility
1 parent a62b026 commit f43df12

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
 

‎src/gui/attributetable/qgsdualview.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,11 @@ void QgsDualView::viewWillShowContextMenu( QMenu *menu, const QModelIndex &atInd
474474
continue;
475475

476476
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
477480
menu->addAction( action.name(), a, &QgsAttributeTableAction::execute );
481+
#endif
478482
}
479483
}
480484

@@ -488,13 +492,21 @@ void QgsDualView::viewWillShowContextMenu( QMenu *menu, const QModelIndex &atInd
488492
Q_FOREACH ( QgsMapLayerAction *action, registeredActions )
489493
{
490494
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
491498
menu->addAction( action->text(), a, &QgsAttributeTableMapLayerAction::execute );
499+
#endif
492500
}
493501
}
494502

495503
menu->addSeparator();
496504
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
497508
menu->addAction( tr( "Open form" ), a, &QgsAttributeTableAction::featureForm );
509+
#endif
498510
}
499511

500512
void QgsDualView::showViewHeaderMenu( QPoint point )

0 commit comments

Comments
 (0)
Please sign in to comment.