Skip to content
Permalink
Browse files

Some (very minor) coverity fixes

  • Loading branch information
nyalldawson committed Jun 4, 2015
1 parent 10c7d6a commit f39fbf4ef6d5ccd408c6d52f89ff153e93bdce0c
@@ -79,6 +79,7 @@ QgsRelationReferenceWidget::QgsRelationReferenceWidget( QWidget* parent )
, mAllowMapIdentification( false )
, mOrderByValue( false )
, mOpenFormButtonVisible( true )
, mChainFilters( false )
{
mTopLayout = new QVBoxLayout( this );
mTopLayout->setContentsMargins( 0, 0, 0, 0 );
@@ -1401,7 +1401,7 @@ int QgsWMSServer::getFeatureInfo( QDomDocument& result, QString version )
//However, in order to make attribute only queries via the FILTER parameter, it is allowed to skip them if the FILTER parameter is there

QgsRectangle* featuresRect = 0;
QgsPoint* infoPoint = 0;
QScopedPointer<QgsPoint> infoPoint;

if ( i == -1 || j == -1 )
{
@@ -1416,8 +1416,8 @@ int QgsWMSServer::getFeatureInfo( QDomDocument& result, QString version )
}
else
{
infoPoint = new QgsPoint();
if ( !infoPointToMapCoordinates( i, j, infoPoint, mMapRenderer ) )
infoPoint.reset( new QgsPoint() );
if ( !infoPointToMapCoordinates( i, j, infoPoint.data(), mMapRenderer ) )
{
return 5;
}
@@ -1539,7 +1539,7 @@ int QgsWMSServer::getFeatureInfo( QDomDocument& result, QString version )

if ( vectorLayer )
{
if ( featureInfoFromVectorLayer( vectorLayer, infoPoint, featureCount, result, layerElement, mMapRenderer, renderContext,
if ( featureInfoFromVectorLayer( vectorLayer, infoPoint.data(), featureCount, result, layerElement, mMapRenderer, renderContext,
version, infoFormat, featuresRect ) != 0 )
{
continue;
@@ -1556,11 +1556,11 @@ int QgsWMSServer::getFeatureInfo( QDomDocument& result, QString version )
QgsRasterLayer* rasterLayer = dynamic_cast<QgsRasterLayer*>( currentLayer );
if ( rasterLayer )
{
if ( !infoPoint )
if ( !infoPoint.data() )
{
continue;
}
QgsPoint layerInfoPoint = mMapRenderer->mapToLayerCoordinates( currentLayer, *infoPoint );
QgsPoint layerInfoPoint = mMapRenderer->mapToLayerCoordinates( currentLayer, *(infoPoint.data()) );
if ( featureInfoFromRasterLayer( rasterLayer, &layerInfoPoint, result, layerElement, version, infoFormat ) != 0 )
{
continue;
@@ -86,6 +86,10 @@ class DummyPaintEffect : public QgsPaintEffect
class TestQgsPaintEffect: public QObject
{
Q_OBJECT

public:
TestQgsPaintEffect();

private slots:
void initTestCase();// will be called before the first testfunction is executed.
void cleanupTestCase();// will be called after the last testfunction was executed.
@@ -121,6 +125,12 @@ class TestQgsPaintEffect: public QObject
};


TestQgsPaintEffect::TestQgsPaintEffect()
: mPicture( 0 )
{

}

void TestQgsPaintEffect::initTestCase()
{
QgsApplication::init();
@@ -80,6 +80,9 @@ class TestStyleV2 : public QObject

TestStyleV2::TestStyleV2()
: mStyle( NULL )
, mpPointsLayer( 0 )
, mpLinesLayer( 0 )
, mpPolysLayer( 0 )
{

}

0 comments on commit f39fbf4

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