Skip to content

Commit 50e5414

Browse files
committed
Coding style and SIP_DEPRECATED
1 parent 1672d43 commit 50e5414

File tree

4 files changed

+4
-5
lines changed

4 files changed

+4
-5
lines changed

python/analysis/auto_generated/raster/qgsrastercalculator.sip.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Represents an individual raster layer/band number entry within a raster calculat
2727
%Docstring
2828
Creates a list of raster entries from the current project.
2929

30-
If there are more than one layers with the same data source
30+
If there is more than one layer with the same data source
3131
only one of them is added to the list, duplicate names are
3232
also handled by appending an _n integer to the base name.
3333

src/analysis/raster/qgsrastercalculator.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -386,10 +386,9 @@ QVector<QgsRasterCalculatorEntry> QgsRasterCalculatorEntry::rasterEntries()
386386
QMap<QString, QgsMapLayer *>::const_iterator layerIt = layers.constBegin();
387387
for ( ; layerIt != layers.constEnd(); ++layerIt )
388388
{
389-
QgsRasterLayer *rlayer = dynamic_cast<QgsRasterLayer *>( layerIt.value() );
389+
QgsRasterLayer *rlayer = qobject_cast<QgsRasterLayer *>( layerIt.value() );
390390
if ( rlayer && rlayer->dataProvider() && rlayer->dataProvider()->name() == QLatin1String( "gdal" ) )
391391
{
392-
393392
//get number of bands
394393
for ( int i = 0; i < rlayer->bandCount(); ++i )
395394
{

src/analysis/raster/qgsrastercalculator.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class ANALYSIS_EXPORT QgsRasterCalculatorEntry
4343
/**
4444
* Creates a list of raster entries from the current project.
4545
*
46-
* If there are more than one layers with the same data source
46+
* If there is more than one layer with the same data source
4747
* only one of them is added to the list, duplicate names are
4848
* also handled by appending an _n integer to the base name.
4949
*

src/app/qgsrastercalcdialog.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class APP_EXPORT QgsRasterCalcDialog: public QDialog, private Ui::QgsRasterCalcD
5555
* \return a vector of raster entries from the current project
5656
* \deprecated since QGIS 3.6 use QgsRasterCalculatorEntry::rasterEntries() instead
5757
*/
58-
Q_DECL_DEPRECATED QVector<QgsRasterCalculatorEntry> rasterEntries() const;
58+
Q_DECL_DEPRECATED QVector<QgsRasterCalculatorEntry> rasterEntries() const SIP_DEPRECATED;
5959

6060
private slots:
6161
void mRasterBandsListWidget_itemDoubleClicked( QListWidgetItem *item );

0 commit comments

Comments
 (0)