Skip to content

Commit

Permalink
coverity fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Jul 7, 2015
1 parent 05d7744 commit 92af85b
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 7 deletions.
5 changes: 4 additions & 1 deletion src/core/qgspallabeling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand All @@ -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,
Expand Down
1 change: 1 addition & 0 deletions tests/src/core/testqgscomposerdd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class TestQgsComposerDD : public QObject
public:
TestQgsComposerDD()
: mComposition( 0 )
, mMapSettings( 0 )
, mVectorLayer( 0 )
, mAtlasMap( 0 )
, mAtlas( 0 )
Expand Down
1 change: 1 addition & 0 deletions tests/src/core/testqgscomposergroup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ class TestQgsComposerGroup : public QObject
public:
TestQgsComposerGroup()
: mComposition( 0 )
, mMapSettings( 0 )
, mItem1( 0 )
, mItem2( 0 )
, mGroup( 0 )
Expand Down
1 change: 1 addition & 0 deletions tests/src/core/testqgscomposermap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class TestQgsComposerMap : public QObject
TestQgsComposerMap()
: mComposition( 0 )
, mComposerMap( 0 )
, mMapSettings( 0 )
, mRasterLayer( 0 )
{}

Expand Down
13 changes: 7 additions & 6 deletions tests/src/core/testqgscomposermapgrid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}

Expand Down
1 change: 1 addition & 0 deletions tests/src/core/testqgscomposermodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ class TestQgsComposerModel : public QObject
public:
TestQgsComposerModel()
: mComposition( 0 )
, mMapSettings( 0 )
, mItem1( 0 )
, mItem2( 0 )
, mItem3( 0 )
Expand Down
1 change: 1 addition & 0 deletions tests/src/core/testqgscomposerpaper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class TestQgsComposerPaper : public QObject
, mMarkerLine( 0 )
, mFillSymbol( 0 )
, mMarkerLineSymbol( 0 )
, mMapSettings( 0 )
{}

private slots:
Expand Down
1 change: 1 addition & 0 deletions tests/src/core/testqgscomposershapes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ class TestQgsComposerShapes : public QObject
TestQgsComposerShapes()
: mComposition( 0 )
, mComposerShape( 0 )
, mMapSettings( 0 )
, mSimpleFill( 0 )
, mFillSymbol( 0 )
{}
Expand Down

0 comments on commit 92af85b

Please sign in to comment.