Skip to content

Commit

Permalink
Qt 5.5 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Nov 20, 2017
1 parent fdd0087 commit 3d2b69e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/gui/qgsaggregatetoolbutton.cpp
Expand Up @@ -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 );
Expand Down Expand Up @@ -95,6 +102,7 @@ void QgsAggregateToolButton::setAggregate( const QString &aggregate )
if ( agg.function == aggregate )
{
mAggregate = aggregate;
setText( agg.name );
break;
}
}
Expand Down

0 comments on commit 3d2b69e

Please sign in to comment.