Skip to content
Permalink
Browse files

again more coverity fixes

  • Loading branch information
jef-n committed Feb 7, 2015
1 parent 5160d46 commit 76b0bcfce0b10bd8890f660691e134470f651512
@@ -884,47 +884,36 @@ void QgsRasterLayerProperties::apply()
// pixmapLegend->repaint();

QgsRasterResampleFilter* resampleFilter = mRasterLayer->resampleFilter();

QgsRasterResampler* zoomedInResampler = 0;
QString zoomedInResamplingMethod = mZoomedInResamplingComboBox->currentText();
if ( zoomedInResamplingMethod == tr( "Bilinear" ) )
{
zoomedInResampler = new QgsBilinearRasterResampler();
}
else if ( zoomedInResamplingMethod == tr( "Cubic" ) )
{
zoomedInResampler = new QgsCubicRasterResampler();
}

if ( resampleFilter )
{
QgsRasterResampler *zoomedInResampler = 0;
QString zoomedInResamplingMethod = mZoomedInResamplingComboBox->currentText();
if ( zoomedInResamplingMethod == tr( "Bilinear" ) )
{
zoomedInResampler = new QgsBilinearRasterResampler();
}
else if ( zoomedInResamplingMethod == tr( "Cubic" ) )
{
zoomedInResampler = new QgsCubicRasterResampler();
}

resampleFilter->setZoomedInResampler( zoomedInResampler );
}

//raster resampling
QgsRasterResampler* zoomedOutResampler = 0;
QString zoomedOutResamplingMethod = mZoomedOutResamplingComboBox->currentText();
if ( zoomedOutResamplingMethod == tr( "Average" ) )
{
zoomedOutResampler = new QgsBilinearRasterResampler();
}
//raster resampling
QgsRasterResampler *zoomedOutResampler = 0;
QString zoomedOutResamplingMethod = mZoomedOutResamplingComboBox->currentText();
if ( zoomedOutResamplingMethod == tr( "Average" ) )
{
zoomedOutResampler = new QgsBilinearRasterResampler();
}

if ( resampleFilter )
{
resampleFilter->setZoomedOutResampler( zoomedOutResampler );
}
else
{
delete zoomedOutResampler;
}

if ( resampleFilter )
{
resampleFilter->setMaxOversampling( mMaximumOversamplingSpinBox->value() );
}

// Hue and saturation controls
QgsHueSaturationFilter* hueSaturationFilter = mRasterLayer->hueSaturationFilter();
QgsHueSaturationFilter *hueSaturationFilter = mRasterLayer->hueSaturationFilter();
if ( hueSaturationFilter )
{
hueSaturationFilter->setSaturation( sliderSaturation->value() );
@@ -147,6 +147,7 @@ QVector<QgsDataItem*> QgsMssqlConnectionItem::createChildren()
layer.srid = q.value( 3 ).toString();
layer.type = q.value( 4 ).toString();
layer.pkCols = QStringList(); //TODO
layer.isGeography = false;

// skip layers which are added already
bool skip = false;
@@ -17,6 +17,7 @@
#include <QString>
#include <QStringList>
#include <QSettings>
#include <QSharedPointer>

#include <qgsdatadefined.h>

@@ -63,12 +64,11 @@ void TestQgsDataDefined::cleanup()

void TestQgsDataDefined::create()
{
QgsDataDefined* dd = new QgsDataDefined( true, true, QString( "exp" ), QString( "field" ) );
QSharedPointer<QgsDataDefined> dd( new QgsDataDefined( true, true, QString( "exp" ), QString( "field" ) ) );
QVERIFY( dd->isActive() );
QVERIFY( dd->useExpression() );
QCOMPARE( dd->expressionString(), QString( "exp" ) );
QCOMPARE( dd->field(), QString( "field" ) );
delete dd;
}

void TestQgsDataDefined::gettersSetters()

0 comments on commit 76b0bcf

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