Skip to content

Commit e6ac616

Browse files
committed
Fix pre-commit errors
1 parent 099dcad commit e6ac616

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

src/core/providers/gdal/qgsgdalprovider.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4155,7 +4155,7 @@ QgsGdalProvider *QgsGdalProviderMetadata::createRasterDataProvider(
41554155
}
41564156
if ( !GDALGetMetadataItem( driver, GDAL_DCAP_CREATE, nullptr ) )
41574157
{
4158-
QgsError error( "GDAL driver " + format + " does not implement the Create interface", QStringLiteral( "GDAL provider" ) );
4158+
QgsError error( "GDAL driver " + format + " does not implement the Create interface", u"GDAL provider"_s );
41594159
return new QgsGdalProvider( uri, error );
41604160
}
41614161

src/core/raster/qgsrasterfilewriter.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ Qgis::RasterFileWriterResult QgsRasterFileWriter::writeDataRaster( const QgsRast
477477
{
478478
if ( mBuildPyramidsFlag == Qgis::RasterBuildPyramidOption::Yes &&
479479
// Pyramid creation is done by the driver itself
480-
mOutputFormat != QLatin1String( "COG" ) )
480+
mOutputFormat != "COG"_L1 )
481481
{
482482
if ( !buildPyramids( mOutputUrl, destProvider.get() ) )
483483
{
@@ -815,7 +815,7 @@ Qgis::RasterFileWriterResult QgsRasterFileWriter::writeImageRaster( QgsRasterIte
815815

816816
if ( mBuildPyramidsFlag == Qgis::RasterBuildPyramidOption::Yes &&
817817
// Pyramid creation is done by the driver itself
818-
mOutputFormat != QLatin1String( "COG" ) )
818+
mOutputFormat != "COG"_L1 )
819819
{
820820
if ( !buildPyramids( mOutputUrl ) )
821821
return Qgis::RasterFileWriterResult::WriteError;
@@ -1083,7 +1083,7 @@ QgsRasterDataProvider *QgsRasterFileWriter::createPartProvider( const QgsRectang
10831083
void QgsRasterFileWriter::setOutputFormat( const QString &format )
10841084
{
10851085
mOutputFormat = format;
1086-
if ( !mBuildPyramidsFlagSet && format == QLatin1String( "COG" ) )
1086+
if ( !mBuildPyramidsFlagSet && format == "COG"_L1 )
10871087
{
10881088
setBuildPyramidsFlag( Qgis::RasterBuildPyramidOption::Yes );
10891089
}
@@ -1113,13 +1113,13 @@ QgsRasterDataProvider *QgsRasterFileWriter::initOutput( int nCols, int nRows, co
11131113
mCreationOptions << "COPY_SRC_OVERVIEWS=YES";
11141114
#endif
11151115
QStringList creationOptions( mCreationOptions );
1116-
if ( mOutputFormat == QLatin1String( "COG" ) )
1116+
if ( mOutputFormat == "COG"_L1 )
11171117
{
11181118
if ( mBuildPyramidsFlag == Qgis::RasterBuildPyramidOption::No )
1119-
creationOptions << QStringLiteral( "OVERVIEWS=NO" );
1119+
creationOptions << u"OVERVIEWS=NO"_s;
11201120
else
11211121
{
1122-
creationOptions << QStringLiteral( "OVERVIEW_RESAMPLING=" ) + mPyramidsResampling;
1122+
creationOptions << u"OVERVIEW_RESAMPLING="_s + mPyramidsResampling;
11231123
for ( const QString &opt : std::as_const( mPyramidsConfigOptions ) )
11241124
{
11251125
const std::string optStr( opt.toStdString() );
@@ -1129,15 +1129,15 @@ QgsRasterDataProvider *QgsRasterFileWriter::initOutput( int nCols, int nRows, co
11291129
{
11301130
if ( EQUAL( key, "JPEG_QUALITY_OVERVIEW" ) )
11311131
{
1132-
creationOptions << QStringLiteral( "OVERVIEW_QUALITY=" ) + value;
1132+
creationOptions << u"OVERVIEW_QUALITY="_s + value;
11331133
}
11341134
else if ( EQUAL( key, "COMPRESS_OVERVIEW" ) )
11351135
{
1136-
creationOptions << QStringLiteral( "OVERVIEW_COMPRESS=" ) + value;
1136+
creationOptions << u"OVERVIEW_COMPRESS="_s + value;
11371137
}
11381138
else if ( EQUAL( key, "PREDICTOR_OVERVIEW" ) )
11391139
{
1140-
creationOptions << QStringLiteral( "OVERVIEW_PREDICTOR=" ) + value;
1140+
creationOptions << u"OVERVIEW_PREDICTOR="_s + value;
11411141
}
11421142
}
11431143
CPLFree( key );

src/gui/qgsrasterlayersaveasdialog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ void QgsRasterLayerSaveAsDialog::mFormatComboBox_currentIndexChanged( const QStr
351351
mLayerName->setText( QString() );
352352
}
353353

354-
const bool isCOG = ( outputFormat() == QLatin1String( "COG" ) );
354+
const bool isCOG = ( outputFormat() == "COG"_L1 );
355355
if ( isCOG )
356356
{
357357
mPyramidsGroupBox->setChecked( true );

src/gui/qgsrasterpyramidsoptionswidget.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ void QgsRasterPyramidsOptionsWidget::apply()
161161

162162
void QgsRasterPyramidsOptionsWidget::tuneForFormat( const QString &driverName )
163163
{
164-
const bool visible = ( driverName != QLatin1String( "COG" ) );
164+
const bool visible = ( driverName != "COG"_L1 );
165165
labelOverviewFormat->setVisible( visible );
166166
cbxPyramidsFormat->setVisible( visible );
167167
labelLevels->setVisible( visible );

0 commit comments

Comments
 (0)