mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-01 00:46:20 -05:00
Pre-Qt 5.6 compatibility
This commit is contained in:
parent
a62b02699d
commit
f43df122ec
@ -474,7 +474,11 @@ void QgsDualView::viewWillShowContextMenu( QMenu *menu, const QModelIndex &atInd
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
QgsAttributeTableAction *a = new QgsAttributeTableAction( action.name(), this, action.id(), sourceIndex );
|
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 );
|
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 )
|
Q_FOREACH ( QgsMapLayerAction *action, registeredActions )
|
||||||
{
|
{
|
||||||
QgsAttributeTableMapLayerAction *a = new QgsAttributeTableMapLayerAction( action->text(), this, action, sourceIndex );
|
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 );
|
menu->addAction( action->text(), a, &QgsAttributeTableMapLayerAction::execute );
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
menu->addSeparator();
|
menu->addSeparator();
|
||||||
QgsAttributeTableAction *a = new QgsAttributeTableAction( tr( "Open form" ), this, QString(), sourceIndex );
|
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 );
|
menu->addAction( tr( "Open form" ), a, &QgsAttributeTableAction::featureForm );
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void QgsDualView::showViewHeaderMenu( QPoint point )
|
void QgsDualView::showViewHeaderMenu( QPoint point )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user