Pre-Qt 5.6 compatibility

This commit is contained in:
Matthias Kuhn 2017-07-28 12:02:14 +02:00
parent a62b02699d
commit f43df122ec
No known key found for this signature in database
GPG Key ID: A0E766808764D73F

View File

@ -474,7 +474,11 @@ void QgsDualView::viewWillShowContextMenu( QMenu *menu, const QModelIndex &atInd
continue;
QgsAttributeTableAction *a = new QgsAttributeTableAction( action.name(), this, action.id(), sourceIndex );
#if QT_VERSION < QT_VERSION_CHECK(5, 6, 0)
menu->addAction( action.name(), a, SLOT( execute() ) );
#else
menu->addAction( action.name(), a, &QgsAttributeTableAction::execute );
#endif
}
}
@ -488,13 +492,21 @@ void QgsDualView::viewWillShowContextMenu( QMenu *menu, const QModelIndex &atInd
Q_FOREACH ( QgsMapLayerAction *action, registeredActions )
{
QgsAttributeTableMapLayerAction *a = new QgsAttributeTableMapLayerAction( action->text(), this, action, sourceIndex );
#if QT_VERSION < QT_VERSION_CHECK(5, 6, 0)
menu->addAction( action->text(), a, SLOT( execut() ) );
#else
menu->addAction( action->text(), a, &QgsAttributeTableMapLayerAction::execute );
#endif
}
}
menu->addSeparator();
QgsAttributeTableAction *a = new QgsAttributeTableAction( tr( "Open form" ), this, QString(), sourceIndex );
#if QT_VERSION < QT_VERSION_CHECK(5, 6, 0)
menu->addAction( tr( "Open form" ), a, SLOT( featureForm() ) );
#else
menu->addAction( tr( "Open form" ), a, &QgsAttributeTableAction::featureForm );
#endif
}
void QgsDualView::showViewHeaderMenu( QPoint point )