mirror of
https://github.com/qgis/QGIS.git
synced 2025-12-04 00:06:46 -05:00
Apply suggestions from code review
This commit is contained in:
parent
3c1f510115
commit
8793e659a1
@ -90,7 +90,7 @@ class RasterCalculator(QgisAlgorithm):
|
||||
self.addParameter(QgsProcessingParameterRasterDestination(self.OUTPUT, self.tr('Output')))
|
||||
|
||||
def flags(self):
|
||||
return super().flags() | QgsProcessingAlgorithm.FlagDeprecated | QgsProcessingAlgorithm.FlagNotAvailableInStandaloneTool
|
||||
return super().flags() | QgsProcessingAlgorithm.FlagDeprecated
|
||||
|
||||
def name(self):
|
||||
return 'rastercalculator'
|
||||
|
||||
@ -132,7 +132,7 @@ QVariantMap QgsRasterCalculatorAlgorithm::processAlgorithm( const QVariantMap &p
|
||||
QVector< QgsRasterCalculatorEntry > entries;
|
||||
for ( QgsMapLayer *layer : mLayers )
|
||||
{
|
||||
QgsRasterLayer *rLayer = static_cast<QgsRasterLayer *>( layer );
|
||||
QgsRasterLayer *rLayer = qobject_cast<QgsRasterLayer *>( layer );
|
||||
if ( !rLayer )
|
||||
{
|
||||
continue;
|
||||
@ -271,7 +271,7 @@ QVariantMap QgsRasterCalculatorModelerAlgorithm::processAlgorithm( const QVarian
|
||||
int n = 0;
|
||||
for ( QgsMapLayer *layer : mLayers )
|
||||
{
|
||||
QgsRasterLayer *rLayer = static_cast<QgsRasterLayer *>( layer );
|
||||
QgsRasterLayer *rLayer = qobject_cast<QgsRasterLayer *>( layer );
|
||||
if ( !rLayer )
|
||||
{
|
||||
continue;
|
||||
|
||||
@ -112,7 +112,7 @@ QVariantMap QgsVirtualRasterCalculatorAlgorithm::processAlgorithm( const QVarian
|
||||
|
||||
for ( const QgsMapLayer *layer : layers )
|
||||
{
|
||||
const QgsRasterLayer *rLayer = static_cast<const QgsRasterLayer *>( layer );
|
||||
const QgsRasterLayer *rLayer = qobject_cast<const QgsRasterLayer *>( layer );
|
||||
if ( !rLayer )
|
||||
{
|
||||
continue;
|
||||
@ -251,7 +251,7 @@ QVariantMap QgsVirtualRasterCalculatorModelerAlgorithm::processAlgorithm( const
|
||||
int n = 0;
|
||||
for ( const QgsMapLayer *layer : layers )
|
||||
{
|
||||
const QgsRasterLayer *rLayer = static_cast<const QgsRasterLayer *>( layer );
|
||||
const QgsRasterLayer *rLayer = qobject_cast<const QgsRasterLayer *>( layer );
|
||||
if ( !rLayer )
|
||||
{
|
||||
continue;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user