Navigation Menu

Skip to content

Commit

Permalink
Optimise QString equality tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Nov 5, 2017
1 parent 8499d7f commit 2df5332
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/core/qgsvectorfilewriter.cpp
Expand Up @@ -2703,7 +2703,7 @@ QList< QgsVectorFileWriter::FilterFormatDetails > QgsVectorFileWriter::supported
{
// skip non-spatial formats
// TODO - use GDAL metadata to determine this, when support exists in GDAL
if ( drvName == QStringLiteral( "ODS" ) || drvName == QStringLiteral( "XLSX" ) || drvName == QStringLiteral( "XLS" ) )
if ( drvName == QLatin1String( "ODS" ) || drvName == QLatin1String( "XLSX" ) || drvName == QLatin1String( "XLS" ) )
continue;
}

Expand All @@ -2717,12 +2717,12 @@ QList< QgsVectorFileWriter::FilterFormatDetails > QgsVectorFileWriter::supported

if ( options & SortRecommended )
{
if ( drvName == QStringLiteral( "ESRI Shapefile" ) )
if ( drvName == QLatin1String( "ESRI Shapefile" ) )
{
shapeFormat = details;
continue;
}
else if ( drvName == QStringLiteral( "GPKG" ) )
else if ( drvName == QLatin1String( "GPKG" ) )
{
gpkgFormat = details;
continue;
Expand Down Expand Up @@ -2793,7 +2793,7 @@ QList< QgsVectorFileWriter::DriverDetails > QgsVectorFileWriter::ogrDriverList(
{
// skip non-spatial formats
// TODO - use GDAL metadata to determine this, when support exists in GDAL
if ( drvName == QStringLiteral( "ODS" ) || drvName == QStringLiteral( "XLSX" ) || drvName == QStringLiteral( "XLS" ) )
if ( drvName == QLatin1String( "ODS" ) || drvName == QLatin1String( "XLSX" ) || drvName == QLatin1String( "XLS" ) )
continue;
}

Expand Down

0 comments on commit 2df5332

Please sign in to comment.