coverity fixes

This commit is contained in:
Juergen E. Fischer 2015-07-07 20:16:17 +02:00
parent 05d7744cd9
commit 92af85b7a2
8 changed files with 17 additions and 7 deletions

View File

@ -4052,7 +4052,7 @@ void QgsPalLabeling::drawLabeling( QgsRenderContext& context )
double bbox[] = { extent.xMinimum(), extent.yMinimum(), extent.xMaximum(), extent.yMaximum() };
std::list<LabelPosition*>* labels;
pal::Problem* problem;
pal::Problem *problem;
try
{
problem = mPal->extractProblem( scale, bbox );
@ -4066,7 +4066,10 @@ void QgsPalLabeling::drawLabeling( QgsRenderContext& context )
}
if ( context.renderingStopped() )
{
delete problem;
return; // it has been cancelled
}
#if 1 // XXX strk
// features are pre-rotated but not scaled/translated,

View File

@ -39,6 +39,7 @@ class TestQgsComposerDD : public QObject
public:
TestQgsComposerDD()
: mComposition( 0 )
, mMapSettings( 0 )
, mVectorLayer( 0 )
, mAtlasMap( 0 )
, mAtlas( 0 )

View File

@ -31,6 +31,7 @@ class TestQgsComposerGroup : public QObject
public:
TestQgsComposerGroup()
: mComposition( 0 )
, mMapSettings( 0 )
, mItem1( 0 )
, mItem2( 0 )
, mGroup( 0 )

View File

@ -34,6 +34,7 @@ class TestQgsComposerMap : public QObject
TestQgsComposerMap()
: mComposition( 0 )
, mComposerMap( 0 )
, mMapSettings( 0 )
, mRasterLayer( 0 )
{}

View File

@ -66,17 +66,18 @@ class TestQgsComposerMapGrid : public QObject
};
TestQgsComposerMapGrid::TestQgsComposerMapGrid()
: mComposition( NULL )
, mComposerMap( NULL )
: mComposition( 0 )
, mComposerMap( 0 )
, mMapSettings( 0 )
{
QgsApplication::init();
QgsApplication::initQgis();
mMapSettings = new QgsMapSettings();
}
void TestQgsComposerMapGrid::initTestCase()
{
QgsApplication::init();
QgsApplication::initQgis();
mMapSettings = new QgsMapSettings();
mReport = "<h1>Composer Map Grid Tests</h1>\n";
}

View File

@ -31,6 +31,7 @@ class TestQgsComposerModel : public QObject
public:
TestQgsComposerModel()
: mComposition( 0 )
, mMapSettings( 0 )
, mItem1( 0 )
, mItem2( 0 )
, mItem3( 0 )

View File

@ -40,6 +40,7 @@ class TestQgsComposerPaper : public QObject
, mMarkerLine( 0 )
, mFillSymbol( 0 )
, mMarkerLineSymbol( 0 )
, mMapSettings( 0 )
{}
private slots:

View File

@ -36,6 +36,7 @@ class TestQgsComposerShapes : public QObject
TestQgsComposerShapes()
: mComposition( 0 )
, mComposerShape( 0 )
, mMapSettings( 0 )
, mSimpleFill( 0 )
, mFillSymbol( 0 )
{}