diff --git a/src/analysis/georeferencing/qgsleastsquares.cpp b/src/analysis/georeferencing/qgsleastsquares.cpp index a61cfb691645..1d85b5cdd2b3 100644 --- a/src/analysis/georeferencing/qgsleastsquares.cpp +++ b/src/analysis/georeferencing/qgsleastsquares.cpp @@ -77,7 +77,7 @@ void QgsLeastSquares::helmert( const QVector &sourceCoordinates, ( void )origin; ( void )pixelSize; ( void )rotation; - throw QgsNotSupportedException( QStringLiteral( "Calculating a helmert transformation requires a QGIS build based GSL" ) ); + throw QgsNotSupportedException( QObject::tr( "Calculating a helmert transformation requires a QGIS build based GSL" ) ); #else const int n = destinationCoordinates.size(); if ( n < 2 ) @@ -262,7 +262,7 @@ void QgsLeastSquares::projective( const QVector &sourceCoordinates, ( void )sourceCoordinates; ( void )destinationCoordinates; ( void )H; - throw QgsNotSupportedException( QStringLiteral( "Calculating a projective transformation requires a QGIS build based GSL" ) ); + throw QgsNotSupportedException( QObject::tr( "Calculating a projective transformation requires a QGIS build based GSL" ) ); #else Q_ASSERT( sourceCoordinates.size() == destinationCoordinates.size() ); diff --git a/src/core/geometry/qgsgeos.cpp b/src/core/geometry/qgsgeos.cpp index 5bbc61203daa..582f998404b1 100644 --- a/src/core/geometry/qgsgeos.cpp +++ b/src/core/geometry/qgsgeos.cpp @@ -169,10 +169,10 @@ std::unique_ptr QgsGeos::makeValid( Qgis::MakeValidMethod m #if GEOS_VERSION_MAJOR==3 && GEOS_VERSION_MINOR<10 if ( method != Qgis::MakeValidMethod::Linework ) - throw QgsNotSupportedException( QStringLiteral( "The structured method to make geometries valid requires a QGIS build based on GEOS 3.10 or later" ) ); + throw QgsNotSupportedException( QObject::tr( "The structured method to make geometries valid requires a QGIS build based on GEOS 3.10 or later" ) ); if ( keepCollapsed ) - throw QgsNotSupportedException( QStringLiteral( "The keep collapsed option for making geometries valid requires a QGIS build based on GEOS 3.10 or later" ) ); + throw QgsNotSupportedException( QObject::tr( "The keep collapsed option for making geometries valid requires a QGIS build based on GEOS 3.10 or later" ) ); geos::unique_ptr geos; try { @@ -2011,7 +2011,7 @@ QgsAbstractGeometry *QgsGeos::concaveHull( double targetPercent, bool allowHoles ( void )allowHoles; ( void )targetPercent; ( void )errorMsg; - throw QgsNotSupportedException( QStringLiteral( "Calculating concaveHull requires a QGIS build based on GEOS 3.11 or later" ) ); + throw QgsNotSupportedException( QObject::tr( "Calculating concaveHull requires a QGIS build based on GEOS 3.11 or later" ) ); #else if ( !mGeos ) { diff --git a/src/core/proj/qgscoordinatereferencesystem.cpp b/src/core/proj/qgscoordinatereferencesystem.cpp index 70417aaf3059..83f68e44b68b 100644 --- a/src/core/proj/qgscoordinatereferencesystem.cpp +++ b/src/core/proj/qgscoordinatereferencesystem.cpp @@ -1326,7 +1326,7 @@ QString QgsCoordinateReferenceSystem::celestialBodyName() const return QString( proj_get_celestial_body_name( context, pj ) ); #else - throw QgsNotSupportedException( QStringLiteral( "Retrieving celestial body requires a QGIS build based on PROJ 8.1 or later" ) ); + throw QgsNotSupportedException( QObject::tr( "Retrieving celestial body requires a QGIS build based on PROJ 8.1 or later" ) ); #endif } @@ -1389,7 +1389,7 @@ QgsDatumEnsemble QgsCoordinateReferenceSystem::datumEnsemble() const } return res; #else - throw QgsNotSupportedException( QStringLiteral( "Calculating datum ensembles requires a QGIS build based on PROJ 8.0 or later" ) ); + throw QgsNotSupportedException( QObject::tr( "Calculating datum ensembles requires a QGIS build based on PROJ 8.0 or later" ) ); #endif } diff --git a/src/core/proj/qgscoordinatereferencesystemregistry.cpp b/src/core/proj/qgscoordinatereferencesystemregistry.cpp index b3b6c16f133e..0b5a0578e711 100644 --- a/src/core/proj/qgscoordinatereferencesystemregistry.cpp +++ b/src/core/proj/qgscoordinatereferencesystemregistry.cpp @@ -406,6 +406,6 @@ QList< QgsCelestialBody> QgsCoordinateReferenceSystemRegistry::celestialBodies() return mCelestialBodies; #else - throw QgsNotSupportedException( QStringLiteral( "Retrieving celestial bodies requires a QGIS build based on PROJ 8.1 or later" ) ); + throw QgsNotSupportedException( QObject::tr( "Retrieving celestial bodies requires a QGIS build based on PROJ 8.1 or later" ) ); #endif } diff --git a/src/core/proj/qgsprojutils.cpp b/src/core/proj/qgsprojutils.cpp index 13758c73ba50..73254d0fbb14 100644 --- a/src/core/proj/qgsprojutils.cpp +++ b/src/core/proj/qgsprojutils.cpp @@ -227,7 +227,7 @@ QgsProjUtils::proj_pj_unique_ptr QgsProjUtils::crsToDatumEnsemble( const PJ *crs return QgsProjUtils::proj_pj_unique_ptr( proj_crs_get_datum_ensemble( context, singleCrs.get() ) ); #else - throw QgsNotSupportedException( QStringLiteral( "Calculating datum ensembles requires a QGIS build based on PROJ 8.0 or later" ) ); + throw QgsNotSupportedException( QObject::tr( "Calculating datum ensembles requires a QGIS build based on PROJ 8.0 or later" ) ); #endif }