Skip to content
Permalink
Browse files

Optimise QString equality tests

  • Loading branch information
nyalldawson committed Nov 5, 2017
1 parent 8499d7f commit 2df533240938cb7801e70d6fef5502099b46e9cb
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/core/qgsvectorfilewriter.cpp
@@ -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;
}

@@ -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;
@@ -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;
}

0 comments on commit 2df5332

Please sign in to comment.
You can’t perform that action at this time.