Skip to content
Permalink
Browse files

Qt 5.5 compatibility

  • Loading branch information
m-kuhn committed Nov 20, 2017
1 parent fdd0087 commit 3d2b69ebfa8ab95ba087f8c6aef0654a32fb202d
Showing with 9 additions and 1 deletion.
  1. +9 −1 src/gui/qgsaggregatetoolbutton.cpp
@@ -43,9 +43,16 @@ void QgsAggregateToolButton::aboutToShowMenu()
{
mMenu->clear();

QAction *action = mMenu->addAction( tr( "Exclude" ) );
connect( action, &QAction::triggered, [ this ]
{
setActive( false );
} );

for ( const auto &aggregate : qgis::as_const( mAvailableAggregates ) )
{
mMenu->addAction( aggregate.name, this, [ this, aggregate ]
QAction *action = mMenu->addAction( aggregate.name );
connect( action, &QAction::triggered, [ this, aggregate ]
{
setText( aggregate.name );
setAggregate( aggregate.function );
@@ -95,6 +102,7 @@ void QgsAggregateToolButton::setAggregate( const QString &aggregate )
if ( agg.function == aggregate )
{
mAggregate = aggregate;
setText( agg.name );
break;
}
}

0 comments on commit 3d2b69e

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