File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -360,7 +360,7 @@ void TestQgsLegendRenderer::testFilterByPolygon()
360
360
mapSettings.setOutputSize ( QSize ( 400 , 100 ) );
361
361
mapSettings.setOutputDpi ( 96 );
362
362
QStringList ll;
363
- foreach ( auto l, QgsMapLayerRegistry::instance ()->mapLayers () )
363
+ foreach ( QgsMapLayer * l, QgsMapLayerRegistry::instance ()->mapLayers () )
364
364
{
365
365
ll << l->id ();
366
366
}
@@ -395,15 +395,15 @@ void TestQgsLegendRenderer::testFilterByExpression()
395
395
mapSettings.setOutputSize ( QSize ( 400 , 100 ) );
396
396
mapSettings.setOutputDpi ( 96 );
397
397
QStringList ll;
398
- foreach ( auto l, QgsMapLayerRegistry::instance ()->mapLayers () )
398
+ foreach ( QgsMapLayer * l, QgsMapLayerRegistry::instance ()->mapLayers () )
399
399
{
400
400
ll << l->id ();
401
401
}
402
402
mapSettings.setLayers ( ll );
403
403
404
404
// use an expression to only include the red point
405
405
QgsLayerTreeUtils::setLegendFilterByExpression ( *legendModel.rootGroup ()->findLayer ( mVL3 ->id () ), " test_attr=1" );
406
-
406
+
407
407
legendModel.setLegendFilterByMap ( &mapSettings );
408
408
409
409
QgsLegendSettings settings;
You can’t perform that action at this time.
0 commit comments