Run code_cleanup script

This commit is contained in:
Nyall Dawson 2025-10-01 14:40:55 +10:00
parent e28d12d058
commit 7d31cc1dab
69 changed files with 132 additions and 132 deletions

View File

@ -1161,7 +1161,7 @@ QgsCameraPose Qgs3DUtils::lineSegmentToCameraPose( const QgsVector3D &startPoint
std::unique_ptr<Qt3DRender::QCamera> Qgs3DUtils::copyCamera( Qt3DRender::QCamera *cam )
{
std::unique_ptr<Qt3DRender::QCamera> copy = std::make_unique<Qt3DRender::QCamera>();
auto copy = std::make_unique<Qt3DRender::QCamera>();
copy->setPosition( cam->position() );
copy->setViewCenter( cam->viewCenter() );
copy->setUpVector( cam->upVector() );

View File

@ -296,7 +296,7 @@ QgsPointCloudLayer *QgsPdalAlgorithmBase::parameterAsPointCloudLayer( const QVar
return nullptr;
// if COPC provider, return as it is
if ( layer->dataProvider()->name() == QStringLiteral( "copc" ) )
if ( layer->dataProvider()->name() == QLatin1String( "copc" ) )
{
return layer;
}

View File

@ -94,7 +94,7 @@ void QgsGeometryCheckAngleAlgorithm::initAlgorithm( const QVariantMap &configura
QStringLiteral( "ERRORS" ), QObject::tr( "Small angle errors" ), Qgis::ProcessingSourceType::VectorPoint
) );
std::unique_ptr<QgsProcessingParameterNumber> tolerance = std::make_unique<QgsProcessingParameterNumber>(
auto tolerance = std::make_unique<QgsProcessingParameterNumber>(
QStringLiteral( "TOLERANCE" ), QObject::tr( "Tolerance" ), Qgis::ProcessingNumberParameterType::Integer, 8, false, 1, 13
);
tolerance->setFlags( tolerance->flags() | Qgis::ProcessingParameterFlag::Advanced );

View File

@ -97,7 +97,7 @@ void QgsGeometryCheckAreaAlgorithm::initAlgorithm( const QVariantMap &configurat
QStringLiteral( "OUTPUT" ), QObject::tr( "Small polygons features" ), Qgis::ProcessingSourceType::VectorPolygon, QVariant(), true, false
) );
std::unique_ptr<QgsProcessingParameterNumber> tolerance = std::make_unique<QgsProcessingParameterNumber>(
auto tolerance = std::make_unique<QgsProcessingParameterNumber>(
QStringLiteral( "TOLERANCE" ), QObject::tr( "Tolerance" ), Qgis::ProcessingNumberParameterType::Integer, 8, false, 1, 13
);
tolerance->setFlags( tolerance->flags() | Qgis::ProcessingParameterFlag::Advanced );

View File

@ -98,7 +98,7 @@ void QgsGeometryCheckContainedAlgorithm::initAlgorithm( const QVariantMap &confi
QStringLiteral( "OUTPUT" ), QObject::tr( "Contained features" ), Qgis::ProcessingSourceType::VectorAnyGeometry, QVariant(), true, false
) );
std::unique_ptr<QgsProcessingParameterNumber> tolerance = std::make_unique<QgsProcessingParameterNumber>(
auto tolerance = std::make_unique<QgsProcessingParameterNumber>(
QStringLiteral( "TOLERANCE" ), QObject::tr( "Tolerance" ), Qgis::ProcessingNumberParameterType::Integer, 8, false, 1, 13
);

View File

@ -88,7 +88,7 @@ void QgsGeometryCheckDangleAlgorithm::initAlgorithm( const QVariantMap &configur
QStringLiteral( "OUTPUT" ), QObject::tr( "Dangle-end features" ), Qgis::ProcessingSourceType::VectorLine, QVariant(), true, false
) );
std::unique_ptr<QgsProcessingParameterNumber> tolerance = std::make_unique<QgsProcessingParameterNumber>(
auto tolerance = std::make_unique<QgsProcessingParameterNumber>(
QStringLiteral( "TOLERANCE" ), QObject::tr( "Tolerance" ), Qgis::ProcessingNumberParameterType::Integer, 8, false, 1, 13
);
tolerance->setFlags( tolerance->flags() | Qgis::ProcessingParameterFlag::Advanced );

View File

@ -87,7 +87,7 @@ void QgsGeometryCheckDegeneratePolygonAlgorithm::initAlgorithm( const QVariantMa
QStringLiteral( "OUTPUT" ), QObject::tr( "Degenerate polygons features" ), Qgis::ProcessingSourceType::VectorPolygon, QVariant(), true, false
) );
std::unique_ptr<QgsProcessingParameterNumber> tolerance = std::make_unique<QgsProcessingParameterNumber>( QStringLiteral( "TOLERANCE" ), QObject::tr( "Tolerance" ), Qgis::ProcessingNumberParameterType::Integer, 8, false, 1, 13 );
auto tolerance = std::make_unique<QgsProcessingParameterNumber>( QStringLiteral( "TOLERANCE" ), QObject::tr( "Tolerance" ), Qgis::ProcessingNumberParameterType::Integer, 8, false, 1, 13 );
tolerance->setFlags( tolerance->flags() | Qgis::ProcessingParameterFlag::Advanced );
tolerance->setHelp( QObject::tr( "The \"Tolerance\" advanced parameter defines the numerical precision of geometric operations, "
"given as an integer n, meaning that any difference smaller than 10⁻ⁿ (in map units) is considered zero." ) );

View File

@ -94,7 +94,7 @@ void QgsGeometryCheckDuplicateAlgorithm::initAlgorithm( const QVariantMap &confi
QStringLiteral( "OUTPUT" ), QObject::tr( "Duplicate geometries" ), Qgis::ProcessingSourceType::VectorAnyGeometry, QVariant(), true, false
) );
std::unique_ptr<QgsProcessingParameterNumber> tolerance = std::make_unique<QgsProcessingParameterNumber>(
auto tolerance = std::make_unique<QgsProcessingParameterNumber>(
QStringLiteral( "TOLERANCE" ), QObject::tr( "Tolerance" ), Qgis::ProcessingNumberParameterType::Integer, 8, false, 1, 13
);
tolerance->setFlags( tolerance->flags() | Qgis::ProcessingParameterFlag::Advanced );

View File

@ -89,7 +89,7 @@ void QgsGeometryCheckDuplicateNodesAlgorithm::initAlgorithm( const QVariantMap &
QStringLiteral( "OUTPUT" ), QObject::tr( "Duplicated vertices features" ), Qgis::ProcessingSourceType::VectorAnyGeometry, QVariant(), true, false
) );
std::unique_ptr<QgsProcessingParameterNumber> tolerance = std::make_unique<QgsProcessingParameterNumber>(
auto tolerance = std::make_unique<QgsProcessingParameterNumber>(
QStringLiteral( "TOLERANCE" ), QObject::tr( "Tolerance" ), Qgis::ProcessingNumberParameterType::Integer, 8, false, 1, 13
);
tolerance->setFlags( tolerance->flags() | Qgis::ProcessingParameterFlag::Advanced );

View File

@ -92,7 +92,7 @@ void QgsGeometryCheckFollowBoundariesAlgorithm::initAlgorithm( const QVariantMap
QStringLiteral( "REF_LAYER" ), QObject::tr( "Reference layer" ), QList<int>() << static_cast<int>( Qgis::ProcessingSourceType::VectorPolygon )
) );
std::unique_ptr<QgsProcessingParameterNumber> tolerance = std::make_unique<QgsProcessingParameterNumber>(
auto tolerance = std::make_unique<QgsProcessingParameterNumber>(
QStringLiteral( "TOLERANCE" ), QObject::tr( "Tolerance" ), Qgis::ProcessingNumberParameterType::Integer, 8, false, 1, 13
);
tolerance->setFlags( tolerance->flags() | Qgis::ProcessingParameterFlag::Advanced );

View File

@ -108,7 +108,7 @@ void QgsGeometryCheckGapAlgorithm::initAlgorithm( const QVariantMap &configurati
QStringLiteral( "OUTPUT" ), QObject::tr( "Gap features" ), Qgis::ProcessingSourceType::VectorPolygon
) );
std::unique_ptr<QgsProcessingParameterNumber> tolerance = std::make_unique<QgsProcessingParameterNumber>(
auto tolerance = std::make_unique<QgsProcessingParameterNumber>(
QStringLiteral( "TOLERANCE" ), QObject::tr( "Tolerance" ), Qgis::ProcessingNumberParameterType::Integer, 8, false, 1, 13
);
tolerance->setFlags( tolerance->flags() | Qgis::ProcessingParameterFlag::Advanced );

View File

@ -94,7 +94,7 @@ void QgsGeometryCheckHoleAlgorithm::initAlgorithm( const QVariantMap &configurat
QStringLiteral( "OUTPUT" ), QObject::tr( "Polygons with holes" ), Qgis::ProcessingSourceType::VectorPolygon, QVariant(), true, false
) );
std::unique_ptr<QgsProcessingParameterNumber> tolerance = std::make_unique<QgsProcessingParameterNumber>(
auto tolerance = std::make_unique<QgsProcessingParameterNumber>(
QStringLiteral( "TOLERANCE" ), QObject::tr( "Tolerance" ), Qgis::ProcessingNumberParameterType::Integer, 8, false, 1, 13
);
tolerance->setFlags( tolerance->flags() | Qgis::ProcessingParameterFlag::Advanced );

View File

@ -88,7 +88,7 @@ void QgsGeometryCheckLineIntersectionAlgorithm::initAlgorithm( const QVariantMap
QStringLiteral( "OUTPUT" ), QObject::tr( "Intersecting feature" ), Qgis::ProcessingSourceType::VectorAnyGeometry, QVariant(), true, false
) );
std::unique_ptr<QgsProcessingParameterNumber> tolerance = std::make_unique<QgsProcessingParameterNumber>(
auto tolerance = std::make_unique<QgsProcessingParameterNumber>(
QStringLiteral( "TOLERANCE" ), QObject::tr( "Tolerance" ), Qgis::ProcessingNumberParameterType::Integer, 8, false, 1, 13
);
tolerance->setFlags( tolerance->flags() | Qgis::ProcessingParameterFlag::Advanced );

View File

@ -94,7 +94,7 @@ void QgsGeometryCheckLineLayerIntersectionAlgorithm::initAlgorithm( const QVaria
QStringLiteral( "OUTPUT" ), QObject::tr( "Line intersecting other layer features" ), Qgis::ProcessingSourceType::VectorAnyGeometry, QVariant(), true, false
) );
std::unique_ptr<QgsProcessingParameterNumber> tolerance = std::make_unique<QgsProcessingParameterNumber>(
auto tolerance = std::make_unique<QgsProcessingParameterNumber>(
QStringLiteral( "TOLERANCE" ), QObject::tr( "Tolerance" ), Qgis::ProcessingNumberParameterType::Integer, 8, false, 1, 13
);
tolerance->setFlags( tolerance->flags() | Qgis::ProcessingParameterFlag::Advanced );

View File

@ -95,7 +95,7 @@ void QgsGeometryCheckMissingVertexAlgorithm::initAlgorithm( const QVariantMap &c
QStringLiteral( "OUTPUT" ), QObject::tr( "Missing vertices features" ), Qgis::ProcessingSourceType::VectorPolygon, QVariant(), true, false
) );
std::unique_ptr<QgsProcessingParameterNumber> tolerance = std::make_unique<QgsProcessingParameterNumber>(
auto tolerance = std::make_unique<QgsProcessingParameterNumber>(
QStringLiteral( "TOLERANCE" ), QObject::tr( "Tolerance" ), Qgis::ProcessingNumberParameterType::Integer, 8, false, 1, 13
);
tolerance->setFlags( tolerance->flags() | Qgis::ProcessingParameterFlag::Advanced );

View File

@ -93,7 +93,7 @@ void QgsGeometryCheckMultipartAlgorithm::initAlgorithm( const QVariantMap &confi
QStringLiteral( "OUTPUT" ), QObject::tr( "One-part geometry features" ), Qgis::ProcessingSourceType::VectorAnyGeometry, QVariant(), true, false
) );
std::unique_ptr<QgsProcessingParameterNumber> tolerance = std::make_unique<QgsProcessingParameterNumber>(
auto tolerance = std::make_unique<QgsProcessingParameterNumber>(
QStringLiteral( "TOLERANCE" ), QObject::tr( "Tolerance" ), Qgis::ProcessingNumberParameterType::Integer, 8, false, 1, 13
);
tolerance->setFlags( tolerance->flags() | Qgis::ProcessingParameterFlag::Advanced );

View File

@ -92,7 +92,7 @@ void QgsGeometryCheckOverlapAlgorithm::initAlgorithm( const QVariantMap &configu
QStringLiteral( "MIN_OVERLAP_AREA" ), QObject::tr( "Minimum overlap area" ), Qgis::ProcessingNumberParameterType::Double, 0, false, 0.0
) );
std::unique_ptr<QgsProcessingParameterNumber> tolerance = std::make_unique<QgsProcessingParameterNumber>(
auto tolerance = std::make_unique<QgsProcessingParameterNumber>(
QStringLiteral( "TOLERANCE" ), QObject::tr( "Tolerance" ), Qgis::ProcessingNumberParameterType::Integer, 8, false, 1, 13
);
tolerance->setFlags( tolerance->flags() | Qgis::ProcessingParameterFlag::Advanced );

View File

@ -88,7 +88,7 @@ void QgsGeometryCheckPointCoveredByLineAlgorithm::initAlgorithm( const QVariantM
QStringLiteral( "ERRORS" ), QObject::tr( "Points not covered by a line" ), Qgis::ProcessingSourceType::VectorPoint
) );
std::unique_ptr<QgsProcessingParameterNumber> tolerance = std::make_unique<QgsProcessingParameterNumber>(
auto tolerance = std::make_unique<QgsProcessingParameterNumber>(
QStringLiteral( "TOLERANCE" ), QObject::tr( "Tolerance" ), Qgis::ProcessingNumberParameterType::Integer, 8, false, 1, 13
);
tolerance->setFlags( tolerance->flags() | Qgis::ProcessingParameterFlag::Advanced );

View File

@ -88,7 +88,7 @@ void QgsGeometryCheckPointInPolygonAlgorithm::initAlgorithm( const QVariantMap &
QStringLiteral( "ERRORS" ), QObject::tr( "Points outside polygons errors" ), Qgis::ProcessingSourceType::VectorPoint
) );
std::unique_ptr<QgsProcessingParameterNumber> tolerance = std::make_unique<QgsProcessingParameterNumber>(
auto tolerance = std::make_unique<QgsProcessingParameterNumber>(
QStringLiteral( "TOLERANCE" ), QObject::tr( "Tolerance" ), Qgis::ProcessingNumberParameterType::Integer, 8, false, 1, 13
);
tolerance->setFlags( tolerance->flags() | Qgis::ProcessingParameterFlag::Advanced );

View File

@ -93,7 +93,7 @@ void QgsGeometryCheckSegmentLengthAlgorithm::initAlgorithm( const QVariantMap &c
QStringLiteral( "MIN_SEGMENT_LENGTH" ), QObject::tr( "Minimum segment length" ), Qgis::ProcessingNumberParameterType::Double, 0, false, 0.0
) );
std::unique_ptr<QgsProcessingParameterNumber> tolerance = std::make_unique<QgsProcessingParameterNumber>(
auto tolerance = std::make_unique<QgsProcessingParameterNumber>(
QStringLiteral( "TOLERANCE" ), QObject::tr( "Tolerance" ), Qgis::ProcessingNumberParameterType::Integer, 8, false, 1, 13
);
tolerance->setFlags( tolerance->flags() | Qgis::ProcessingParameterFlag::Advanced );

View File

@ -89,7 +89,7 @@ void QgsGeometryCheckSelfContactAlgorithm::initAlgorithm( const QVariantMap &con
QStringLiteral( "OUTPUT" ), QObject::tr( "Self contact features" ), Qgis::ProcessingSourceType::VectorAnyGeometry, QVariant(), true, false
) );
std::unique_ptr<QgsProcessingParameterNumber> tolerance = std::make_unique<QgsProcessingParameterNumber>(
auto tolerance = std::make_unique<QgsProcessingParameterNumber>(
QStringLiteral( "TOLERANCE" ), QObject::tr( "Tolerance" ), Qgis::ProcessingNumberParameterType::Integer, 8, false, 1, 13
);
tolerance->setFlags( tolerance->flags() | Qgis::ProcessingParameterFlag::Advanced );

View File

@ -91,7 +91,7 @@ void QgsGeometryCheckSelfIntersectionAlgorithm::initAlgorithm( const QVariantMap
QStringLiteral( "OUTPUT" ), QObject::tr( "Self-intersecting features" ), Qgis::ProcessingSourceType::VectorAnyGeometry, QVariant(), true, false
) );
std::unique_ptr<QgsProcessingParameterNumber> tolerance = std::make_unique<QgsProcessingParameterNumber>(
auto tolerance = std::make_unique<QgsProcessingParameterNumber>(
QStringLiteral( "TOLERANCE" ), QObject::tr( "Tolerance" ), Qgis::ProcessingNumberParameterType::Integer, 8, false, 1, 13
);
tolerance->setFlags( tolerance->flags() | Qgis::ProcessingParameterFlag::Advanced );

View File

@ -100,7 +100,7 @@ void QgsGeometryCheckSliverPolygonAlgorithm::initAlgorithm( const QVariantMap &c
QStringLiteral( "MAX_AREA" ), QObject::tr( "Maximum area (map units squared)" ), Qgis::ProcessingNumberParameterType::Double, 0, false, 0.0
) );
std::unique_ptr<QgsProcessingParameterNumber> tolerance = std::make_unique<QgsProcessingParameterNumber>(
auto tolerance = std::make_unique<QgsProcessingParameterNumber>(
QStringLiteral( "TOLERANCE" ), QObject::tr( "Tolerance" ), Qgis::ProcessingNumberParameterType::Integer, 8, false, 1, 13
);
tolerance->setFlags( tolerance->flags() | Qgis::ProcessingParameterFlag::Advanced );

View File

@ -196,11 +196,11 @@ QVariantMap QgsClimbAlgorithm::processAlgorithm( const QVariantMap &parameters,
if ( !noGeometry.empty() )
{
feedback->pushInfo( QObject::tr( "The following features do not have geometry: %1" ).arg( noGeometry.join( QStringLiteral( ", " ) ) ) );
feedback->pushInfo( QObject::tr( "The following features do not have geometry: %1" ).arg( noGeometry.join( QLatin1String( ", " ) ) ) );
}
if ( !noZValue.empty() )
{
feedback->pushInfo( QObject::tr( "The following points do not have Z value: %1" ).arg( noZValue.join( QStringLiteral( ", " ) ) ) );
feedback->pushInfo( QObject::tr( "The following points do not have Z value: %1" ).arg( noZValue.join( QLatin1String( ", " ) ) ) );
}
QVariantMap results;

View File

@ -107,7 +107,7 @@ void QgsFixGeometryAngleAlgorithm::initAlgorithm( const QVariantMap &configurati
QStringLiteral( "REPORT" ), QObject::tr( "Report layer from fixing small angles" ), Qgis::ProcessingSourceType::VectorPoint
) );
std::unique_ptr<QgsProcessingParameterNumber> tolerance = std::make_unique<QgsProcessingParameterNumber>(
auto tolerance = std::make_unique<QgsProcessingParameterNumber>(
QStringLiteral( "TOLERANCE" ), QObject::tr( "Tolerance" ), Qgis::ProcessingNumberParameterType::Integer, 8, false, 1, 13
);
tolerance->setFlags( tolerance->flags() | Qgis::ProcessingParameterFlag::Advanced );

View File

@ -120,7 +120,7 @@ void QgsFixGeometryAreaAlgorithm::initAlgorithm( const QVariantMap &configuratio
QStringLiteral( "REPORT" ), QObject::tr( "Report layer from merging small polygons" ), Qgis::ProcessingSourceType::VectorPoint
) );
std::unique_ptr<QgsProcessingParameterNumber> tolerance = std::make_unique<QgsProcessingParameterNumber>(
auto tolerance = std::make_unique<QgsProcessingParameterNumber>(
QStringLiteral( "TOLERANCE" ), QObject::tr( "Tolerance" ), Qgis::ProcessingNumberParameterType::Integer, 8, false, 1, 13
);
tolerance->setFlags( tolerance->flags() | Qgis::ProcessingParameterFlag::Advanced );

View File

@ -104,7 +104,7 @@ void QgsFixGeometryDuplicateNodesAlgorithm::initAlgorithm( const QVariantMap &co
QStringLiteral( "REPORT" ), QObject::tr( "Report layer from fixing duplicate vertices" ), Qgis::ProcessingSourceType::VectorPoint
) );
std::unique_ptr<QgsProcessingParameterNumber> tolerance = std::make_unique<QgsProcessingParameterNumber>(
auto tolerance = std::make_unique<QgsProcessingParameterNumber>(
QStringLiteral( "TOLERANCE" ), QObject::tr( "Tolerance" ), Qgis::ProcessingNumberParameterType::Integer, 8, false, 1, 13
);
tolerance->setFlags( tolerance->flags() | Qgis::ProcessingParameterFlag::Advanced );

View File

@ -108,7 +108,7 @@ void QgsFixGeometryGapAlgorithm::initAlgorithm( const QVariantMap &configuration
QStringLiteral( "REPORT" ), QObject::tr( "Report layer from fixing gaps" ), Qgis::ProcessingSourceType::VectorPoint
) );
std::unique_ptr<QgsProcessingParameterNumber> tolerance = std::make_unique<QgsProcessingParameterNumber>(
auto tolerance = std::make_unique<QgsProcessingParameterNumber>(
QStringLiteral( "TOLERANCE" ), QObject::tr( "Tolerance" ), Qgis::ProcessingNumberParameterType::Integer, 8, false, 1, 13
);
tolerance->setFlags( tolerance->flags() | Qgis::ProcessingParameterFlag::Advanced );

View File

@ -104,7 +104,7 @@ void QgsFixGeometryHoleAlgorithm::initAlgorithm( const QVariantMap &configuratio
QStringLiteral( "REPORT" ), QObject::tr( "Report layer from fixing holes" ), Qgis::ProcessingSourceType::VectorPoint
) );
std::unique_ptr<QgsProcessingParameterNumber> tolerance = std::make_unique<QgsProcessingParameterNumber>(
auto tolerance = std::make_unique<QgsProcessingParameterNumber>(
QStringLiteral( "TOLERANCE" ), QObject::tr( "Tolerance" ), Qgis::ProcessingNumberParameterType::Integer, 8, false, 1, 13
);
tolerance->setFlags( tolerance->flags() | Qgis::ProcessingParameterFlag::Advanced );

View File

@ -105,7 +105,7 @@ void QgsFixGeometryMissingVertexAlgorithm::initAlgorithm( const QVariantMap &con
QStringLiteral( "REPORT" ), QObject::tr( "Report layer from fixing border vertices" ), Qgis::ProcessingSourceType::VectorPoint
) );
std::unique_ptr<QgsProcessingParameterNumber> tolerance = std::make_unique<QgsProcessingParameterNumber>(
auto tolerance = std::make_unique<QgsProcessingParameterNumber>(
QStringLiteral( "TOLERANCE" ), QObject::tr( "Tolerance" ), Qgis::ProcessingNumberParameterType::Integer, 8, false, 1, 13
);
tolerance->setFlags( tolerance->flags() | Qgis::ProcessingParameterFlag::Advanced );

View File

@ -91,7 +91,7 @@ void QgsFixGeometryMultipartAlgorithm::initAlgorithm( const QVariantMap &configu
QStringLiteral( "REPORT" ), QObject::tr( "Report layer from fixing multiparts" ), Qgis::ProcessingSourceType::VectorPoint
) );
std::unique_ptr<QgsProcessingParameterNumber> tolerance = std::make_unique<QgsProcessingParameterNumber>(
auto tolerance = std::make_unique<QgsProcessingParameterNumber>(
QStringLiteral( "TOLERANCE" ), QObject::tr( "Tolerance" ), Qgis::ProcessingNumberParameterType::Integer, 8, false, 1, 13
);
tolerance->setFlags( tolerance->flags() | Qgis::ProcessingParameterFlag::Advanced );

View File

@ -99,7 +99,7 @@ void QgsFixGeometryOverlapAlgorithm::initAlgorithm( const QVariantMap &configura
QStringLiteral( "REPORT" ), QObject::tr( "Report layer from fixing overlaps" ), Qgis::ProcessingSourceType::VectorPoint
) );
std::unique_ptr<QgsProcessingParameterNumber> tolerance = std::make_unique<QgsProcessingParameterNumber>(
auto tolerance = std::make_unique<QgsProcessingParameterNumber>(
QStringLiteral( "TOLERANCE" ), QObject::tr( "Tolerance" ), Qgis::ProcessingNumberParameterType::Integer, 8, false, 1, 13
);
tolerance->setFlags( tolerance->flags() | Qgis::ProcessingParameterFlag::Advanced );

View File

@ -129,7 +129,7 @@ void QgsFixGeometrySelfIntersectionAlgorithm::initAlgorithm( const QVariantMap &
QStringLiteral( "REPORT" ), QObject::tr( "Report layer from fixing self-intersections" ), Qgis::ProcessingSourceType::VectorPoint
) );
std::unique_ptr<QgsProcessingParameterNumber> tolerance = std::make_unique<QgsProcessingParameterNumber>(
auto tolerance = std::make_unique<QgsProcessingParameterNumber>(
QStringLiteral( "TOLERANCE" ), QObject::tr( "Tolerance" ), Qgis::ProcessingNumberParameterType::Integer, 8, false, 1, 13
);
tolerance->setFlags( tolerance->flags() | Qgis::ProcessingParameterFlag::Advanced );

View File

@ -90,7 +90,7 @@ Qgis::ProcessingFeatureSourceFlags QgsRemovePartsByAreaAlgorithm::sourceFlags()
void QgsRemovePartsByAreaAlgorithm::initParameters( const QVariantMap & )
{
std::unique_ptr< QgsProcessingParameterArea > minArea = std::make_unique< QgsProcessingParameterArea >( QStringLiteral( "MIN_AREA" ), QObject::tr( "Remove parts with area less than" ), 0.0, QStringLiteral( "INPUT" ), false, 0 );
auto minArea = std::make_unique< QgsProcessingParameterArea >( QStringLiteral( "MIN_AREA" ), QObject::tr( "Remove parts with area less than" ), 0.0, QStringLiteral( "INPUT" ), false, 0 );
minArea->setIsDynamic( true );
minArea->setDynamicPropertyDefinition( QgsPropertyDefinition( QStringLiteral( "MIN_AREA" ), QObject::tr( "Remove parts with area less than" ), QgsPropertyDefinition::DoublePositive ) );
minArea->setDynamicLayerParameterName( QStringLiteral( "INPUT" ) );

View File

@ -90,7 +90,7 @@ Qgis::ProcessingFeatureSourceFlags QgsRemovePartsByLengthAlgorithm::sourceFlags(
void QgsRemovePartsByLengthAlgorithm::initParameters( const QVariantMap & )
{
std::unique_ptr< QgsProcessingParameterDistance > minLength = std::make_unique< QgsProcessingParameterDistance >( QStringLiteral( "MIN_LENGTH" ), QObject::tr( "Remove parts with lengths less than" ), 0.0, QStringLiteral( "INPUT" ), false, 0 );
auto minLength = std::make_unique< QgsProcessingParameterDistance >( QStringLiteral( "MIN_LENGTH" ), QObject::tr( "Remove parts with lengths less than" ), 0.0, QStringLiteral( "INPUT" ), false, 0 );
minLength->setIsDynamic( true );
minLength->setDynamicPropertyDefinition( QgsPropertyDefinition( QStringLiteral( "MIN_LENGTH" ), QObject::tr( "Remove parts with length less than" ), QgsPropertyDefinition::DoublePositive ) );
minLength->setDynamicLayerParameterName( QStringLiteral( "INPUT" ) );

View File

@ -157,7 +157,7 @@ void QgsAuthPlanetaryComputerEdit::updateServerType( int indx )
lblTenantId->setVisible( isPro );
leTenantId->setVisible( isPro );
const QString openHelp = tr( "Use this server type for %1 - the data are publicly accessible and do not require an account." ).arg( QStringLiteral( "<a href=\"https://planetarycomputer.microsoft.com/\">https://planetarycomputer.microsoft.com/</a>" ) );
const QString openHelp = tr( "Use this server type for %1 - the data are publicly accessible and do not require an account." ).arg( QLatin1String( "<a href=\"https://planetarycomputer.microsoft.com/\">https://planetarycomputer.microsoft.com/</a>" ) );
const QString proHelp = tr(
"Use this server type for <a href=\"https://learn.microsoft.com/en-us/azure/planetary-computer/get-started-planetary-computer\">Planetary Computer Pro</a> instances.<br/>"
"The Directory (tenant) and Application (client) IDs can be found in your organization's Microsoft Entra ID main and application page respectively.<br/>"

View File

@ -4627,7 +4627,7 @@ QgsGeometry QgsGeometry::doChamferFillet( ChamferFilletOperationType op, int ver
// insert \a result geometry (obtain by the chamfer/fillet operation) back into original \a inputPoly polygon
auto updatePolygon = []( const QgsPolygon * inputPoly, QgsAbstractGeometry * result, int modifiedRing ) -> std::unique_ptr<QgsPolygon>
{
std::unique_ptr<QgsPolygon> newPoly = std::make_unique<QgsPolygon>();
auto newPoly = std::make_unique<QgsPolygon>();
for ( int ringIndex = 0; ringIndex < inputPoly->numInteriorRings() + 1; ++ringIndex )
{
if ( ringIndex == modifiedRing )
@ -4656,7 +4656,7 @@ QgsGeometry QgsGeometry::doChamferFillet( ChamferFilletOperationType op, int ver
{
if ( modifiedPart >= 0 )
{
std::unique_ptr<QgsMultiLineString> newMultiLine = std::make_unique<QgsMultiLineString>();
auto newMultiLine = std::make_unique<QgsMultiLineString>();
int partIndex = 0;
for ( QgsMultiLineString::part_iterator partIte = inputMultiLine->parts_begin(); partIte != inputMultiLine->parts_end(); ++partIte )
{
@ -4686,7 +4686,7 @@ QgsGeometry QgsGeometry::doChamferFillet( ChamferFilletOperationType op, int ver
// geomType == Qgis::GeometryType::Polygon
if ( modifiedPart >= 0 )
{
std::unique_ptr<QgsMultiPolygon> newMultiPoly = std::make_unique<QgsMultiPolygon>();
auto newMultiPoly = std::make_unique<QgsMultiPolygon>();
int partIndex = 0;
for ( QgsAbstractGeometry::part_iterator partIte = inputMultiPoly->parts_begin(); partIte != inputMultiPoly->parts_end(); ++partIte )
{

View File

@ -972,7 +972,7 @@ bool QgsLayoutItemElevationProfile::readPropertiesFromElement( const QDomElement
QDomElement sourceElement = sourcesElement.firstChildElement();
while ( !sourceElement.isNull() )
{
if ( sourceElement.tagName() == QStringLiteral( "profileCustomSource" ) )
if ( sourceElement.tagName() == QLatin1String( "profileCustomSource" ) )
{
const QString sourceId = sourceElement.attribute( QStringLiteral( "id" ) );
if ( QgsAbstractProfileSource *profileSource = QgsApplication::profileSourceRegistry()->findSourceById( sourceId ) )
@ -980,7 +980,7 @@ bool QgsLayoutItemElevationProfile::readPropertiesFromElement( const QDomElement
mSources.append( profileSource );
}
}
else if ( sourceElement.tagName() == QStringLiteral( "profileLayerSource" ) )
else if ( sourceElement.tagName() == QLatin1String( "profileLayerSource" ) )
{
QgsMapLayerRef ref;
ref.readXml( sourceElement, context );

View File

@ -403,7 +403,7 @@ inline std::unique_ptr<Chain> Problem::chain( int seed )
{
// A lot of conflict : make them inactive and store chain
std::unique_ptr< Chain > newChain = std::make_unique< Chain >();
auto newChain = std::make_unique< Chain >();
newChain->degree = currentChain.size() + 1 + conflicts.size();
newChain->feat.resize( newChain->degree );
newChain->label.resize( newChain->degree );

View File

@ -44,7 +44,7 @@ bool QgsVectorLayerXyPlotDataGatherer::run()
gatheredSeries.reserve( mSeriesDetails.size() );
for ( int i = 0; i < mSeriesDetails.size(); i++ )
{
std::unique_ptr<QgsXyPlotSeries> series = std::make_unique<QgsXyPlotSeries>();
auto series = std::make_unique<QgsXyPlotSeries>();
gatheredSeries.emplace_back( std::move( series ) );
gatheredSeriesCategoriesSum << QMap<QString, double>();
}

View File

@ -663,11 +663,11 @@ void QgsProject::registerTranslatableObjects( QgsTranslationContext *translation
translationContext->registerTranslation( QStringLiteral( "project:layers:%1:fieldaliases" ).arg( vlayer->id() ), fieldName );
if ( field.editorWidgetSetup().type() == QStringLiteral( "ValueRelation" ) )
if ( field.editorWidgetSetup().type() == QLatin1String( "ValueRelation" ) )
{
translationContext->registerTranslation( QStringLiteral( "project:layers:%1:fields:%2:valuerelationvalue" ).arg( vlayer->id(), field.name() ), field.editorWidgetSetup().config().value( QStringLiteral( "Value" ) ).toString() );
}
if ( field.editorWidgetSetup().type() == QStringLiteral( "ValueMap" ) )
if ( field.editorWidgetSetup().type() == QLatin1String( "ValueMap" ) )
{
if ( field.editorWidgetSetup().config().value( QStringLiteral( "map" ) ).canConvert<QList<QVariant>>() )
{
@ -4003,11 +4003,11 @@ bool QgsProject::createEmbeddedLayer( const QString &layerId, const QString &pro
if ( e.isNull() )
{
e = propertiesElem.firstChildElement( QStringLiteral( "properties" ) );
while ( !e.isNull() && e.attribute( QStringLiteral( "name" ) ) != QStringLiteral( "Paths" ) )
while ( !e.isNull() && e.attribute( QStringLiteral( "name" ) ) != QLatin1String( "Paths" ) )
e = e.nextSiblingElement( QStringLiteral( "properties" ) );
e = e.firstChildElement( QStringLiteral( "properties" ) );
while ( !e.isNull() && e.attribute( QStringLiteral( "name" ) ) != QStringLiteral( "Absolute" ) )
while ( !e.isNull() && e.attribute( QStringLiteral( "name" ) ) != QLatin1String( "Absolute" ) )
e = e.nextSiblingElement( QStringLiteral( "properties" ) );
}
else

View File

@ -365,7 +365,7 @@ bool QgsProjectPropertyKey::readXml( const QDomNode &keyNode )
const QDomNode subkey = subkeys.item( i );
QString name;
if ( subkey.nodeName() == QStringLiteral( "properties" ) &&
if ( subkey.nodeName() == QLatin1String( "properties" ) &&
subkey.hasAttributes() && // if we have attributes
subkey.isElement() && // and we're an element
subkey.toElement().hasAttribute( QStringLiteral( "name" ) ) ) // and we have a "name" attribute

View File

@ -129,7 +129,7 @@ QString QgsCommandLineUtils::allVersions( )
versionString += QStringLiteral( "SFCGAL version %1\n" ).arg( sfcgalVersionCompiled );
}
#else
versionString += QStringLiteral( "No support for SFCGAL\n" );
versionString += QLatin1String( "No support for SFCGAL\n" );
#endif
// SQLite version

View File

@ -572,7 +572,7 @@ QVariant QgsOgrUtils::getOgrFeatureAttribute( OGRFeatureH ogrFet, const QgsField
{
case QMetaType::Type::QString:
{
if ( field.typeName() != QStringLiteral( "JSON" ) || ! getJsonValue() )
if ( field.typeName() != QLatin1String( "JSON" ) || ! getJsonValue() )
{
if ( encoding )
value = QVariant( encoding->toUnicode( OGR_F_GetFieldAsString( ogrFet, attIndex ) ) );
@ -641,7 +641,7 @@ QVariant QgsOgrUtils::getOgrFeatureAttribute( OGRFeatureH ogrFet, const QgsField
case QMetaType::Type::QStringList:
{
if ( field.typeName() != QStringLiteral( "JSON" ) || ! getJsonValue() )
if ( field.typeName() != QLatin1String( "JSON" ) || ! getJsonValue() )
{
QStringList list;
char **lst = OGR_F_GetFieldAsStringList( ogrFet, attIndex );
@ -668,7 +668,7 @@ QVariant QgsOgrUtils::getOgrFeatureAttribute( OGRFeatureH ogrFet, const QgsField
{
case QMetaType::Type::QString:
{
if ( field.typeName() != QStringLiteral( "JSON" ) || ! getJsonValue() )
if ( field.typeName() != QLatin1String( "JSON" ) || ! getJsonValue() )
{
QStringList list;
char **lst = OGR_F_GetFieldAsStringList( ogrFet, attIndex );
@ -691,7 +691,7 @@ QVariant QgsOgrUtils::getOgrFeatureAttribute( OGRFeatureH ogrFet, const QgsField
case QMetaType::Type::Int:
{
if ( field.typeName() != QStringLiteral( "JSON" ) || ! getJsonValue() )
if ( field.typeName() != QLatin1String( "JSON" ) || ! getJsonValue() )
{
QVariantList list;
int count = 0;
@ -711,7 +711,7 @@ QVariant QgsOgrUtils::getOgrFeatureAttribute( OGRFeatureH ogrFet, const QgsField
case QMetaType::Type::Double:
{
if ( field.typeName() != QStringLiteral( "JSON" ) || ! getJsonValue() )
if ( field.typeName() != QLatin1String( "JSON" ) || ! getJsonValue() )
{
QVariantList list;
int count = 0;
@ -731,7 +731,7 @@ QVariant QgsOgrUtils::getOgrFeatureAttribute( OGRFeatureH ogrFet, const QgsField
case QMetaType::Type::LongLong:
{
if ( field.typeName() != QStringLiteral( "JSON" ) || ! getJsonValue() )
if ( field.typeName() != QLatin1String( "JSON" ) || ! getJsonValue() )
{
QVariantList list;
int count = 0;

View File

@ -3563,7 +3563,7 @@ bool QgsRasterMarkerSymbolLayer::writeSldMarker( QDomDocument &doc, QDomElement
QMimeType mimeType;
QString base64data;
if ( mPath.startsWith( QStringLiteral( "base64:" ) ) )
if ( mPath.startsWith( QLatin1String( "base64:" ) ) )
{
base64data = mPath.mid( 7 );
}
@ -3601,7 +3601,7 @@ bool QgsRasterMarkerSymbolLayer::writeSldMarker( QDomDocument &doc, QDomElement
extGraphElem.appendChild( onlineResElem );
// determine mime type
if ( mPath.startsWith( QStringLiteral( "http://" ) ) || mPath.startsWith( QStringLiteral( "https://" ) ) )
if ( mPath.startsWith( QLatin1String( "http://" ) ) || mPath.startsWith( QLatin1String( "https://" ) ) )
{
// Qt can't guess mime type for remote URLs, and it seems geoserver can handle wrong image mime types
// but not generic ones, so let's hardcode to png.

View File

@ -2708,11 +2708,11 @@ bool QgsVectorLayer::readSymbology( const QDomNode &layerNode, QString &errorMes
const QDomElement optionsElem = cfgElem.childNodes().at( 0 ).toElement();
QVariantMap optionsMap = QgsXmlUtils::readVariant( optionsElem ).toMap();
// translate widget configuration strings
if ( widgetType == QStringLiteral( "ValueRelation" ) )
if ( widgetType == QLatin1String( "ValueRelation" ) )
{
optionsMap[ QStringLiteral( "Value" ) ] = context.projectTranslator()->translate( QStringLiteral( "project:layers:%1:fields:%2:valuerelationvalue" ).arg( layerNode.namedItem( QStringLiteral( "id" ) ).toElement().text(), fieldName ), optionsMap[ QStringLiteral( "Value" ) ].toString() );
}
if ( widgetType == QStringLiteral( "ValueMap" ) )
if ( widgetType == QLatin1String( "ValueMap" ) )
{
if ( optionsMap[ QStringLiteral( "map" ) ].canConvert<QList<QVariant>>() )
{

View File

@ -344,7 +344,7 @@ void QgsVectorTileUtils::loadSprites( const QVariantMap &styleDefinition, QgsMap
{
return sprite;
}
else if ( sprite.startsWith( QLatin1String( "/" ) ) )
else if ( sprite.startsWith( QLatin1Char( '/' ) ) )
{
const QUrl url( styleUrl );
return QStringLiteral( "%1://%2%3" ).arg( url.scheme(), url.host(), sprite );

View File

@ -491,7 +491,7 @@ void QgsElevationProfileLayerTreeView::populateInitialSources( QgsProject *proje
void QgsElevationProfileLayerTreeView::addNodeForRegisteredSource( const QString &sourceId, const QString &sourceName )
{
std::unique_ptr< QgsLayerTreeCustomNode > customNode = std::make_unique< QgsLayerTreeCustomNode >( sourceId, sourceName.isEmpty() ? sourceId : sourceName );
auto customNode = std::make_unique< QgsLayerTreeCustomNode >( sourceId, sourceName.isEmpty() ? sourceId : sourceName );
customNode->setItemVisibilityChecked( true );
// Mark the node so that we know which custom nodes correspond to elevation profile sources
customNode->setCustomProperty( QStringLiteral( "source" ), QgsElevationProfileLayerTreeView::CUSTOM_NODE_ELEVATION_PROFILE_SOURCE );

View File

@ -578,7 +578,7 @@ QgsExpressionContext QgsLayoutElevationProfileWidget::createExpressionContext()
{
QgsExpressionContext context = mProfile->createExpressionContext();
std::unique_ptr<QgsExpressionContextScope> plotScope = std::make_unique<QgsExpressionContextScope>( QStringLiteral( "plot" ) );
auto plotScope = std::make_unique<QgsExpressionContextScope>( QStringLiteral( "plot" ) );
plotScope->addVariable( QgsExpressionContextScope::StaticVariable( QStringLiteral( "plot_axis" ), QString(), true ) );
plotScope->addVariable( QgsExpressionContextScope::StaticVariable( QStringLiteral( "plot_axis_value" ), 0.0, true ) );
context.appendScope( plotScope.release() );

View File

@ -44,12 +44,12 @@ QgsExpressionContext QgsPlotWidget::createExpressionContext() const
context.appendScope( QgsExpressionContextUtils::globalScope() );
}
std::unique_ptr<QgsExpressionContextScope> plotScope = std::make_unique<QgsExpressionContextScope>( QStringLiteral( "plot" ) );
auto plotScope = std::make_unique<QgsExpressionContextScope>( QStringLiteral( "plot" ) );
plotScope->addVariable( QgsExpressionContextScope::StaticVariable( QStringLiteral( "plot_axis" ), QString(), true ) );
plotScope->addVariable( QgsExpressionContextScope::StaticVariable( QStringLiteral( "plot_axis_value" ), 0.0, true ) );
context.appendScope( plotScope.release() );
std::unique_ptr<QgsExpressionContextScope> chartScope = std::make_unique<QgsExpressionContextScope>( QStringLiteral( "chart" ) );
auto chartScope = std::make_unique<QgsExpressionContextScope>( QStringLiteral( "chart" ) );
chartScope->addVariable( QgsExpressionContextScope::StaticVariable( QStringLiteral( "chart_category" ), QString(), true ) );
chartScope->addVariable( QgsExpressionContextScope::StaticVariable( QStringLiteral( "chart_value" ), 0.0, true ) );
context.appendScope( chartScope.release() );

View File

@ -121,7 +121,7 @@ bool QgsShortcutsManager::registerAction( QAction *action, const QString &defaul
QgsLogger::warning( QStringLiteral( "Duplicate shortcut registered: %1" ).arg( key ) );
#endif
const QString settingKey = mSettingsPath + ( section.isEmpty() || section.endsWith( QStringLiteral( "/" ) ) ? section : section + QStringLiteral( "/" ) ) + key;
const QString settingKey = mSettingsPath + ( section.isEmpty() || section.endsWith( QLatin1Char( '/' ) ) ? section : section + QStringLiteral( "/" ) ) + key;
mActions.insert( action, { defaultSequence, settingKey } );
connect( action, &QObject::destroyed, this, [action, this]() { actionDestroyed( action ); } );
@ -165,7 +165,7 @@ bool QgsShortcutsManager::registerShortcut( QShortcut *shortcut, const QString &
QgsLogger::warning( QStringLiteral( "Duplicate shortcut registered: %1" ).arg( shortcut->objectName() ) );
#endif
const QString settingKey = mSettingsPath + ( section.isEmpty() || section.endsWith( QStringLiteral( "/" ) ) ? section : section + QStringLiteral( "/" ) ) + shortcut->objectName();
const QString settingKey = mSettingsPath + ( section.isEmpty() || section.endsWith( QLatin1Char( '/' ) ) ? section : section + QStringLiteral( "/" ) ) + shortcut->objectName();
mShortcuts.insert( shortcut, { defaultSequence, settingKey } );
connect( shortcut, &QObject::destroyed, this, [shortcut, this]() { shortcutDestroyed( shortcut ); } );

View File

@ -1694,7 +1694,7 @@ void QgsAttributesFormLayoutModel::addContainer( QModelIndex &parent, const QStr
QgsAttributesFormItem *parentItem = itemForIndex( parent );
std::unique_ptr< QgsAttributesFormItem > containerItem = std::make_unique< QgsAttributesFormItem >( QgsAttributesFormData::Container, name, QString(), parentItem );
auto containerItem = std::make_unique< QgsAttributesFormItem >( QgsAttributesFormData::Container, name, QString(), parentItem );
QgsAttributesFormData::AttributeFormItemData itemData;
itemData.setColumnCount( columnCount );
@ -1713,7 +1713,7 @@ void QgsAttributesFormLayoutModel::insertChild( const QModelIndex &parent, int r
return;
beginInsertRows( parent, row, row );
std::unique_ptr< QgsAttributesFormItem > item = std::make_unique< QgsAttributesFormItem >();
auto item = std::make_unique< QgsAttributesFormItem >();
item->setData( QgsAttributesFormModel::ItemIdRole, itemId );
item->setData( QgsAttributesFormModel::ItemTypeRole, itemType );

View File

@ -1147,11 +1147,11 @@ void QgsAttributesFormProperties::pasteWidgetConfiguration()
QVariantMap optionsMap = QgsXmlUtils::readVariant( optionsElem ).toMap();
QgsReadWriteContext context;
// translate widget configuration strings
if ( widgetType == QStringLiteral( "ValueRelation" ) )
if ( widgetType == QLatin1String( "ValueRelation" ) )
{
optionsMap[QStringLiteral( "Value" )] = context.projectTranslator()->translate( QStringLiteral( "project:layers:%1:fields:%2:valuerelationvalue" ).arg( mLayer->id(), fieldName ), optionsMap[QStringLiteral( "Value" )].toString() );
}
if ( widgetType == QStringLiteral( "ValueMap" ) )
if ( widgetType == QLatin1String( "ValueMap" ) )
{
if ( optionsMap[QStringLiteral( "map" )].canConvert<QList<QVariant>>() )
{

View File

@ -1284,7 +1284,7 @@ bool QgsMssqlProvider::addAttributes( const QList<QgsField> &attributes )
attributeClauses.append( QStringLiteral( "[%1] %2" ).arg( it->name(), type ) );
}
statement += attributeClauses.join( QStringLiteral( ", " ) );
statement += attributeClauses.join( QLatin1String( ", " ) );
QSqlQuery query = createQuery();
query.setForwardOnly( true );

View File

@ -5191,7 +5191,7 @@ QString QgsPostgresProvider::htmlMetadata() const
")" )
.arg( QgsPostgresConn::quotedValue( mTableName ), QgsPostgresConn::quotedValue( mSchemaName ) );
const QString sqlWithPrivilages = QStringLiteral( "privileges AS ("
const QString sqlWithPrivileges = QStringLiteral( "privileges AS ("
"SELECT table_info.oid as oid, "
"COALESCE(NULLIF(CONCAT_WS(', ',"
"CASE WHEN has_table_privilege(table_info.oid, 'SELECT') THEN 'SELECT' END,"
@ -5221,7 +5221,7 @@ QString QgsPostgresProvider::htmlMetadata() const
"LEFT JOIN privileges ON table_info.oid = privileges.oid "
"LEFT JOIN table_indexes_info ON table_indexes_info.table_name = table_info.table_name AND table_indexes_info.schema_name = table_info.schema_name "
"LEFT JOIN pg_description ON pg_description.objoid = table_info.oid" )
.arg( sqlWithTableInfo, sqlWithPrivilages, sqlWithIndexes );
.arg( sqlWithTableInfo, sqlWithPrivileges, sqlWithIndexes );
QgsPostgresResult resTable( connectionRO()->LoggedPQexec( "QgsPostgresProvider", sqlMainQuery ) );
@ -5233,7 +5233,7 @@ QString QgsPostgresProvider::htmlMetadata() const
if ( resTable.PQntuples() > 0 )
{
tableComment = resTable.PQgetvalue( 0, 6 );
tableComment = tableComment.replace( QStringLiteral( "\n" ), QStringLiteral( "<br>" ) );
tableComment = tableComment.replace( QLatin1String( "\n" ), QLatin1String( "<br>" ) );
estimateRowCount = resTable.PQgetvalue( 0, 4 ).toLongLong();

View File

@ -1950,7 +1950,7 @@ void QgsPostgresProviderConnection::moveTableToSchema( const QString &sourceSche
const QString sqlMoveTable = sqlMoveToSchema.arg( QgsPostgresConn::quotedIdentifier( sourceSchema ), QgsPostgresConn::quotedIdentifier( tableName ), QgsPostgresConn::quotedIdentifier( targetSchema ) );
std::shared_ptr<QgsPoolPostgresConn> conn = std::make_shared<QgsPoolPostgresConn>( QgsPostgresConn::connectionInfo( QgsDataSourceUri( uri() ), false ) );
auto conn = std::make_shared<QgsPoolPostgresConn>( QgsPostgresConn::connectionInfo( QgsDataSourceUri( uri() ), false ) );
QgsPostgresLayerProperty property;
// need property from target schema, it is already moved
bool ok = conn->get()->supportedLayer( property, sourceSchema, tableName );

View File

@ -1003,7 +1003,7 @@ QDomElement QgsWFSProvider::geometryElement( const QgsGeometry &geometry, QDomDo
bool applyAxisInversion;
QgsOgcUtils::GMLVersion gmlVersion;
if ( mShared->mWFSVersion.startsWith( QLatin1String( "1.1" ) ) || mShared->mWFSVersion.startsWith( QLatin1String( "2" ) ) )
if ( mShared->mWFSVersion.startsWith( QLatin1String( "1.1" ) ) || mShared->mWFSVersion.startsWith( QLatin1Char( '2' ) ) )
{
// WFS 1.1.0 uses preferably GML 3, but ESRI mapserver in 2020 doesn't like it so we stick to GML2
if ( !mShared->mServerPrefersCoordinatesForTransactions_1_1 )

View File

@ -248,7 +248,7 @@ QList<QgsProviderSublayerDetails> QgsWfsProviderMetadata::querySublayers( const
// If set: always issue a GetFeature because the guessed type can't be trusted,
// for example when dealing with Z geometries identified as 2D.
const bool forceInitialGetFeature = dsUri.hasParam( QgsWFSConstants::URI_PARAM_FORCE_INITIAL_GET_FEATURE )
&& dsUri.param( QgsWFSConstants::URI_PARAM_FORCE_INITIAL_GET_FEATURE ).toUpper() == QStringLiteral( "TRUE" );
&& dsUri.param( QgsWFSConstants::URI_PARAM_FORCE_INITIAL_GET_FEATURE ).toUpper() == QLatin1String( "TRUE" );
if ( wfsUri.hasGeometryTypeFilter() || !caps.supportsGeometryTypeFilters() )
{

View File

@ -41,7 +41,7 @@ class QgsWfs3Module : public QgsServiceModule
{
rootPath = serverIface->serverSettings()->apiWfs3RootPath();
}
std::unique_ptr<QgsServerOgcApi> wfs3Api = std::make_unique<QgsServerOgcApi>( serverIface, rootPath, QStringLiteral( "OAPIF" ), QStringLiteral( "1.0.0" ) );
auto wfs3Api = std::make_unique<QgsServerOgcApi>( serverIface, rootPath, QStringLiteral( "OAPIF" ), QStringLiteral( "1.0.0" ) );
// Register handlers
wfs3Api->registerHandler<QgsWfs3CollectionsItemsHandler>();
wfs3Api->registerHandler<QgsWfs3CollectionsFeatureHandler>();

View File

@ -226,7 +226,7 @@ void TestNineCellFilters::testCreationOptions()
{
QString tmpFile( tempFile( QStringLiteral( "createopts" ) ) );
QString worldFileName = tmpFile.replace( QStringLiteral( ".tif" ), QStringLiteral( ".tfw" ) );
QString worldFileName = tmpFile.replace( QLatin1String( ".tif" ), QLatin1String( ".tfw" ) );
QFile worldFile( worldFileName );
QVERIFY( !worldFile.exists() );

View File

@ -295,7 +295,7 @@ void TestQgsProcessingCheckGeometry::containedAlg()
bool ok = false;
QgsProcessingFeedback feedback;
std::unique_ptr< QgsProcessingContext > context = std::make_unique< QgsProcessingContext >();
auto context = std::make_unique< QgsProcessingContext >();
QVariantMap results;
results = alg->run( parameters, *context, &feedback, &ok );
@ -324,7 +324,7 @@ void TestQgsProcessingCheckGeometry::degeneratePolygonAlg()
bool ok = false;
QgsProcessingFeedback feedback;
std::unique_ptr< QgsProcessingContext > context = std::make_unique< QgsProcessingContext >();
auto context = std::make_unique< QgsProcessingContext >();
QVariantMap results;
results = alg->run( parameters, *context, &feedback, &ok );
@ -365,7 +365,7 @@ void TestQgsProcessingCheckGeometry::segmentLengthAlg()
bool ok = false;
QgsProcessingFeedback feedback;
std::unique_ptr< QgsProcessingContext > context = std::make_unique< QgsProcessingContext >();
auto context = std::make_unique< QgsProcessingContext >();
QVariantMap results;
results = alg->run( parameters, *context, &feedback, &ok );
@ -404,7 +404,7 @@ void TestQgsProcessingCheckGeometry::selfIntersectionAlg()
bool ok = false;
QgsProcessingFeedback feedback;
std::unique_ptr< QgsProcessingContext > context = std::make_unique< QgsProcessingContext >();
auto context = std::make_unique< QgsProcessingContext >();
QVariantMap results;
results = alg->run( parameters, *context, &feedback, &ok );
@ -433,7 +433,7 @@ void TestQgsProcessingCheckGeometry::dangleAlg()
bool ok = false;
QgsProcessingFeedback feedback;
std::unique_ptr< QgsProcessingContext > context = std::make_unique< QgsProcessingContext >();
auto context = std::make_unique< QgsProcessingContext >();
QVariantMap results;
results = alg->run( parameters, *context, &feedback, &ok );
@ -473,7 +473,7 @@ void TestQgsProcessingCheckGeometry::duplicateNodesAlg()
bool ok = false;
QgsProcessingFeedback feedback;
std::unique_ptr< QgsProcessingContext > context = std::make_unique< QgsProcessingContext >();
auto context = std::make_unique< QgsProcessingContext >();
QVariantMap results;
results = alg->run( parameters, *context, &feedback, &ok );
@ -507,7 +507,7 @@ void TestQgsProcessingCheckGeometry::followBoundariesAlg()
bool ok = false;
QgsProcessingFeedback feedback;
std::unique_ptr< QgsProcessingContext > context = std::make_unique< QgsProcessingContext >();
auto context = std::make_unique< QgsProcessingContext >();
QVariantMap results;
results = alg->run( parameters, *context, &feedback, &ok );
@ -537,7 +537,7 @@ void TestQgsProcessingCheckGeometry::overlapAlg()
bool ok = false;
QgsProcessingFeedback feedback;
std::unique_ptr< QgsProcessingContext > context = std::make_unique< QgsProcessingContext >();
auto context = std::make_unique< QgsProcessingContext >();
QVariantMap results;
results = alg->run( parameters, *context, &feedback, &ok );
@ -577,7 +577,7 @@ void TestQgsProcessingCheckGeometry::selfContactAlg()
bool ok = false;
QgsProcessingFeedback feedback;
std::unique_ptr< QgsProcessingContext > context = std::make_unique< QgsProcessingContext >();
auto context = std::make_unique< QgsProcessingContext >();
QVariantMap results;
results = alg->run( parameters, *context, &feedback, &ok );
@ -608,7 +608,7 @@ void TestQgsProcessingCheckGeometry::sliverPolygonAlg()
bool ok = false;
QgsProcessingFeedback feedback;
std::unique_ptr< QgsProcessingContext > context = std::make_unique< QgsProcessingContext >();
auto context = std::make_unique< QgsProcessingContext >();
QVariantMap results;
results = alg->run( parameters, *context, &feedback, &ok );
@ -632,7 +632,7 @@ void TestQgsProcessingCheckGeometry::gapAlg()
const QDir testDataDir( QDir( TEST_DATA_DIR ).absoluteFilePath( "geometry_checker" ) );
QgsVectorLayer *gapLayer = new QgsVectorLayer( testDataDir.absoluteFilePath( "gap_layer.shp" ), QStringLiteral( "polygons" ), QStringLiteral( "ogr" ) );
std::unique_ptr<QgsVectorLayer> allowedGapsLayer = std::make_unique< QgsVectorLayer >( QStringLiteral( "Polygon?crs=epsg:4326" ), QStringLiteral( "allowedGaps" ), QStringLiteral( "memory" ) );
auto allowedGapsLayer = std::make_unique< QgsVectorLayer >( QStringLiteral( "Polygon?crs=epsg:4326" ), QStringLiteral( "allowedGaps" ), QStringLiteral( "memory" ) );
QgsProject::instance()->addMapLayer( allowedGapsLayer.get() );
QgsFeature allowedGap;
@ -648,7 +648,7 @@ void TestQgsProcessingCheckGeometry::gapAlg()
bool ok = false;
QgsProcessingFeedback feedback;
std::unique_ptr< QgsProcessingContext > context = std::make_unique< QgsProcessingContext >();
auto context = std::make_unique< QgsProcessingContext >();
QVariantMap results;
results = alg->run( parameters, *context, &feedback, &ok );
@ -688,7 +688,7 @@ void TestQgsProcessingCheckGeometry::gapAlg()
bool ok = false;
QgsProcessingFeedback feedback;
std::unique_ptr< QgsProcessingContext > context = std::make_unique< QgsProcessingContext >();
auto context = std::make_unique< QgsProcessingContext >();
QVariantMap results;
results = alg->run( parameters, *context, &feedback, &ok );
@ -721,7 +721,7 @@ void TestQgsProcessingCheckGeometry::pointInPolygonAlg()
bool ok = false;
QgsProcessingFeedback feedback;
std::unique_ptr< QgsProcessingContext > context = std::make_unique< QgsProcessingContext >();
auto context = std::make_unique< QgsProcessingContext >();
QVariantMap results;
results = alg->run( parameters, *context, &feedback, &ok );
@ -747,7 +747,7 @@ void TestQgsProcessingCheckGeometry::pointCoveredByLineAlg()
bool ok = false;
QgsProcessingFeedback feedback;
std::unique_ptr< QgsProcessingContext > context = std::make_unique< QgsProcessingContext >();
auto context = std::make_unique< QgsProcessingContext >();
QVariantMap results;
results = alg->run( parameters, *context, &feedback, &ok );
@ -774,7 +774,7 @@ void TestQgsProcessingCheckGeometry::lineLayerIntersectionAlg()
bool ok = false;
QgsProcessingFeedback feedback;
std::unique_ptr< QgsProcessingContext > context = std::make_unique< QgsProcessingContext >();
auto context = std::make_unique< QgsProcessingContext >();
QVariantMap results;
results = alg->run( parameters, *context, &feedback, &ok );
@ -803,7 +803,7 @@ void TestQgsProcessingCheckGeometry::lineIntersectionAlg()
bool ok = false;
QgsProcessingFeedback feedback;
std::unique_ptr< QgsProcessingContext > context = std::make_unique< QgsProcessingContext >();
auto context = std::make_unique< QgsProcessingContext >();
QVariantMap results;
results = alg->run( parameters, *context, &feedback, &ok );
@ -843,7 +843,7 @@ void TestQgsProcessingCheckGeometry::multipartAlg()
bool ok = false;
QgsProcessingFeedback feedback;
std::unique_ptr< QgsProcessingContext > context = std::make_unique< QgsProcessingContext >();
auto context = std::make_unique< QgsProcessingContext >();
QVariantMap results;
results = alg->run( parameters, *context, &feedback, &ok );

View File

@ -886,4 +886,4 @@ void TestQgsProcessingFixGeometry::fixDeleteFeaturesAlg()
}
QGSTEST_MAIN( TestQgsProcessingFixGeometry )
#include "testqgsprocessingfixgeometry.moc"
#include "testqgsprocessingfixgeometry.moc"

View File

@ -1152,7 +1152,7 @@ void TestQgsRasterCalculator::testCreationOptions()
QString tmpName = tmpFile.fileName();
tmpFile.close();
QString worldFileName = tmpName.replace( QStringLiteral( ".tif" ), QStringLiteral( ".tfw" ) );
QString worldFileName = tmpName.replace( QLatin1String( ".tif" ), QLatin1String( ".tfw" ) );
QFile worldFile( worldFileName );
QVERIFY( !worldFile.exists() );

View File

@ -425,7 +425,7 @@ void TestQgsSfcgal::isEqual()
void TestQgsSfcgal::boundary()
{
// 2D line
std::unique_ptr<QgsSfcgalGeometry> sfcgalLine2D = std::make_unique<QgsSfcgalGeometry>( mpPolylineGeometryD );
auto sfcgalLine2D = std::make_unique<QgsSfcgalGeometry>( mpPolylineGeometryD );
#if SFCGAL_VERSION_MAJOR_INT == 2 && SFCGAL_VERSION_MINOR_INT < 1
QVERIFY_EXCEPTION_THROWN( sfcgalLine2D->boundary(), QgsNotSupportedException );
#else
@ -435,7 +435,7 @@ void TestQgsSfcgal::boundary()
#endif
// 3D polygon
std::unique_ptr<QgsSfcgalGeometry> sfcgalPolygon3D = std::make_unique<QgsSfcgalGeometry>( mSfcgalPolygonZA );
auto sfcgalPolygon3D = std::make_unique<QgsSfcgalGeometry>( mSfcgalPolygonZA );
#if SFCGAL_VERSION_MAJOR_INT == 2 && SFCGAL_VERSION_MINOR_INT < 1
QVERIFY_EXCEPTION_THROWN( sfcgalPolygon3D->boundary(), QgsNotSupportedException );
#else
@ -448,16 +448,16 @@ void TestQgsSfcgal::boundary()
void TestQgsSfcgal::centroid()
{
std::unique_ptr<QgsSfcgalGeometry> geomZA = std::make_unique<QgsSfcgalGeometry>( mSfcgalPolygonZA );
std::unique_ptr<QgsSfcgalGeometry> geomZB = std::make_unique<QgsSfcgalGeometry>( mSfcgalPolygonZB );
std::unique_ptr<QgsSfcgalGeometry> geomZC = std::make_unique<QgsSfcgalGeometry>( mSfcgalPolygonZC );
auto geomZA = std::make_unique<QgsSfcgalGeometry>( mSfcgalPolygonZA );
auto geomZB = std::make_unique<QgsSfcgalGeometry>( mSfcgalPolygonZB );
auto geomZC = std::make_unique<QgsSfcgalGeometry>( mSfcgalPolygonZC );
#if SFCGAL_VERSION_MAJOR_INT == 2 && SFCGAL_VERSION_MINOR_INT < 1
QVERIFY_EXCEPTION_THROWN( geomZA->centroid(), QgsNotSupportedException );
QVERIFY_EXCEPTION_THROWN( geomZB->centroid(), QgsNotSupportedException );
QVERIFY_EXCEPTION_THROWN( geomZC->centroid(), QgsNotSupportedException );
#else
std::unique_ptr<QgsPoint> res = std::make_unique<QgsPoint>( geomZA->centroid() );
auto res = std::make_unique<QgsPoint>( geomZA->centroid() );
QCOMPARE( res->asWkt( 2 ), QStringLiteral( "Point Z (-5673.79 3594.8 20)" ) );
res = std::make_unique<QgsPoint>( geomZB->centroid() );
@ -471,7 +471,7 @@ void TestQgsSfcgal::centroid()
void TestQgsSfcgal::dropZ()
{
// PolygonZ
std::unique_ptr<QgsSfcgalGeometry> sfcgalPolygonZ = std::make_unique<QgsSfcgalGeometry>( mSfcgalPolygonZA );
auto sfcgalPolygonZ = std::make_unique<QgsSfcgalGeometry>( mSfcgalPolygonZA );
QCOMPARE( sfcgalPolygonZ->wkbType(), Qgis::WkbType::PolygonZ );
#if SFCGAL_VERSION_MAJOR_INT == 2 && SFCGAL_VERSION_MINOR_INT < 1
QVERIFY_EXCEPTION_THROWN( sfcgalPolygonZ->dropZValue(), QgsNotSupportedException );
@ -482,7 +482,7 @@ void TestQgsSfcgal::dropZ()
QVERIFY( !sfcgalPolygonZ->dropZValue() );
// Polygon2D
std::unique_ptr<QgsSfcgalGeometry> sfcgalPolygon2D = std::make_unique<QgsSfcgalGeometry>( QgsGeometry::fromPolygonXY( mPolygonA ) );
auto sfcgalPolygon2D = std::make_unique<QgsSfcgalGeometry>( QgsGeometry::fromPolygonXY( mPolygonA ) );
QCOMPARE( sfcgalPolygon2D->wkbType(), Qgis::WkbType::Polygon );
QVERIFY( !sfcgalPolygon2D->dropZValue() );
QCOMPARE( sfcgalPolygon2D->wkbType(), Qgis::WkbType::Polygon );
@ -506,7 +506,7 @@ void TestQgsSfcgal::dropZ()
void TestQgsSfcgal::dropM()
{
// PolygonZ
std::unique_ptr<QgsSfcgalGeometry> sfcgalPolygonZ = std::make_unique<QgsSfcgalGeometry>( mSfcgalPolygonZA );
auto sfcgalPolygonZ = std::make_unique<QgsSfcgalGeometry>( mSfcgalPolygonZA );
QCOMPARE( sfcgalPolygonZ->wkbType(), Qgis::WkbType::PolygonZ );
#if SFCGAL_VERSION_MAJOR_INT == 2 && SFCGAL_VERSION_MINOR_INT < 1
QVERIFY_EXCEPTION_THROWN( sfcgalPolygonZ->dropMValue(), QgsNotSupportedException );
@ -515,7 +515,7 @@ void TestQgsSfcgal::dropM()
QCOMPARE( sfcgalPolygonZ->wkbType(), Qgis::WkbType::PolygonZ );
// Polygon2D
std::unique_ptr<QgsSfcgalGeometry> sfcgalPolygon2D = std::make_unique<QgsSfcgalGeometry>( QgsGeometry::fromPolygonXY( mPolygonA ) );
auto sfcgalPolygon2D = std::make_unique<QgsSfcgalGeometry>( QgsGeometry::fromPolygonXY( mPolygonA ) );
QCOMPARE( sfcgalPolygon2D->wkbType(), Qgis::WkbType::Polygon );
QVERIFY( !sfcgalPolygon2D->dropMValue() );
QCOMPARE( sfcgalPolygon2D->wkbType(), Qgis::WkbType::Polygon );
@ -620,7 +620,7 @@ void TestQgsSfcgal::swapXY()
void TestQgsSfcgal::isEmpty()
{
std::unique_ptr<QgsSfcgalGeometry> sfcgalGeomZA = std::make_unique<QgsSfcgalGeometry>( mSfcgalPolygonZA );
auto sfcgalGeomZA = std::make_unique<QgsSfcgalGeometry>( mSfcgalPolygonZA );
QVERIFY( !sfcgalGeomZA->isEmpty() );
QgsSfcgalGeometry sfcgalGeomEmpty( "POLYGON EMPTY" );
@ -648,7 +648,7 @@ void TestQgsSfcgal::scale()
QCOMPARE( sfcgalScalePoint3DCenter->asWkt( 0 ), QStringLiteral( "POINT Z (7 7 2)" ) );
// 3D Polygon - no center
std::unique_ptr<QgsSfcgalGeometry> sfcgalPolygonA = std::make_unique<QgsSfcgalGeometry>( mSfcgalPolygonZA );
auto sfcgalPolygonA = std::make_unique<QgsSfcgalGeometry>( mSfcgalPolygonZA );
const QgsVector3D scaleFactorPolygon( 2, 2, 2 );
std::unique_ptr<QgsSfcgalGeometry> sfcgalScalePolygonA( sfcgalPolygonA->scale( scaleFactorPolygon, QgsPoint() ) );
@ -666,7 +666,7 @@ void TestQgsSfcgal::scale()
QVERIFY2( expectedScalePolygonACenter.covers( *sfcgalScalePolygonACenter.get() ), "scale polygon A with center does not match expected WKT" );
// 2D LineString - no center
std::unique_ptr<QgsSfcgalGeometry> sfcgalLineD = std::make_unique<QgsSfcgalGeometry>( mpPolylineGeometryD );
auto sfcgalLineD = std::make_unique<QgsSfcgalGeometry>( mpPolylineGeometryD );
const QgsVector3D scaleFactorLine( 3, 2, 0 );
std::unique_ptr<QgsSfcgalGeometry> sfcgalScaleLineD( sfcgalLineD->scale( scaleFactorLine, QgsPoint() ) );
@ -706,9 +706,9 @@ void TestQgsSfcgal::intersection3d()
initPainterTest();
// first triangulate polygon as some are not coplanar
std::unique_ptr<QgsSfcgalGeometry> geomZA = std::make_unique<QgsSfcgalGeometry>( mSfcgalPolygonZA );
std::unique_ptr<QgsSfcgalGeometry> geomZB = std::make_unique<QgsSfcgalGeometry>( mSfcgalPolygonZB );
std::unique_ptr<QgsSfcgalGeometry> geomZC = std::make_unique<QgsSfcgalGeometry>( mSfcgalPolygonZC );
auto geomZA = std::make_unique<QgsSfcgalGeometry>( mSfcgalPolygonZA );
auto geomZB = std::make_unique<QgsSfcgalGeometry>( mSfcgalPolygonZB );
auto geomZC = std::make_unique<QgsSfcgalGeometry>( mSfcgalPolygonZC );
geomZA = geomZA->triangulate();
geomZB = geomZB->triangulate();
@ -803,7 +803,7 @@ void TestQgsSfcgal::unionCheck1()
{
initPainterTest();
// should be a multipolygon with 2 parts as A does not intersect C
std::unique_ptr<QgsSfcgalGeometry> geomA = std::make_unique<QgsSfcgalGeometry>( mpPolygonGeometryA );
auto geomA = std::make_unique<QgsSfcgalGeometry>( mpPolygonGeometryA );
QVector<QgsAbstractGeometry *> geomList;
geomList.append( mpPolygonGeometryC.get() );
@ -827,7 +827,7 @@ void TestQgsSfcgal::unionCheck2()
{
initPainterTest();
// should be a single polygon as A intersect B
std::unique_ptr<QgsSfcgalGeometry> geomA = std::make_unique<QgsSfcgalGeometry>( mpPolygonGeometryA );
auto geomA = std::make_unique<QgsSfcgalGeometry>( mpPolygonGeometryA );
QVector<QgsAbstractGeometry *> geomList;
geomList.append( mpPolygonGeometryB.get() );
@ -851,7 +851,7 @@ void TestQgsSfcgal::differenceCheck1()
{
initPainterTest();
// should be same as A since A does not intersect C so diff is 100% of A
std::unique_ptr<QgsSfcgalGeometry> geomA = std::make_unique<QgsSfcgalGeometry>( mpPolygonGeometryA );
auto geomA = std::make_unique<QgsSfcgalGeometry>( mpPolygonGeometryA );
std::unique_ptr<QgsSfcgalGeometry> diffGeom = geomA->difference( mpPolygonGeometryC.constGet() );
QCOMPARE( diffGeom->wkbType(), Qgis::WkbType::Polygon );
@ -869,7 +869,7 @@ void TestQgsSfcgal::differenceCheck2()
{
initPainterTest();
// should be a single polygon as (A - B) = subset of A
std::unique_ptr<QgsSfcgalGeometry> geomA = std::make_unique<QgsSfcgalGeometry>( mpPolygonGeometryA );
auto geomA = std::make_unique<QgsSfcgalGeometry>( mpPolygonGeometryA );
std::unique_ptr<QgsSfcgalGeometry> diffGeom = geomA->difference( mpPolygonGeometryB.constGet() );
QCOMPARE( diffGeom->wkbType(), Qgis::WkbType::Polygon );
@ -935,7 +935,7 @@ void TestQgsSfcgal::buffer3DCheck()
"116.868555 35.534051, 116.617007 35.869448, 116.491233 35.953297, "
"116.155836 36.288694, 116.071987 36.372544, 115.443117 36.749865, "
"114.814247 37.043338, 114.311152 37.169112)";
std::unique_ptr<QgsSfcgalGeometry> sfcgalLine2D = std::make_unique<QgsSfcgalGeometry>( sfcgalLine2DWkt );
auto sfcgalLine2D = std::make_unique<QgsSfcgalGeometry>( sfcgalLine2DWkt );
std::unique_ptr<QgsSfcgalGeometry> sfcgalBuffer3D( sfcgalLine2D->buffer3D( 20.0, 7, Qgis::JoinStyle3D::Round ) );
QVERIFY2( sfcgalBuffer3D != nullptr, "buffer 3d is NULL." );
@ -966,7 +966,7 @@ void TestQgsSfcgal::buffer3DCheck()
void TestQgsSfcgal::buffer2DCheck()
{
std::unique_ptr<QgsSfcgalGeometry> sfcgalLine2D = std::make_unique<QgsSfcgalGeometry>( mpPolygonGeometryA );
auto sfcgalLine2D = std::make_unique<QgsSfcgalGeometry>( mpPolygonGeometryA );
std::unique_ptr<QgsSfcgalGeometry> sfcgalBuffer2D( sfcgalLine2D->buffer2D( 20.0, 7, Qgis::JoinStyle::Round ) );
QVERIFY2( sfcgalBuffer2D != nullptr, "2D Buffer is NULL" );
@ -979,7 +979,7 @@ void TestQgsSfcgal::buffer2DCheck()
void TestQgsSfcgal::extrude()
{
std::unique_ptr<QgsSfcgalGeometry> sfcgalPolygonA = std::make_unique<QgsSfcgalGeometry>( mSfcgalPolygonZA );
auto sfcgalPolygonA = std::make_unique<QgsSfcgalGeometry>( mSfcgalPolygonZA );
const QgsVector3D extrusion( 0, 0, 30 );
std::unique_ptr<QgsSfcgalGeometry> sfcgalExtrusion( sfcgalPolygonA->extrude( extrusion ) );

View File

@ -340,7 +340,7 @@ void TestQgsGdalUtils::testResampleSingleBandRasterNoData()
QCOMPARE( err, CE_None );
// Create destination GDAL DS
std::unique_ptr<QgsRasterBlock> dstBlock = std::make_unique<QgsRasterBlock>( Qgis::DataType::UInt16, 4, 4 );
auto dstBlock = std::make_unique<QgsRasterBlock>( Qgis::DataType::UInt16, 4, 4 );
dstBlock->setNoDataValue( 65535.0 );
gdal::dataset_unique_ptr gdalDsOutput = QgsGdalUtils::blockToSingleBandMemoryDataset( QgsRectangle( 1, 1, 3, 3 ), dstBlock.get() );

View File

@ -834,7 +834,7 @@ void TestQgsLayerTree::testFindNestedGroups()
void TestQgsLayerTree::testCustomNodes()
{
std::unique_ptr< QgsLayerTreeCustomNode > custom = std::make_unique< QgsLayerTreeCustomNode >( QStringLiteral( "custom-id" ) );
auto custom = std::make_unique< QgsLayerTreeCustomNode >( QStringLiteral( "custom-id" ) );
QVERIFY( QgsLayerTree::isCustomNode( custom.get() ) );
QCOMPARE( custom->nodeId(), QStringLiteral( "custom-id" ) );
QCOMPARE( custom->name(), QStringLiteral( "custom-id" ) );

View File

@ -1279,7 +1279,7 @@ void TestQgsAttributeForm::testFieldConstraintDuplicateField()
void TestQgsAttributeForm::testCaseInsensitiveFieldConstraint()
{
std::unique_ptr<QgsVectorLayer> layer = std::make_unique<QgsVectorLayer>( QStringLiteral( "Point?field=f1:integer&field=f2:integer&field=f3:integer" ), QStringLiteral( "test" ), QStringLiteral( "memory" ) );
auto layer = std::make_unique<QgsVectorLayer>( QStringLiteral( "Point?field=f1:integer&field=f2:integer&field=f3:integer" ), QStringLiteral( "test" ), QStringLiteral( "memory" ) );
layer->setEditorWidgetSetup( 0, QgsEditorWidgetSetup( QStringLiteral( "TextEdit" ), QVariantMap() ) );
layer->setEditorWidgetSetup( 1, QgsEditorWidgetSetup( QStringLiteral( "TextEdit" ), QVariantMap() ) );

View File

@ -94,7 +94,7 @@ void TestQgsAttributesFormModel::cleanup()
void TestQgsAttributesFormModel::testAttributesFormItem()
{
// Default constructor (used for the root item)
std::unique_ptr< QgsAttributesFormItem > rootItem = std::make_unique< QgsAttributesFormItem >();
auto rootItem = std::make_unique< QgsAttributesFormItem >();
QVERIFY( rootItem->data( QgsAttributesFormModel::ItemIdRole ).toString().isEmpty() );
QVERIFY( rootItem->data( QgsAttributesFormModel::ItemNameRole ).toString().isEmpty() );
QVERIFY( rootItem->data( QgsAttributesFormModel::ItemDisplayRole ).toString().isEmpty() );
@ -105,7 +105,7 @@ void TestQgsAttributesFormModel::testAttributesFormItem()
// Second constructor
const QString item1Name = QStringLiteral( "child item1 name" );
const QString item1DisplayName = QStringLiteral( "child item1 display name" );
std::unique_ptr< QgsAttributesFormItem > item = std::make_unique< QgsAttributesFormItem >( QgsAttributesFormData::Field, item1Name, item1DisplayName );
auto item = std::make_unique< QgsAttributesFormItem >( QgsAttributesFormData::Field, item1Name, item1DisplayName );
QVERIFY( !item->parent() );
QCOMPARE( item->data( QgsAttributesFormModel::ItemNameRole ).toString(), item1Name );
QCOMPARE( item->data( QgsAttributesFormModel::ItemDisplayRole ).toString(), item1DisplayName );
@ -138,7 +138,7 @@ void TestQgsAttributesFormModel::testAttributesFormItem()
QgsAttributesFormData::AttributeFormItemData itemData;
itemData.setShowLabel( false );
std::unique_ptr< QgsAttributesFormItem > item2 = std::make_unique< QgsAttributesFormItem >( QgsAttributesFormData::Field, itemData, item2Name, item2DisplayName, rootItem.get() );
auto item2 = std::make_unique< QgsAttributesFormItem >( QgsAttributesFormData::Field, itemData, item2Name, item2DisplayName, rootItem.get() );
QVERIFY( item2->parent() );
QCOMPARE( item2->data( QgsAttributesFormModel::ItemNameRole ).toString(), item2Name );
QCOMPARE( item2->data( QgsAttributesFormModel::ItemDisplayRole ).toString(), item2DisplayName );
@ -162,12 +162,12 @@ void TestQgsAttributesFormModel::testAttributesFormItem()
// Add container and grandchild
const QString containerName = QStringLiteral( "Tab" );
std::unique_ptr< QgsAttributesFormItem > containerItem = std::make_unique< QgsAttributesFormItem >( QgsAttributesFormData::Container, containerName );
auto containerItem = std::make_unique< QgsAttributesFormItem >( QgsAttributesFormData::Container, containerName );
QCOMPARE( containerItem->childCount(), 0 );
containerItem->setData( QgsAttributesFormModel::ItemIdRole, containerName );
const QString relationName = QStringLiteral( "Relation item" );
std::unique_ptr< QgsAttributesFormItem > relationItem = std::make_unique< QgsAttributesFormItem >( QgsAttributesFormData::Relation, relationName );
auto relationItem = std::make_unique< QgsAttributesFormItem >( QgsAttributesFormData::Relation, relationName );
const QString relationId = QStringLiteral( "relationId" );
relationItem->setData( QgsAttributesFormModel::ItemIdRole, relationId );

View File

@ -135,7 +135,7 @@ void TestQgsScaleComboBox::basic()
void TestQgsScaleComboBox::flexible()
{
std::unique_ptr< QgsScaleComboBox > combo = std::make_unique< QgsScaleComboBox >();
auto combo = std::make_unique< QgsScaleComboBox >();
combo->setRatioMode( QgsScaleComboBox::RatioMode::Flexible );
const QStringList scales = QgsSettingsRegistryCore::settingsMapScales->value();