Skip to content

Commit

Permalink
[Server] Replaced unnecessary QStringLiteral by character
Browse files Browse the repository at this point in the history
  • Loading branch information
rldhont committed Jun 5, 2017
1 parent 569cee1 commit b9c2b64
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions src/server/services/wms/qgsdxfwriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ namespace QgsWms
{
QMap<QString, QString> options;

QStringList optionsList = optionString.split( QStringLiteral( ";" ) );
QStringList optionsList = optionString.split( ';' );
for ( auto optionsIt = optionsList.constBegin(); optionsIt != optionsList.constEnd(); ++optionsIt )
{
int equalIdx = optionsIt->indexOf( QLatin1String( ":" ) );
int equalIdx = optionsIt->indexOf( ':' );
if ( equalIdx > 0 && equalIdx < ( optionsIt->length() - 1 ) )
{
options.insert( optionsIt->left( equalIdx ).toUpper(),
Expand All @@ -54,7 +54,7 @@ namespace QgsWms
QMap<QString, QString>::const_iterator layerAttributesIt = options.find( QStringLiteral( "LAYERATTRIBUTES" ) );
if ( layerAttributesIt != options.constEnd() )
{
layerAttributes = options.value( QStringLiteral( "LAYERATTRIBUTES" ) ).split( QStringLiteral( "," ) );
layerAttributes = options.value( QStringLiteral( "LAYERATTRIBUTES" ) ).split( ',' );
}

//LAYERS and STYLES
Expand Down
14 changes: 7 additions & 7 deletions src/server/services/wms/qgswmsrenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -965,7 +965,7 @@ namespace QgsWms
throw QgsBadRequestException( QStringLiteral( "ParameterMissing" ), QStringLiteral( "No QUERY_LAYERS" ) );
}

QStringList queryLayerList = mParameters[ QStringLiteral( "QUERY_LAYERS" )].split( QStringLiteral( "," ), QString::SkipEmptyParts );
QStringList queryLayerList = mParameters[ QStringLiteral( "QUERY_LAYERS" )].split( ',', QString::SkipEmptyParts );
if ( queryLayerList.isEmpty() )
{
throw QgsBadRequestException( QStringLiteral( "InvalidParameterValue" ), QStringLiteral( "Malformed QUERY_LAYERS" ) );
Expand Down Expand Up @@ -1921,10 +1921,10 @@ namespace QgsWms
QString filterParameter = mParameters.value( QStringLiteral( "FILTER" ) );
if ( !filterParameter.isEmpty() )
{
QStringList layerSplit = filterParameter.split( QStringLiteral( ";" ) );
QStringList layerSplit = filterParameter.split( ';' );
for ( auto layerIt = layerSplit.constBegin(); layerIt != layerSplit.constEnd(); ++layerIt )
{
QStringList eqSplit = layerIt->split( QStringLiteral( ":" ) );
QStringList eqSplit = layerIt->split( ':' );
if ( eqSplit.size() < 2 )
{
continue;
Expand Down Expand Up @@ -2027,7 +2027,7 @@ namespace QgsWms
return false;
}

QStringList tokens = filter.split( QStringLiteral( " " ), QString::SkipEmptyParts );
QStringList tokens = filter.split( ' ', QString::SkipEmptyParts );
groupStringList( tokens, QStringLiteral( "'" ) );
groupStringList( tokens, QStringLiteral( "\"" ) );

Expand Down Expand Up @@ -2161,7 +2161,7 @@ namespace QgsWms
Q_FOREACH ( const QString &selectionLayer, selectionString.split( ";" ) )
{
//separate layer name from id list
QStringList layerIdSplit = selectionLayer.split( QStringLiteral( ":" ) );
QStringList layerIdSplit = selectionLayer.split( ':' );
if ( layerIdSplit.size() < 2 )
{
continue;
Expand Down Expand Up @@ -2194,7 +2194,7 @@ namespace QgsWms
continue;
}

QStringList idList = layerIdSplit.at( 1 ).split( QStringLiteral( "," ) );
QStringList idList = layerIdSplit.at( 1 ).split( ',' );
QgsFeatureIds selectedIds;

Q_FOREACH ( const QString &id, idList )
Expand Down Expand Up @@ -2236,7 +2236,7 @@ namespace QgsWms
{
return;
}
QStringList opacityList = opIt.value().split( QStringLiteral( "," ) );
QStringList opacityList = opIt.value().split( ',' );

//collect leaf layers and their opacity
QVector< QPair< QgsMapLayer *, int > > layerOpacityList;
Expand Down

0 comments on commit b9c2b64

Please sign in to comment.