mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-16 00:03:12 -04:00
Fix/avoid Coverity null pointer dereference warnings
This commit is contained in:
parent
f84508a35d
commit
7619cba438
@ -481,7 +481,7 @@ void QgsGeometrySnapper::processFeature( QgsFeature& feature, double snapToleran
|
|||||||
|
|
||||||
QgsGeometry QgsGeometrySnapper::snapGeometry( const QgsGeometry& geometry, double snapTolerance, SnapMode mode ) const
|
QgsGeometry QgsGeometrySnapper::snapGeometry( const QgsGeometry& geometry, double snapTolerance, SnapMode mode ) const
|
||||||
{
|
{
|
||||||
QgsPointV2 center = dynamic_cast< const QgsPointV2* >( geometry.geometry() ) ? *dynamic_cast< const QgsPointV2* >( geometry.geometry() ) :
|
QgsPointV2 center = dynamic_cast< const QgsPointV2* >( geometry.geometry() ) ? *static_cast< const QgsPointV2* >( geometry.geometry() ) :
|
||||||
QgsPointV2( geometry.geometry()->boundingBox().center() );
|
QgsPointV2( geometry.geometry()->boundingBox().center() );
|
||||||
|
|
||||||
// Get potential reference features and construct snap index
|
// Get potential reference features and construct snap index
|
||||||
|
@ -85,10 +85,12 @@ void QgsComposerPolygonWidget::setGuiElementValues()
|
|||||||
|
|
||||||
void QgsComposerPolygonWidget::updateStyleFromWidget()
|
void QgsComposerPolygonWidget::updateStyleFromWidget()
|
||||||
{
|
{
|
||||||
QgsSymbolSelectorWidget* w = qobject_cast<QgsSymbolSelectorWidget*>( sender() );
|
if ( QgsSymbolSelectorWidget* w = qobject_cast<QgsSymbolSelectorWidget*>( sender() ) )
|
||||||
|
{
|
||||||
mComposerPolygon->setPolygonStyleSymbol( dynamic_cast< QgsFillSymbol* >( w->symbol() ) );
|
mComposerPolygon->setPolygonStyleSymbol( dynamic_cast< QgsFillSymbol* >( w->symbol() ) );
|
||||||
mComposerPolygon->update();
|
mComposerPolygon->update();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void QgsComposerPolygonWidget::cleanUpStyleSelector( QgsPanelWidget* container )
|
void QgsComposerPolygonWidget::cleanUpStyleSelector( QgsPanelWidget* container )
|
||||||
{
|
{
|
||||||
|
@ -78,10 +78,12 @@ void QgsComposerPolylineWidget::setGuiElementValues()
|
|||||||
|
|
||||||
void QgsComposerPolylineWidget::updateStyleFromWidget()
|
void QgsComposerPolylineWidget::updateStyleFromWidget()
|
||||||
{
|
{
|
||||||
QgsSymbolSelectorWidget* w = qobject_cast<QgsSymbolSelectorWidget*>( sender() );
|
if ( QgsSymbolSelectorWidget* w = qobject_cast<QgsSymbolSelectorWidget*>( sender() ) )
|
||||||
|
{
|
||||||
mComposerPolyline->setPolylineStyleSymbol( dynamic_cast< QgsLineSymbol* >( w->symbol() ) );
|
mComposerPolyline->setPolylineStyleSymbol( dynamic_cast< QgsLineSymbol* >( w->symbol() ) );
|
||||||
mComposerPolyline->update();
|
mComposerPolyline->update();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void QgsComposerPolylineWidget::cleanUpStyleSelector( QgsPanelWidget* container )
|
void QgsComposerPolylineWidget::cleanUpStyleSelector( QgsPanelWidget* container )
|
||||||
{
|
{
|
||||||
|
@ -182,7 +182,7 @@ void QgsComposerShapeWidget::toggleRadiusSpin( const QString& shapeText )
|
|||||||
|
|
||||||
void QgsComposerShapeWidget::updateSymbolFromWidget()
|
void QgsComposerShapeWidget::updateSymbolFromWidget()
|
||||||
{
|
{
|
||||||
QgsSymbolSelectorWidget* w = qobject_cast<QgsSymbolSelectorWidget*>( sender() );
|
if ( QgsSymbolSelectorWidget* w = qobject_cast<QgsSymbolSelectorWidget*>( sender() ) )
|
||||||
mComposerShape->setShapeStyleSymbol( dynamic_cast< QgsFillSymbol* >( w->symbol() ) );
|
mComposerShape->setShapeStyleSymbol( dynamic_cast< QgsFillSymbol* >( w->symbol() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -199,10 +199,12 @@ void QgsCompositionWidget::updateVariables()
|
|||||||
|
|
||||||
void QgsCompositionWidget::updateStyleFromWidget()
|
void QgsCompositionWidget::updateStyleFromWidget()
|
||||||
{
|
{
|
||||||
QgsSymbolSelectorWidget* w = qobject_cast<QgsSymbolSelectorWidget*>( sender() );
|
if ( QgsSymbolSelectorWidget* w = qobject_cast<QgsSymbolSelectorWidget*>( sender() ) )
|
||||||
|
{
|
||||||
mComposition->setPageStyleSymbol( dynamic_cast< QgsFillSymbol* >( w->symbol() ) );
|
mComposition->setPageStyleSymbol( dynamic_cast< QgsFillSymbol* >( w->symbol() ) );
|
||||||
mComposition->update();
|
mComposition->update();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void QgsCompositionWidget::cleanUpStyleSelector( QgsPanelWidget* container )
|
void QgsCompositionWidget::cleanUpStyleSelector( QgsPanelWidget* container )
|
||||||
{
|
{
|
||||||
|
@ -104,8 +104,11 @@ void QgsComposerShape::createDefaultShapeStyleSymbol()
|
|||||||
properties.insert( QStringLiteral( "joinstyle" ), QStringLiteral( "miter" ) );
|
properties.insert( QStringLiteral( "joinstyle" ), QStringLiteral( "miter" ) );
|
||||||
mShapeStyleSymbol = QgsFillSymbol::createSimple( properties );
|
mShapeStyleSymbol = QgsFillSymbol::createSimple( properties );
|
||||||
|
|
||||||
|
if ( mComposition )
|
||||||
|
{
|
||||||
QgsRenderContext rc = QgsComposerUtils::createRenderContextForMap( mComposition->referenceMap(), nullptr, mComposition->printResolution() );
|
QgsRenderContext rc = QgsComposerUtils::createRenderContextForMap( mComposition->referenceMap(), nullptr, mComposition->printResolution() );
|
||||||
mMaxSymbolBleed = ( 25.4 / mComposition->printResolution() ) * QgsSymbolLayerUtils::estimateMaxSymbolBleed( mShapeStyleSymbol, rc );
|
mMaxSymbolBleed = ( 25.4 / mComposition->printResolution() ) * QgsSymbolLayerUtils::estimateMaxSymbolBleed( mShapeStyleSymbol, rc );
|
||||||
|
}
|
||||||
|
|
||||||
updateBoundingRect();
|
updateBoundingRect();
|
||||||
|
|
||||||
|
@ -2765,7 +2765,7 @@ static QVariant fcnProject( const QVariantList& values, const QgsExpressionConte
|
|||||||
double azimuth = getDoubleValue( values.at( 2 ), parent );
|
double azimuth = getDoubleValue( values.at( 2 ), parent );
|
||||||
double inclination = getDoubleValue( values.at( 3 ), parent );
|
double inclination = getDoubleValue( values.at( 3 ), parent );
|
||||||
|
|
||||||
const QgsPointV2* p = dynamic_cast<const QgsPointV2*>( geom.geometry() );
|
const QgsPointV2* p = static_cast<const QgsPointV2*>( geom.geometry() );
|
||||||
QgsPointV2 newPoint = p->project( distance, 180.0 * azimuth / M_PI, 180.0 * inclination / M_PI );
|
QgsPointV2 newPoint = p->project( distance, 180.0 * azimuth / M_PI, 180.0 * inclination / M_PI );
|
||||||
|
|
||||||
return QVariant::fromValue( QgsGeometry( new QgsPointV2( newPoint ) ) );
|
return QVariant::fromValue( QgsGeometry( new QgsPointV2( newPoint ) ) );
|
||||||
|
@ -321,7 +321,7 @@ void QgsProjectPropertyKey::dump( int tabs ) const
|
|||||||
QgsDebugMsg( QString( "%1key: <%2> subkey: <%3>" )
|
QgsDebugMsg( QString( "%1key: <%2> subkey: <%3>" )
|
||||||
.arg( tabString,
|
.arg( tabString,
|
||||||
i.key(),
|
i.key(),
|
||||||
dynamic_cast<QgsProjectPropertyKey*>( i.value() )->name() ) );
|
static_cast<QgsProjectPropertyKey*>( i.value() )->name() ) );
|
||||||
i.value()->dump( tabs + 1 );
|
i.value()->dump( tabs + 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1108,20 +1108,20 @@ void QgsRasterLayer::refreshRendererIfNeeded( QgsRasterRenderer* rasterRenderer,
|
|||||||
|
|
||||||
// Update main renderer so that the legends get updated
|
// Update main renderer so that the legends get updated
|
||||||
if ( singleBandRenderer )
|
if ( singleBandRenderer )
|
||||||
dynamic_cast<QgsSingleBandGrayRenderer*>( renderer() )->setContrastEnhancement( new QgsContrastEnhancement( * singleBandRenderer->contrastEnhancement() ) );
|
static_cast<QgsSingleBandGrayRenderer*>( renderer() )->setContrastEnhancement( new QgsContrastEnhancement( * singleBandRenderer->contrastEnhancement() ) );
|
||||||
else if ( multiBandRenderer )
|
else if ( multiBandRenderer )
|
||||||
{
|
{
|
||||||
if ( multiBandRenderer->redContrastEnhancement() )
|
if ( multiBandRenderer->redContrastEnhancement() )
|
||||||
{
|
{
|
||||||
dynamic_cast<QgsMultiBandColorRenderer*>( renderer() )->setRedContrastEnhancement( new QgsContrastEnhancement( *multiBandRenderer->redContrastEnhancement() ) );
|
static_cast<QgsMultiBandColorRenderer*>( renderer() )->setRedContrastEnhancement( new QgsContrastEnhancement( *multiBandRenderer->redContrastEnhancement() ) );
|
||||||
}
|
}
|
||||||
if ( multiBandRenderer->greenContrastEnhancement() )
|
if ( multiBandRenderer->greenContrastEnhancement() )
|
||||||
{
|
{
|
||||||
dynamic_cast<QgsMultiBandColorRenderer*>( renderer() )->setGreenContrastEnhancement( new QgsContrastEnhancement( *multiBandRenderer->greenContrastEnhancement() ) );
|
static_cast<QgsMultiBandColorRenderer*>( renderer() )->setGreenContrastEnhancement( new QgsContrastEnhancement( *multiBandRenderer->greenContrastEnhancement() ) );
|
||||||
}
|
}
|
||||||
if ( multiBandRenderer->blueContrastEnhancement() )
|
if ( multiBandRenderer->blueContrastEnhancement() )
|
||||||
{
|
{
|
||||||
dynamic_cast<QgsMultiBandColorRenderer*>( renderer() )->setBlueContrastEnhancement( new QgsContrastEnhancement( *multiBandRenderer->blueContrastEnhancement() ) );
|
static_cast<QgsMultiBandColorRenderer*>( renderer() )->setBlueContrastEnhancement( new QgsContrastEnhancement( *multiBandRenderer->blueContrastEnhancement() ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1557,7 +1557,7 @@ void QgsWmsProjectParser::addOWSLayers( QDomDocument &doc,
|
|||||||
}
|
}
|
||||||
|
|
||||||
QString layerName = currentLayer->name();
|
QString layerName = currentLayer->name();
|
||||||
if ( mProjectParser && mProjectParser->useLayerIds() )
|
if ( mProjectParser->useLayerIds() )
|
||||||
layerName = currentLayer->id();
|
layerName = currentLayer->id();
|
||||||
else if ( !currentLayer->shortName().isEmpty() )
|
else if ( !currentLayer->shortName().isEmpty() )
|
||||||
layerName = currentLayer->shortName();
|
layerName = currentLayer->shortName();
|
||||||
|
@ -583,8 +583,9 @@ void TestQgsProperty::propertyTransformer()
|
|||||||
//install into property and test evaluation
|
//install into property and test evaluation
|
||||||
QgsProperty p1;
|
QgsProperty p1;
|
||||||
p1.setTransformer( new TestTransformer( 10, 20 ) );
|
p1.setTransformer( new TestTransformer( 10, 20 ) );
|
||||||
QCOMPARE( dynamic_cast< const TestTransformer* >( p1.transformer() )->minValue(), 10.0 );
|
QVERIFY( dynamic_cast< const TestTransformer* >( p1.transformer() ) );
|
||||||
QCOMPARE( dynamic_cast< const TestTransformer* >( p1.transformer() )->maxValue(), 20.0 );
|
QCOMPARE( static_cast< const TestTransformer* >( p1.transformer() )->minValue(), 10.0 );
|
||||||
|
QCOMPARE( static_cast< const TestTransformer* >( p1.transformer() )->maxValue(), 20.0 );
|
||||||
p1.setStaticValue( QVariant( QVariant::Double ) );
|
p1.setStaticValue( QVariant( QVariant::Double ) );
|
||||||
QCOMPARE( p1.value( context, -99 ).toDouble(), -1.0 );
|
QCOMPARE( p1.value( context, -99 ).toDouble(), -1.0 );
|
||||||
p1.setStaticValue( 11.0 );
|
p1.setStaticValue( 11.0 );
|
||||||
@ -772,24 +773,25 @@ void TestQgsProperty::colorRampTransformer()
|
|||||||
QCOMPARE( r1.minValue(), 15.0 );
|
QCOMPARE( r1.minValue(), 15.0 );
|
||||||
QCOMPARE( r1.maxValue(), 25.0 );
|
QCOMPARE( r1.maxValue(), 25.0 );
|
||||||
QCOMPARE( r1.nullColor(), QColor( 100, 150, 200 ) );
|
QCOMPARE( r1.nullColor(), QColor( 100, 150, 200 ) );
|
||||||
QCOMPARE( dynamic_cast< QgsGradientColorRamp* >( r1.colorRamp() )->color1(), QColor( 10, 20, 30 ) );
|
QVERIFY( dynamic_cast< QgsGradientColorRamp* >( r1.colorRamp() ) );
|
||||||
QCOMPARE( dynamic_cast< QgsGradientColorRamp* >( r1.colorRamp() )->color2(), QColor( 200, 190, 180 ) );
|
QCOMPARE( static_cast< QgsGradientColorRamp* >( r1.colorRamp() )->color1(), QColor( 10, 20, 30 ) );
|
||||||
|
QCOMPARE( static_cast< QgsGradientColorRamp* >( r1.colorRamp() )->color2(), QColor( 200, 190, 180 ) );
|
||||||
|
|
||||||
// test cloning
|
// test cloning
|
||||||
QScopedPointer< QgsColorRampTransformer > r2( t1.clone() );
|
QScopedPointer< QgsColorRampTransformer > r2( t1.clone() );
|
||||||
QCOMPARE( r2->minValue(), 15.0 );
|
QCOMPARE( r2->minValue(), 15.0 );
|
||||||
QCOMPARE( r2->maxValue(), 25.0 );
|
QCOMPARE( r2->maxValue(), 25.0 );
|
||||||
QCOMPARE( r2->nullColor(), QColor( 100, 150, 200 ) );
|
QCOMPARE( r2->nullColor(), QColor( 100, 150, 200 ) );
|
||||||
QCOMPARE( dynamic_cast< QgsGradientColorRamp* >( r2->colorRamp() )->color1(), QColor( 10, 20, 30 ) );
|
QCOMPARE( static_cast< QgsGradientColorRamp* >( r2->colorRamp() )->color1(), QColor( 10, 20, 30 ) );
|
||||||
QCOMPARE( dynamic_cast< QgsGradientColorRamp* >( r2->colorRamp() )->color2(), QColor( 200, 190, 180 ) );
|
QCOMPARE( static_cast< QgsGradientColorRamp* >( r2->colorRamp() )->color2(), QColor( 200, 190, 180 ) );
|
||||||
|
|
||||||
// copy constructor
|
// copy constructor
|
||||||
QgsColorRampTransformer r3( t1 );
|
QgsColorRampTransformer r3( t1 );
|
||||||
QCOMPARE( r3.minValue(), 15.0 );
|
QCOMPARE( r3.minValue(), 15.0 );
|
||||||
QCOMPARE( r3.maxValue(), 25.0 );
|
QCOMPARE( r3.maxValue(), 25.0 );
|
||||||
QCOMPARE( r3.nullColor(), QColor( 100, 150, 200 ) );
|
QCOMPARE( r3.nullColor(), QColor( 100, 150, 200 ) );
|
||||||
QCOMPARE( dynamic_cast< QgsGradientColorRamp* >( r3.colorRamp() )->color1(), QColor( 10, 20, 30 ) );
|
QCOMPARE( static_cast< QgsGradientColorRamp* >( r3.colorRamp() )->color1(), QColor( 10, 20, 30 ) );
|
||||||
QCOMPARE( dynamic_cast< QgsGradientColorRamp* >( r3.colorRamp() )->color2(), QColor( 200, 190, 180 ) );
|
QCOMPARE( static_cast< QgsGradientColorRamp* >( r3.colorRamp() )->color2(), QColor( 200, 190, 180 ) );
|
||||||
|
|
||||||
// assignment operator
|
// assignment operator
|
||||||
QgsColorRampTransformer r4;
|
QgsColorRampTransformer r4;
|
||||||
@ -797,8 +799,8 @@ void TestQgsProperty::colorRampTransformer()
|
|||||||
QCOMPARE( r4.minValue(), 15.0 );
|
QCOMPARE( r4.minValue(), 15.0 );
|
||||||
QCOMPARE( r4.maxValue(), 25.0 );
|
QCOMPARE( r4.maxValue(), 25.0 );
|
||||||
QCOMPARE( r4.nullColor(), QColor( 100, 150, 200 ) );
|
QCOMPARE( r4.nullColor(), QColor( 100, 150, 200 ) );
|
||||||
QCOMPARE( dynamic_cast< QgsGradientColorRamp* >( r4.colorRamp() )->color1(), QColor( 10, 20, 30 ) );
|
QCOMPARE( static_cast< QgsGradientColorRamp* >( r4.colorRamp() )->color1(), QColor( 10, 20, 30 ) );
|
||||||
QCOMPARE( dynamic_cast< QgsGradientColorRamp* >( r4.colorRamp() )->color2(), QColor( 200, 190, 180 ) );
|
QCOMPARE( static_cast< QgsGradientColorRamp* >( r4.colorRamp() )->color2(), QColor( 200, 190, 180 ) );
|
||||||
|
|
||||||
//test various min/max value/color and scaling methods
|
//test various min/max value/color and scaling methods
|
||||||
|
|
||||||
@ -811,7 +813,7 @@ void TestQgsProperty::colorRampTransformer()
|
|||||||
t.setNullColor( QColor( 1, 10, 11, 21 ) );
|
t.setNullColor( QColor( 1, 10, 11, 21 ) );
|
||||||
QCOMPARE( t.nullColor(), QColor( 1, 10, 11, 21 ) );
|
QCOMPARE( t.nullColor(), QColor( 1, 10, 11, 21 ) );
|
||||||
t.setColorRamp( new QgsGradientColorRamp( QColor( 10, 20, 100 ), QColor( 100, 200, 200 ) ) );
|
t.setColorRamp( new QgsGradientColorRamp( QColor( 10, 20, 100 ), QColor( 100, 200, 200 ) ) );
|
||||||
QCOMPARE( dynamic_cast< QgsGradientColorRamp* >( t.colorRamp() )->color1(), QColor( 10, 20, 100 ) );
|
QCOMPARE( static_cast< QgsGradientColorRamp* >( t.colorRamp() )->color1(), QColor( 10, 20, 100 ) );
|
||||||
|
|
||||||
//test colors
|
//test colors
|
||||||
QCOMPARE( t.color( 50 ), QColor( 10, 20, 100 ) ); //out of range
|
QCOMPARE( t.color( 50 ), QColor( 10, 20, 100 ) ); //out of range
|
||||||
|
@ -701,15 +701,16 @@ void TestQgsRasterLayer::testRefreshRendererIfNeeded()
|
|||||||
{
|
{
|
||||||
QVERIFY2( mpLandsatRasterLayer->isValid(), "landsat.tif layer is not valid!" );
|
QVERIFY2( mpLandsatRasterLayer->isValid(), "landsat.tif layer is not valid!" );
|
||||||
mpLandsatRasterLayer->setContrastEnhancement( QgsContrastEnhancement::StretchToMinimumMaximum, QgsRasterMinMaxOrigin::MinMax );
|
mpLandsatRasterLayer->setContrastEnhancement( QgsContrastEnhancement::StretchToMinimumMaximum, QgsRasterMinMaxOrigin::MinMax );
|
||||||
|
QVERIFY( dynamic_cast<QgsMultiBandColorRenderer*>( mpLandsatRasterLayer->renderer() ) );
|
||||||
mMapSettings->setLayers( QList<QgsMapLayer*>() << mpLandsatRasterLayer );
|
mMapSettings->setLayers( QList<QgsMapLayer*>() << mpLandsatRasterLayer );
|
||||||
mMapSettings->setExtent( mpLandsatRasterLayer->extent() );
|
mMapSettings->setExtent( mpLandsatRasterLayer->extent() );
|
||||||
double initMinVal = dynamic_cast<QgsMultiBandColorRenderer*>( mpLandsatRasterLayer->renderer() )->redContrastEnhancement()->minimumValue();
|
double initMinVal = static_cast<QgsMultiBandColorRenderer*>( mpLandsatRasterLayer->renderer() )->redContrastEnhancement()->minimumValue();
|
||||||
|
|
||||||
// Should do nothing
|
// Should do nothing
|
||||||
QgsRectangle newExtent = QgsRectangle( 785000, 3340000, 785100, 3340100 );
|
QgsRectangle newExtent = QgsRectangle( 785000, 3340000, 785100, 3340100 );
|
||||||
mpLandsatRasterLayer->refreshRendererIfNeeded( mpLandsatRasterLayer->renderer(), newExtent );
|
mpLandsatRasterLayer->refreshRendererIfNeeded( mpLandsatRasterLayer->renderer(), newExtent );
|
||||||
QCOMPARE( mpLandsatRasterLayer->renderer()->minMaxOrigin().limits(), QgsRasterMinMaxOrigin::MinMax );
|
QCOMPARE( mpLandsatRasterLayer->renderer()->minMaxOrigin().limits(), QgsRasterMinMaxOrigin::MinMax );
|
||||||
double minVal = dynamic_cast<QgsMultiBandColorRenderer*>( mpLandsatRasterLayer->renderer() )->redContrastEnhancement()->minimumValue();
|
double minVal = static_cast<QgsMultiBandColorRenderer*>( mpLandsatRasterLayer->renderer() )->redContrastEnhancement()->minimumValue();
|
||||||
QGSCOMPARENEAR( initMinVal, minVal, 1e-5 );
|
QGSCOMPARENEAR( initMinVal, minVal, 1e-5 );
|
||||||
|
|
||||||
// Change to UpdatedCanvas
|
// Change to UpdatedCanvas
|
||||||
@ -719,7 +720,7 @@ void TestQgsRasterLayer::testRefreshRendererIfNeeded()
|
|||||||
mpLandsatRasterLayer->renderer()->setMinMaxOrigin( mmo );
|
mpLandsatRasterLayer->renderer()->setMinMaxOrigin( mmo );
|
||||||
QCOMPARE( mpLandsatRasterLayer->renderer()->minMaxOrigin().extent(), QgsRasterMinMaxOrigin::UpdatedCanvas );
|
QCOMPARE( mpLandsatRasterLayer->renderer()->minMaxOrigin().extent(), QgsRasterMinMaxOrigin::UpdatedCanvas );
|
||||||
mpLandsatRasterLayer->refreshRendererIfNeeded( mpLandsatRasterLayer->renderer(), newExtent );
|
mpLandsatRasterLayer->refreshRendererIfNeeded( mpLandsatRasterLayer->renderer(), newExtent );
|
||||||
double newMinVal = dynamic_cast<QgsMultiBandColorRenderer*>( mpLandsatRasterLayer->renderer() )->redContrastEnhancement()->minimumValue();
|
double newMinVal = static_cast<QgsMultiBandColorRenderer*>( mpLandsatRasterLayer->renderer() )->redContrastEnhancement()->minimumValue();
|
||||||
QGSCOMPARENOTNEAR( initMinVal, newMinVal, 1e-5 );
|
QGSCOMPARENOTNEAR( initMinVal, newMinVal, 1e-5 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user