Skip to content

Commit

Permalink
Fix Coverity logically dead code error
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Apr 29, 2017
1 parent 4b4606f commit d2a7c93
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions src/app/qgisapp.cpp
Expand Up @@ -5839,13 +5839,18 @@ void QgisApp::saveMapAsImage()
} );
connect( mapRendererTask, &QgsMapRendererTask::errorOccurred, this, [ = ]( int error )
{
if ( error == QgsMapRendererTask::ImageAllocationFail )
switch ( error )
{
messageBar()->pushWarning( tr( "Save as image" ), tr( "Could not allocate required memory for image" ) );
}
else if ( error == QgsMapRendererTask::ImageAllocationFail )
{
messageBar()->pushWarning( tr( "Save as image" ), tr( "Could not save the image to file" ) );
case QgsMapRendererTask::ImageAllocationFail:
{
messageBar()->pushWarning( tr( "Save as image" ), tr( "Could not allocate required memory for image" ) );
break;
}
case QgsMapRendererTask::ImageSaveFail:
{
messageBar()->pushWarning( tr( "Save as image" ), tr( "Could not save the image to file" ) );
break;
}
}
} );

Expand Down

0 comments on commit d2a7c93

Please sign in to comment.