Skip to content
Permalink
Browse files

Pre-Qt 5.6 compatibility

  • Loading branch information
m-kuhn committed Jul 28, 2017
1 parent a62b026 commit f43df122ec2449a6131fa03e6f75c99bf60726aa
Showing with 12 additions and 0 deletions.
  1. +12 −0 src/gui/attributetable/qgsdualview.cpp
@@ -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 )

0 comments on commit f43df12

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