Skip to content
Permalink
Browse files

coverity fixes

  • Loading branch information
blazek committed Oct 16, 2015
1 parent f7550b3 commit 5e441ac68499b1b26a6332b1248311c63c878df3
@@ -388,14 +388,6 @@ void QgsGrassPlugin::onEditingStarted()
if ( !grassProvider )
return;

QgsRendererV2Registry::instance()->addRenderer( new QgsRendererV2Metadata( "grassEdit",
QObject::tr( "GRASS Edit" ),
QgsGrassEditRenderer::create,
QIcon(),
QgsGrassEditRendererWidget::create ) );

QgsGrassEditRenderer *renderer = new QgsGrassEditRenderer();

mOldStyles[vectorLayer] = vectorLayer->styleManager()->currentStyle();
mFormSuppress[vectorLayer] = vectorLayer->featureFormSuppress();

@@ -408,7 +400,6 @@ void QgsGrassPlugin::onEditingStarted()
{
QgsDebugMsg( editStyleName + " style exists -> set as current" );
vectorLayer->styleManager()->setCurrentStyle( editStyleName );
delete renderer;
}
else
{
@@ -417,6 +408,18 @@ void QgsGrassPlugin::onEditingStarted()

//vectorLayer->styleManager()->addStyle( editStyleName, QgsMapLayerStyle() );
vectorLayer->styleManager()->setCurrentStyle( editStyleName );

if ( !QgsRendererV2Registry::instance()->renderersList().contains( "grassEdit" ) )
{
QgsRendererV2Registry::instance()->addRenderer( new QgsRendererV2Metadata( "grassEdit",
QObject::tr( "GRASS Edit" ),
QgsGrassEditRenderer::create,
QIcon(),
QgsGrassEditRendererWidget::create ) );
}

QgsGrassEditRenderer *renderer = new QgsGrassEditRenderer();

vectorLayer->setRendererV2( renderer );
}

@@ -193,8 +193,12 @@ QgsGrassRegion::QgsGrassRegion( QgisInterface *iface,
QWidget * parent, Qt::WindowFlags f )
: QWidget( parent, f )
, QgsGrassRegionBase()
, mInterface( 0 )
, mCanvas( 0 )
, mRadioGroup( 0 )
, mX( 0 )
, mY( 0 )
, mUpdatingGui( false )
, mRegionEdit( 0 )
{
QgsDebugMsg( "QgsGrassRegion()" );
@@ -761,9 +761,6 @@ bool QgsGrassMapsetItem::handleDrop( const QMimeData * data, Qt::DropAction )
useSrcRegion = false;
}

QgsRasterPipe* pipe = new QgsRasterPipe();
pipe->set( rasterProvider );

QgsCoordinateReferenceSystem providerCrs = rasterProvider->crs();
QgsDebugMsg( "providerCrs = " + providerCrs.toWkt() );
QgsDebugMsg( "mapsetCrs = " + mapsetCrs.toWkt() );
@@ -775,10 +772,11 @@ bool QgsGrassMapsetItem::handleDrop( const QMimeData * data, Qt::DropAction )
{
import = new QgsGrassExternal( rasterProvider->dataSourceUri(), rasterObject );
delete rasterProvider;
delete pipe;
}
else
{
QgsRasterPipe* pipe = new QgsRasterPipe();
pipe->set( rasterProvider );
if ( providerCrs.isValid() && mapsetCrs.isValid() && providerCrs != mapsetCrs )
{
QgsRasterProjector * projector = new QgsRasterProjector;

0 comments on commit 5e441ac

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