diff --git a/python/analysis/auto_generated/raster/qgsrastercalculator.sip.in b/python/analysis/auto_generated/raster/qgsrastercalculator.sip.in index f2d82bef5a2..845a253a07f 100644 --- a/python/analysis/auto_generated/raster/qgsrastercalculator.sip.in +++ b/python/analysis/auto_generated/raster/qgsrastercalculator.sip.in @@ -27,7 +27,7 @@ Represents an individual raster layer/band number entry within a raster calculat %Docstring Creates a list of raster entries from the current project. -If there are more than one layers with the same data source +If there is more than one layer with the same data source only one of them is added to the list, duplicate names are also handled by appending an _n integer to the base name. diff --git a/src/analysis/raster/qgsrastercalculator.cpp b/src/analysis/raster/qgsrastercalculator.cpp index 1f73d6fd438..6039f5e72ba 100644 --- a/src/analysis/raster/qgsrastercalculator.cpp +++ b/src/analysis/raster/qgsrastercalculator.cpp @@ -386,10 +386,9 @@ QVector QgsRasterCalculatorEntry::rasterEntries() QMap::const_iterator layerIt = layers.constBegin(); for ( ; layerIt != layers.constEnd(); ++layerIt ) { - QgsRasterLayer *rlayer = dynamic_cast( layerIt.value() ); + QgsRasterLayer *rlayer = qobject_cast( layerIt.value() ); if ( rlayer && rlayer->dataProvider() && rlayer->dataProvider()->name() == QLatin1String( "gdal" ) ) { - //get number of bands for ( int i = 0; i < rlayer->bandCount(); ++i ) { diff --git a/src/analysis/raster/qgsrastercalculator.h b/src/analysis/raster/qgsrastercalculator.h index cc4136e6294..546365f0e9a 100644 --- a/src/analysis/raster/qgsrastercalculator.h +++ b/src/analysis/raster/qgsrastercalculator.h @@ -43,7 +43,7 @@ class ANALYSIS_EXPORT QgsRasterCalculatorEntry /** * Creates a list of raster entries from the current project. * - * If there are more than one layers with the same data source + * If there is more than one layer with the same data source * only one of them is added to the list, duplicate names are * also handled by appending an _n integer to the base name. * diff --git a/src/app/qgsrastercalcdialog.h b/src/app/qgsrastercalcdialog.h index 09111983c3e..02ca756c3df 100644 --- a/src/app/qgsrastercalcdialog.h +++ b/src/app/qgsrastercalcdialog.h @@ -55,7 +55,7 @@ class APP_EXPORT QgsRasterCalcDialog: public QDialog, private Ui::QgsRasterCalcD * \return a vector of raster entries from the current project * \deprecated since QGIS 3.6 use QgsRasterCalculatorEntry::rasterEntries() instead */ - Q_DECL_DEPRECATED QVector rasterEntries() const; + Q_DECL_DEPRECATED QVector rasterEntries() const SIP_DEPRECATED; private slots: void mRasterBandsListWidget_itemDoubleClicked( QListWidgetItem *item );