Skip to content

Commit

Permalink
Use "auto" for std::unique_ptr<X> = std::make_unique<X>
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Feb 7, 2025
1 parent 55288fe commit 038036d
Show file tree
Hide file tree
Showing 500 changed files with 1,880 additions and 1,872 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ The multipoint Z and M type will be set based on the type of the first point in
break;
}

std::unique_ptr< QgsPoint > point = std::make_unique< QgsPoint >( x, y );
auto point = std::make_unique< QgsPoint >( x, y );
if ( elementSize > 2 )
{
element = PySequence_GetItem( value, 2 );
Expand Down
2 changes: 1 addition & 1 deletion python/PyQt6/core/auto_generated/qgsfeatureiterator.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ Wrapper for iterator of features from vector data provider or vector layer

SIP_PYOBJECT __next__() /TypeHint="QgsFeature"/;
%MethodCode
std::unique_ptr< QgsFeature > f = std::make_unique< QgsFeature >();
auto f = std::make_unique< QgsFeature >();
bool result = false;
Py_BEGIN_ALLOW_THREADS
result = ( sipCpp->nextFeature( *f ) );
Expand Down
2 changes: 1 addition & 1 deletion python/PyQt6/core/auto_generated/qgsspatialindex.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ Geometry is only stored if the QgsSpatialIndex was created with the FlagStoreFea
.. versionadded:: 3.6
%End
%MethodCode
std::unique_ptr< QgsGeometry > g = std::make_unique< QgsGeometry >( sipCpp->geometry( a0 ) );
auto g = std::make_unique< QgsGeometry >( sipCpp->geometry( a0 ) );
if ( g->isNull() )
{
PyErr_SetString( PyExc_KeyError, QStringLiteral( "No geometry with feature id %1 exists in the index." ).arg( a0 ).toUtf8().constData() );
Expand Down
2 changes: 1 addition & 1 deletion python/core/auto_generated/geometry/qgsmultipoint.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ The multipoint Z and M type will be set based on the type of the first point in
break;
}

std::unique_ptr< QgsPoint > point = std::make_unique< QgsPoint >( x, y );
auto point = std::make_unique< QgsPoint >( x, y );
if ( elementSize > 2 )
{
element = PySequence_GetItem( value, 2 );
Expand Down
2 changes: 1 addition & 1 deletion python/core/auto_generated/qgsfeatureiterator.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ Wrapper for iterator of features from vector data provider or vector layer

SIP_PYOBJECT __next__() /TypeHint="QgsFeature"/;
%MethodCode
std::unique_ptr< QgsFeature > f = std::make_unique< QgsFeature >();
auto f = std::make_unique< QgsFeature >();
bool result = false;
Py_BEGIN_ALLOW_THREADS
result = ( sipCpp->nextFeature( *f ) );
Expand Down
2 changes: 1 addition & 1 deletion python/core/auto_generated/qgsspatialindex.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ Geometry is only stored if the QgsSpatialIndex was created with the FlagStoreFea
.. versionadded:: 3.6
%End
%MethodCode
std::unique_ptr< QgsGeometry > g = std::make_unique< QgsGeometry >( sipCpp->geometry( a0 ) );
auto g = std::make_unique< QgsGeometry >( sipCpp->geometry( a0 ) );
if ( g->isNull() )
{
PyErr_SetString( PyExc_KeyError, QStringLiteral( "No geometry with feature id %1 exists in the index." ).arg( a0 ).toUtf8().constData() );
Expand Down
8 changes: 8 additions & 0 deletions scripts/qstringfixup.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@
r"""(.*)(.startsWith\(|.endsWith\(|.indexOf\(|.lastIndexOf\(|\+=) QLatin1String\( ("[^"]") \)(.*)"""
)

make_unique = re.compile(
r"""^(\s*)std::unique_ptr<\s*(.*?)\s*>(\s*.*?\s*=\s*std::make_unique<\s*(.*?)\s*>.*)$"""
)


def qlatin1char_or_string(x):
"""x is a double quoted string"""
Expand Down Expand Up @@ -225,5 +229,9 @@ def qlatin1char_or_string(x):
else:
break

m = make_unique.match(line)
if m and m.group(2) == m.group(4):
line = m.group(1) + "auto" + m.group(3)

print(line)
i += 1
2 changes: 1 addition & 1 deletion src/3d/mesh/qgsmesh3dmaterial_p.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ void QgsMesh3DMaterial::configureArrows( QgsMeshLayer *layer, const QgsDateTimeR
QVector<QgsVector> vectors( 1 );
QSize gridSize( 1, 1 );
QgsPointXY minCorner;
std::unique_ptr<Qt3DRender::QParameter> arrowsEnabledParameter = std::make_unique<Qt3DRender::QParameter>( "arrowsEnabled", nullptr );
auto arrowsEnabledParameter = std::make_unique<Qt3DRender::QParameter>( "arrowsEnabled", nullptr );
if ( !layer || mMagnitudeType != MagnitudeType::ScalarDataSet || !mSymbol->arrowsEnabled() || meta.isScalar() || !datasetIndex.isValid() )
arrowsEnabledParameter->setValue( false );
else
Expand Down
6 changes: 3 additions & 3 deletions src/3d/qgs3dmapsettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ void Qgs3DMapSettings::readXml( const QDomElement &elem, const QgsReadWriteConte
QDomElement elemPointLight = elemPointLights.firstChildElement( QStringLiteral( "point-light" ) );
while ( !elemPointLight.isNull() )
{
std::unique_ptr<QgsPointLightSettings> pointLight = std::make_unique<QgsPointLightSettings>();
auto pointLight = std::make_unique<QgsPointLightSettings>();
pointLight->readXml( elemPointLight, context );
mLightSources << pointLight.release();
elemPointLight = elemPointLight.nextSiblingElement( QStringLiteral( "point-light" ) );
Expand All @@ -209,7 +209,7 @@ void Qgs3DMapSettings::readXml( const QDomElement &elem, const QgsReadWriteConte
else
{
// QGIS <= 3.4 did not have light configuration
std::unique_ptr<QgsPointLightSettings> defaultLight = std::make_unique<QgsPointLightSettings>();
auto defaultLight = std::make_unique<QgsPointLightSettings>();
defaultLight->setPosition( QgsVector3D( 0, 1000, 0 ) );
mLightSources << defaultLight.release();
}
Expand All @@ -220,7 +220,7 @@ void Qgs3DMapSettings::readXml( const QDomElement &elem, const QgsReadWriteConte
QDomElement elemDirectionalLight = elemDirectionalLights.firstChildElement( QStringLiteral( "directional-light" ) );
while ( !elemDirectionalLight.isNull() )
{
std::unique_ptr<QgsDirectionalLightSettings> directionalLight = std::make_unique<QgsDirectionalLightSettings>();
auto directionalLight = std::make_unique<QgsDirectionalLightSettings>();
directionalLight->readXml( elemDirectionalLight, context );
mLightSources << directionalLight.release();
elemDirectionalLight = elemDirectionalLight.nextSiblingElement( QStringLiteral( "directional-light" ) );
Expand Down
2 changes: 1 addition & 1 deletion src/3d/qgs3dutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,7 @@ std::unique_ptr<QgsPointCloudLayer3DRenderer> Qgs3DUtils::convert2DPointCloudRen

if ( symbol3D )
{
std::unique_ptr<QgsPointCloudLayer3DRenderer> renderer3D = std::make_unique<QgsPointCloudLayer3DRenderer>();
auto renderer3D = std::make_unique<QgsPointCloudLayer3DRenderer>();
renderer3D->setSymbol( symbol3D.release() );
return renderer3D;
}
Expand Down
2 changes: 1 addition & 1 deletion src/3d/symbols/qgsline3dsymbol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ QgsLine3DSymbol::~QgsLine3DSymbol() = default;

QgsAbstract3DSymbol *QgsLine3DSymbol::clone() const
{
std::unique_ptr<QgsLine3DSymbol> result = std::make_unique<QgsLine3DSymbol>();
auto result = std::make_unique<QgsLine3DSymbol>();
result->mAltClamping = mAltClamping;
result->mAltBinding = mAltBinding;
result->mWidth = mWidth;
Expand Down
2 changes: 1 addition & 1 deletion src/3d/symbols/qgsmesh3dsymbol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ QgsMesh3DSymbol::~QgsMesh3DSymbol() = default;

QgsMesh3DSymbol *QgsMesh3DSymbol::clone() const
{
std::unique_ptr<QgsMesh3DSymbol> result = std::make_unique<QgsMesh3DSymbol>();
auto result = std::make_unique<QgsMesh3DSymbol>();

result->mAltClamping = mAltClamping;
result->mHeight = mHeight;
Expand Down
2 changes: 1 addition & 1 deletion src/3d/symbols/qgspolygon3dsymbol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ QgsPolygon3DSymbol::~QgsPolygon3DSymbol() = default;

QgsAbstract3DSymbol *QgsPolygon3DSymbol::clone() const
{
std::unique_ptr<QgsPolygon3DSymbol> result = std::make_unique<QgsPolygon3DSymbol>();
auto result = std::make_unique<QgsPolygon3DSymbol>();
result->mAltClamping = mAltClamping;
result->mAltBinding = mAltBinding;
result->mOffset = mOffset;
Expand Down
8 changes: 4 additions & 4 deletions src/3d/terrain/qgs3dterrainregistry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,15 @@ QgsAbstractTerrainSettings *Qgs3DTerrainRegistry::configureTerrainFromProject( Q
{
if ( properties->terrainProvider()->type() == QLatin1String( "flat" ) )
{
std::unique_ptr<QgsFlatTerrainSettings> flatTerrain = std::make_unique<QgsFlatTerrainSettings>();
auto flatTerrain = std::make_unique<QgsFlatTerrainSettings>();
flatTerrain->setElevationOffset( properties->terrainProvider()->offset() );
return flatTerrain.release();
}
else if ( properties->terrainProvider()->type() == QLatin1String( "raster" ) )
{
QgsRasterDemTerrainProvider *rasterProvider = qgis::down_cast<QgsRasterDemTerrainProvider *>( properties->terrainProvider() );

std::unique_ptr<QgsDemTerrainSettings> demTerrain = std::make_unique<QgsDemTerrainSettings>();
auto demTerrain = std::make_unique<QgsDemTerrainSettings>();
demTerrain->setLayer( rasterProvider->layer() );
demTerrain->setElevationOffset( properties->terrainProvider()->offset() );
demTerrain->setVerticalScale( properties->terrainProvider()->scale() );
Expand All @@ -94,15 +94,15 @@ QgsAbstractTerrainSettings *Qgs3DTerrainRegistry::configureTerrainFromProject( Q
{
QgsMeshTerrainProvider *meshProvider = qgis::down_cast<QgsMeshTerrainProvider *>( properties->terrainProvider() );

std::unique_ptr<QgsMeshTerrainSettings> meshTerrain = std::make_unique<QgsMeshTerrainSettings>();
auto meshTerrain = std::make_unique<QgsMeshTerrainSettings>();
meshTerrain->setLayer( meshProvider->layer() );
meshTerrain->setElevationOffset( properties->terrainProvider()->offset() );
meshTerrain->setVerticalScale( properties->terrainProvider()->scale() );
return meshTerrain.release();
}
else
{
std::unique_ptr<QgsFlatTerrainSettings> flatTerrain = std::make_unique<QgsFlatTerrainSettings>();
auto flatTerrain = std::make_unique<QgsFlatTerrainSettings>();
return flatTerrain.release();
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/3d/terrain/qgsdemterrainsettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ bool QgsDemTerrainSettings::equals( const QgsAbstractTerrainSettings *other ) co

std::unique_ptr<QgsTerrainGenerator> QgsDemTerrainSettings::createTerrainGenerator( const Qgs3DRenderContext &context ) const
{
std::unique_ptr<QgsDemTerrainGenerator> generator = std::make_unique<QgsDemTerrainGenerator>();
auto generator = std::make_unique<QgsDemTerrainGenerator>();
generator->setCrs( context.crs(), context.transformContext() );
generator->setExtent( context.extent() );
generator->setLayer( layer() );
Expand Down
2 changes: 1 addition & 1 deletion src/3d/terrain/qgsflatterrainsettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ bool QgsFlatTerrainSettings::equals( const QgsAbstractTerrainSettings *other ) c

std::unique_ptr<QgsTerrainGenerator> QgsFlatTerrainSettings::createTerrainGenerator( const Qgs3DRenderContext &context ) const
{
std::unique_ptr<QgsFlatTerrainGenerator> generator = std::make_unique<QgsFlatTerrainGenerator>();
auto generator = std::make_unique<QgsFlatTerrainGenerator>();
generator->setCrs( context.crs(), context.transformContext() );
generator->setExtent( context.extent() );
return generator;
Expand Down
4 changes: 2 additions & 2 deletions src/3d/terrain/qgsmeshterrainsettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ QgsMeshTerrainSettings::~QgsMeshTerrainSettings() = default;

QgsMeshTerrainSettings *QgsMeshTerrainSettings::clone() const
{
std::unique_ptr<QgsMeshTerrainSettings> cloned = std::make_unique<QgsMeshTerrainSettings>();
auto cloned = std::make_unique<QgsMeshTerrainSettings>();
cloned->mSymbol.reset( mSymbol->clone() );
cloned->mLayer = mLayer;
cloned->copyCommonProperties( this );
Expand Down Expand Up @@ -97,7 +97,7 @@ bool QgsMeshTerrainSettings::equals( const QgsAbstractTerrainSettings *other ) c

std::unique_ptr<QgsTerrainGenerator> QgsMeshTerrainSettings::createTerrainGenerator( const Qgs3DRenderContext &context ) const
{
std::unique_ptr<QgsMeshTerrainGenerator> generator = std::make_unique<QgsMeshTerrainGenerator>();
auto generator = std::make_unique<QgsMeshTerrainGenerator>();
generator->setLayer( layer() );
std::unique_ptr<QgsMesh3DSymbol> symbol( mSymbol->clone() );
symbol->setVerticalScale( verticalScale() );
Expand Down
2 changes: 1 addition & 1 deletion src/3d/terrain/qgsonlinedemterrainsettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ bool QgsOnlineDemTerrainSettings::equals( const QgsAbstractTerrainSettings *othe

std::unique_ptr<QgsTerrainGenerator> QgsOnlineDemTerrainSettings::createTerrainGenerator( const Qgs3DRenderContext &context ) const
{
std::unique_ptr<QgsOnlineTerrainGenerator> generator = std::make_unique<QgsOnlineTerrainGenerator>();
auto generator = std::make_unique<QgsOnlineTerrainGenerator>();
generator->setResolution( mResolution );
generator->setSkirtHeight( static_cast<float>( mSkirtHeight ) );
generator->setCrs( context.crs(), context.transformContext() );
Expand Down
2 changes: 1 addition & 1 deletion src/3d/terrain/qgsquantizedmeshterrainsettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ bool QgsQuantizedMeshTerrainSettings::equals( const QgsAbstractTerrainSettings *

std::unique_ptr<QgsTerrainGenerator> QgsQuantizedMeshTerrainSettings::createTerrainGenerator( const Qgs3DRenderContext &context ) const
{
std::unique_ptr<QgsQuantizedMeshTerrainGenerator> generator = std::make_unique<QgsQuantizedMeshTerrainGenerator>();
auto generator = std::make_unique<QgsQuantizedMeshTerrainGenerator>();
generator->setLayer( layer() );
generator->setCrs( context.crs(), context.transformContext() );
generator->setExtent( context.extent() );
Expand Down
8 changes: 4 additions & 4 deletions src/analysis/georeferencing/qgsgcptransformer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ bool QgsLinearGeorefTransform::getOriginScale( QgsPointXY &origin, double &scale

QgsGcpTransformerInterface *QgsLinearGeorefTransform::clone() const
{
std::unique_ptr<QgsLinearGeorefTransform> res = std::make_unique<QgsLinearGeorefTransform>();
auto res = std::make_unique<QgsLinearGeorefTransform>();
res->mParameters = mParameters;
return res.release();
}
Expand Down Expand Up @@ -234,7 +234,7 @@ bool QgsHelmertGeorefTransform::getOriginScaleRotation( QgsPointXY &origin, doub

QgsGcpTransformerInterface *QgsHelmertGeorefTransform::clone() const
{
std::unique_ptr<QgsHelmertGeorefTransform> res = std::make_unique<QgsHelmertGeorefTransform>();
auto res = std::make_unique<QgsHelmertGeorefTransform>();
res->mHelmertParameters = mHelmertParameters;
return res.release();
}
Expand Down Expand Up @@ -329,7 +329,7 @@ QgsGDALGeorefTransform::~QgsGDALGeorefTransform()

QgsGcpTransformerInterface *QgsGDALGeorefTransform::clone() const
{
std::unique_ptr<QgsGDALGeorefTransform> res = std::make_unique<QgsGDALGeorefTransform>( mIsTPSTransform, mPolynomialOrder );
auto res = std::make_unique<QgsGDALGeorefTransform>( mIsTPSTransform, mPolynomialOrder );
res->updateParametersFromGcps( mSourceCoords, mDestCoordinates, mInvertYAxis );
return res.release();
}
Expand Down Expand Up @@ -436,7 +436,7 @@ QgsProjectiveGeorefTransform::QgsProjectiveGeorefTransform()

QgsGcpTransformerInterface *QgsProjectiveGeorefTransform::clone() const
{
std::unique_ptr<QgsProjectiveGeorefTransform> res = std::make_unique<QgsProjectiveGeorefTransform>();
auto res = std::make_unique<QgsProjectiveGeorefTransform>();
res->mParameters = mParameters;
return res.release();
}
Expand Down
2 changes: 1 addition & 1 deletion src/analysis/interpolation/qgsgridfilewriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ int QgsGridFileWriter::writeFile( QgsFeedback *feedback )
QgsInterpolator::LayerData ld = mInterpolator->layerData().at( 0 );
const QgsCoordinateReferenceSystem crs = ld.source->sourceCrs();

std::unique_ptr<QgsRasterFileWriter> writer = std::make_unique<QgsRasterFileWriter>( mOutputFilePath );
auto writer = std::make_unique<QgsRasterFileWriter>( mOutputFilePath );
writer->setOutputProviderKey( QStringLiteral( "gdal" ) );
writer->setOutputFormat( outputFormat );

Expand Down
8 changes: 4 additions & 4 deletions src/analysis/mesh/qgsmeshcontours.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ QgsGeometry QgsMeshContours::exportPolygons( double min_value, double max_value,
{
QVector<QgsMeshVertex> ring = coords;
ring.push_back( coords[0] );
std::unique_ptr<QgsLineString> ext = std::make_unique<QgsLineString>( coords );
std::unique_ptr<QgsPolygon> poly = std::make_unique<QgsPolygon>();
auto ext = std::make_unique<QgsLineString>( coords );
auto poly = std::make_unique<QgsPolygon>();
poly->setExteriorRing( ext.release() );
multiPolygon.push_back( QgsGeometry( std::move( poly ) ) );
continue;
Expand Down Expand Up @@ -236,8 +236,8 @@ QgsGeometry QgsMeshContours::exportPolygons( double min_value, double max_value,
// add if the polygon is not degraded
if ( ring.size() > 2 )
{
std::unique_ptr<QgsLineString> ext = std::make_unique<QgsLineString>( ring );
std::unique_ptr<QgsPolygon> poly = std::make_unique<QgsPolygon>();
auto ext = std::make_unique<QgsLineString>( ring );
auto poly = std::make_unique<QgsPolygon>();
poly->setExteriorRing( ext.release() );
multiPolygon.push_back( QgsGeometry( std::move( poly ) ) );
}
Expand Down
4 changes: 2 additions & 2 deletions src/analysis/processing/pdal/qgsalgorithmpdaldensity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ void QgsPdalDensityAlgorithm::initAlgorithm( const QVariantMap & )

createCommonParameters();

std::unique_ptr<QgsProcessingParameterNumber> paramOriginX = std::make_unique<QgsProcessingParameterNumber>( QStringLiteral( "ORIGIN_X" ), QObject::tr( "X origin of a tile for parallel runs" ), Qgis::ProcessingNumberParameterType::Double, QVariant(), true, 0 );
auto paramOriginX = std::make_unique<QgsProcessingParameterNumber>( QStringLiteral( "ORIGIN_X" ), QObject::tr( "X origin of a tile for parallel runs" ), Qgis::ProcessingNumberParameterType::Double, QVariant(), true, 0 );
paramOriginX->setFlags( paramOriginX->flags() | Qgis::ProcessingParameterFlag::Advanced );
addParameter( paramOriginX.release() );
std::unique_ptr<QgsProcessingParameterNumber> paramOriginY = std::make_unique<QgsProcessingParameterNumber>( QStringLiteral( "ORIGIN_Y" ), QObject::tr( "Y origin of a tile for parallel runs" ), Qgis::ProcessingNumberParameterType::Integer, QVariant(), true, 0 );
auto paramOriginY = std::make_unique<QgsProcessingParameterNumber>( QStringLiteral( "ORIGIN_Y" ), QObject::tr( "Y origin of a tile for parallel runs" ), Qgis::ProcessingNumberParameterType::Integer, QVariant(), true, 0 );
paramOriginY->setFlags( paramOriginY->flags() | Qgis::ProcessingParameterFlag::Advanced );
addParameter( paramOriginY.release() );

Expand Down
4 changes: 2 additions & 2 deletions src/analysis/processing/pdal/qgsalgorithmpdalexportraster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ void QgsPdalExportRasterAlgorithm::initAlgorithm( const QVariantMap & )

createCommonParameters();

std::unique_ptr<QgsProcessingParameterNumber> paramOriginX = std::make_unique<QgsProcessingParameterNumber>( QStringLiteral( "ORIGIN_X" ), QObject::tr( "X origin of a tile for parallel runs" ), Qgis::ProcessingNumberParameterType::Double, QVariant(), true, 0 );
auto paramOriginX = std::make_unique<QgsProcessingParameterNumber>( QStringLiteral( "ORIGIN_X" ), QObject::tr( "X origin of a tile for parallel runs" ), Qgis::ProcessingNumberParameterType::Double, QVariant(), true, 0 );
paramOriginX->setFlags( paramOriginX->flags() | Qgis::ProcessingParameterFlag::Advanced );
addParameter( paramOriginX.release() );
std::unique_ptr<QgsProcessingParameterNumber> paramOriginY = std::make_unique<QgsProcessingParameterNumber>( QStringLiteral( "ORIGIN_Y" ), QObject::tr( "Y origin of a tile for parallel runs" ), Qgis::ProcessingNumberParameterType::Integer, QVariant(), true, 0 );
auto paramOriginY = std::make_unique<QgsProcessingParameterNumber>( QStringLiteral( "ORIGIN_Y" ), QObject::tr( "Y origin of a tile for parallel runs" ), Qgis::ProcessingNumberParameterType::Integer, QVariant(), true, 0 );
paramOriginY->setFlags( paramOriginY->flags() | Qgis::ProcessingParameterFlag::Advanced );
addParameter( paramOriginY.release() );

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ void QgsPdalExportRasterTinAlgorithm::initAlgorithm( const QVariantMap & )

createCommonParameters();

std::unique_ptr<QgsProcessingParameterNumber> paramOriginX = std::make_unique<QgsProcessingParameterNumber>( QStringLiteral( "ORIGIN_X" ), QObject::tr( "X origin of a tile for parallel runs" ), Qgis::ProcessingNumberParameterType::Double, QVariant(), true, 0 );
auto paramOriginX = std::make_unique<QgsProcessingParameterNumber>( QStringLiteral( "ORIGIN_X" ), QObject::tr( "X origin of a tile for parallel runs" ), Qgis::ProcessingNumberParameterType::Double, QVariant(), true, 0 );
paramOriginX->setFlags( paramOriginX->flags() | Qgis::ProcessingParameterFlag::Advanced );
addParameter( paramOriginX.release() );
std::unique_ptr<QgsProcessingParameterNumber> paramOriginY = std::make_unique<QgsProcessingParameterNumber>( QStringLiteral( "ORIGIN_Y" ), QObject::tr( "Y origin of a tile for parallel runs" ), Qgis::ProcessingNumberParameterType::Integer, QVariant(), true, 0 );
auto paramOriginY = std::make_unique<QgsProcessingParameterNumber>( QStringLiteral( "ORIGIN_Y" ), QObject::tr( "Y origin of a tile for parallel runs" ), Qgis::ProcessingNumberParameterType::Integer, QVariant(), true, 0 );
paramOriginY->setFlags( paramOriginY->flags() | Qgis::ProcessingParameterFlag::Advanced );
addParameter( paramOriginY.release() );

Expand Down
Loading

0 comments on commit 038036d

Please sign in to comment.