Skip to content
Permalink
Browse files

Resolve coverity issues

  • Loading branch information
nyalldawson committed Nov 8, 2015
1 parent a364890 commit 26dbb42a71d7745e96edeedd2a0c3f0f45224de1
@@ -1565,7 +1565,7 @@ void QgsComposerMapWidget::on_mGridLineStyleButton_clicked()
return;
}

QgsLineSymbolV2* newSymbol = dynamic_cast<QgsLineSymbolV2*>( grid->lineSymbol()->clone() );
QgsLineSymbolV2* newSymbol = static_cast<QgsLineSymbolV2*>( grid->lineSymbol()->clone() );
QgsSymbolV2SelectorDialog d( newSymbol, QgsStyleV2::defaultStyle(), 0, this );

if ( d.exec() == QDialog::Accepted )
@@ -1590,7 +1590,7 @@ void QgsComposerMapWidget::on_mGridMarkerStyleButton_clicked()
return;
}

QgsMarkerSymbolV2* newSymbol = dynamic_cast<QgsMarkerSymbolV2*>( grid->markerSymbol()->clone() );
QgsMarkerSymbolV2* newSymbol = static_cast<QgsMarkerSymbolV2*>( grid->markerSymbol()->clone() );
QgsSymbolV2SelectorDialog d( newSymbol, QgsStyleV2::defaultStyle(), 0, this );

if ( d.exec() == QDialog::Accepted )
@@ -2569,7 +2569,7 @@ void QgsComposerMapWidget::on_mOverviewFrameStyleButton_clicked()
return;
}

QgsFillSymbolV2* newSymbol = dynamic_cast<QgsFillSymbolV2*>( overview->frameSymbol()->clone() );
QgsFillSymbolV2* newSymbol = static_cast<QgsFillSymbolV2*>( overview->frameSymbol()->clone() );
QgsSymbolV2SelectorDialog d( newSymbol, QgsStyleV2::defaultStyle(), 0, this );

if ( d.exec() == QDialog::Accepted )
@@ -992,6 +992,7 @@ QgisApp::QgisApp()
, mMacrosWarn( 0 )
, mUserInputDockWidget( 0 )
, mVectorLayerTools( 0 )
, mActionFilterLegend( 0 )
, mLegendExpressionFilterButton( 0 )
, mSnappingUtils( 0 )
, mProjectLastModified()
@@ -64,6 +64,9 @@ QgsComposerLegend::QgsComposerLegend()
, mComposerMap( 0 )
, mLegendFilterByMap( false )
, mLegendFilterByExpression( false )
, mFilterOutAtlas( false )
, mFilterAskedForUpdate( false )
, mInAtlas( false )
{

}
@@ -402,7 +402,9 @@ void TestQgsLegendRenderer::testFilterByExpression()
mapSettings.setLayers( ll );

// use an expression to only include the red point
QgsLayerTreeUtils::setLegendFilterByExpression( *legendModel.rootGroup()->findLayer( mVL3->id() ), "test_attr=1" );
QgsLayerTreeLayer* layer = legendModel.rootGroup()->findLayer( mVL3->id() );
QVERIFY( layer );
QgsLayerTreeUtils::setLegendFilterByExpression( *layer, "test_attr=1" );

legendModel.setLegendFilterByMap( &mapSettings );

0 comments on commit 26dbb42

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