mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-15 00:04:00 -04:00
coverity fixes
This commit is contained in:
parent
05d7744cd9
commit
92af85b7a2
@ -4052,7 +4052,7 @@ void QgsPalLabeling::drawLabeling( QgsRenderContext& context )
|
|||||||
double bbox[] = { extent.xMinimum(), extent.yMinimum(), extent.xMaximum(), extent.yMaximum() };
|
double bbox[] = { extent.xMinimum(), extent.yMinimum(), extent.xMaximum(), extent.yMaximum() };
|
||||||
|
|
||||||
std::list<LabelPosition*>* labels;
|
std::list<LabelPosition*>* labels;
|
||||||
pal::Problem* problem;
|
pal::Problem *problem;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
problem = mPal->extractProblem( scale, bbox );
|
problem = mPal->extractProblem( scale, bbox );
|
||||||
@ -4066,7 +4066,10 @@ void QgsPalLabeling::drawLabeling( QgsRenderContext& context )
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( context.renderingStopped() )
|
if ( context.renderingStopped() )
|
||||||
|
{
|
||||||
|
delete problem;
|
||||||
return; // it has been cancelled
|
return; // it has been cancelled
|
||||||
|
}
|
||||||
|
|
||||||
#if 1 // XXX strk
|
#if 1 // XXX strk
|
||||||
// features are pre-rotated but not scaled/translated,
|
// features are pre-rotated but not scaled/translated,
|
||||||
|
@ -39,6 +39,7 @@ class TestQgsComposerDD : public QObject
|
|||||||
public:
|
public:
|
||||||
TestQgsComposerDD()
|
TestQgsComposerDD()
|
||||||
: mComposition( 0 )
|
: mComposition( 0 )
|
||||||
|
, mMapSettings( 0 )
|
||||||
, mVectorLayer( 0 )
|
, mVectorLayer( 0 )
|
||||||
, mAtlasMap( 0 )
|
, mAtlasMap( 0 )
|
||||||
, mAtlas( 0 )
|
, mAtlas( 0 )
|
||||||
|
@ -31,6 +31,7 @@ class TestQgsComposerGroup : public QObject
|
|||||||
public:
|
public:
|
||||||
TestQgsComposerGroup()
|
TestQgsComposerGroup()
|
||||||
: mComposition( 0 )
|
: mComposition( 0 )
|
||||||
|
, mMapSettings( 0 )
|
||||||
, mItem1( 0 )
|
, mItem1( 0 )
|
||||||
, mItem2( 0 )
|
, mItem2( 0 )
|
||||||
, mGroup( 0 )
|
, mGroup( 0 )
|
||||||
|
@ -34,6 +34,7 @@ class TestQgsComposerMap : public QObject
|
|||||||
TestQgsComposerMap()
|
TestQgsComposerMap()
|
||||||
: mComposition( 0 )
|
: mComposition( 0 )
|
||||||
, mComposerMap( 0 )
|
, mComposerMap( 0 )
|
||||||
|
, mMapSettings( 0 )
|
||||||
, mRasterLayer( 0 )
|
, mRasterLayer( 0 )
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
@ -66,17 +66,18 @@ class TestQgsComposerMapGrid : public QObject
|
|||||||
};
|
};
|
||||||
|
|
||||||
TestQgsComposerMapGrid::TestQgsComposerMapGrid()
|
TestQgsComposerMapGrid::TestQgsComposerMapGrid()
|
||||||
: mComposition( NULL )
|
: mComposition( 0 )
|
||||||
, mComposerMap( NULL )
|
, mComposerMap( 0 )
|
||||||
|
, mMapSettings( 0 )
|
||||||
{
|
{
|
||||||
QgsApplication::init();
|
|
||||||
QgsApplication::initQgis();
|
|
||||||
|
|
||||||
mMapSettings = new QgsMapSettings();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void TestQgsComposerMapGrid::initTestCase()
|
void TestQgsComposerMapGrid::initTestCase()
|
||||||
{
|
{
|
||||||
|
QgsApplication::init();
|
||||||
|
QgsApplication::initQgis();
|
||||||
|
mMapSettings = new QgsMapSettings();
|
||||||
|
|
||||||
mReport = "<h1>Composer Map Grid Tests</h1>\n";
|
mReport = "<h1>Composer Map Grid Tests</h1>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,6 +31,7 @@ class TestQgsComposerModel : public QObject
|
|||||||
public:
|
public:
|
||||||
TestQgsComposerModel()
|
TestQgsComposerModel()
|
||||||
: mComposition( 0 )
|
: mComposition( 0 )
|
||||||
|
, mMapSettings( 0 )
|
||||||
, mItem1( 0 )
|
, mItem1( 0 )
|
||||||
, mItem2( 0 )
|
, mItem2( 0 )
|
||||||
, mItem3( 0 )
|
, mItem3( 0 )
|
||||||
|
@ -40,6 +40,7 @@ class TestQgsComposerPaper : public QObject
|
|||||||
, mMarkerLine( 0 )
|
, mMarkerLine( 0 )
|
||||||
, mFillSymbol( 0 )
|
, mFillSymbol( 0 )
|
||||||
, mMarkerLineSymbol( 0 )
|
, mMarkerLineSymbol( 0 )
|
||||||
|
, mMapSettings( 0 )
|
||||||
{}
|
{}
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
@ -36,6 +36,7 @@ class TestQgsComposerShapes : public QObject
|
|||||||
TestQgsComposerShapes()
|
TestQgsComposerShapes()
|
||||||
: mComposition( 0 )
|
: mComposition( 0 )
|
||||||
, mComposerShape( 0 )
|
, mComposerShape( 0 )
|
||||||
|
, mMapSettings( 0 )
|
||||||
, mSimpleFill( 0 )
|
, mSimpleFill( 0 )
|
||||||
, mFillSymbol( 0 )
|
, mFillSymbol( 0 )
|
||||||
{}
|
{}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user