mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-26 00:02:08 -05:00
Fix some inefficient QString replace calls
This commit is contained in:
parent
148380abef
commit
718e4985c6
@ -1154,7 +1154,7 @@ QString QgsGdalProvider::generateBandName( int bandNumber ) const
|
||||
val = values.at( 1 );
|
||||
if ( values.at( 0 ) == QLatin1String( "NETCDF_DIM_EXTRA" ) )
|
||||
{
|
||||
dimExtraValues = val.replace( QStringLiteral( "{" ), QString() ).replace( QStringLiteral( "}" ), QString() ).split( ',' );
|
||||
dimExtraValues = val.replace( '{', QString() ).replace( '}', QString() ).split( ',' );
|
||||
//http://qt-project.org/doc/qt-4.8/qregexp.html#capturedTexts
|
||||
}
|
||||
else
|
||||
|
@ -81,7 +81,7 @@ QMap<QString, QString> QgsServerRequest::parameters() const
|
||||
{
|
||||
// prepare the value
|
||||
QString value = pair.second;
|
||||
value.replace( "+", " " );
|
||||
value.replace( '+', ' ' );
|
||||
|
||||
mParams.insert( pair.first.toUpper(), value );
|
||||
}
|
||||
|
@ -1298,7 +1298,7 @@ namespace QgsWfs
|
||||
continue;
|
||||
}
|
||||
|
||||
QDomElement fieldElem = doc.createElement( "qgs:" + attributeName.replace( QStringLiteral( " " ), QStringLiteral( "_" ) ) );
|
||||
QDomElement fieldElem = doc.createElement( "qgs:" + attributeName.replace( ' ', '_' ) );
|
||||
QDomText fieldText = doc.createTextNode( featureAttributes[idx].toString() );
|
||||
fieldElem.appendChild( fieldText );
|
||||
typeNameElement.appendChild( fieldElem );
|
||||
@ -1399,7 +1399,7 @@ namespace QgsWfs
|
||||
continue;
|
||||
}
|
||||
|
||||
QDomElement fieldElem = doc.createElement( "qgs:" + attributeName.replace( QStringLiteral( " " ), QStringLiteral( "_" ) ) );
|
||||
QDomElement fieldElem = doc.createElement( "qgs:" + attributeName.replace( ' ', '_' ) );
|
||||
QDomText fieldText = doc.createTextNode( featureAttributes[idx].toString() );
|
||||
fieldElem.appendChild( fieldText );
|
||||
typeNameElement.appendChild( fieldElem );
|
||||
|
@ -383,7 +383,7 @@ namespace QgsWfs
|
||||
|
||||
if ( !bbox.isEmpty() )
|
||||
{
|
||||
const QStringList corners = bbox.split( ',' );
|
||||
QStringList corners = bbox.split( ',' );
|
||||
|
||||
if ( corners.size() == 4 )
|
||||
{
|
||||
|
@ -933,7 +933,7 @@ namespace QgsWfs
|
||||
}
|
||||
|
||||
// get bbox corners
|
||||
const QStringList corners = bbox.split( ',' );
|
||||
QStringList corners = bbox.split( ',' );
|
||||
if ( corners.size() != 4 )
|
||||
{
|
||||
throw QgsRequestNotWellFormedException( QStringLiteral( "BBOX has to be composed of 4 elements: '%1'" ).arg( bbox ) );
|
||||
|
@ -916,7 +916,7 @@ namespace QgsWfs
|
||||
}
|
||||
|
||||
// get bbox corners
|
||||
const QStringList corners = bbox.split( ',' );
|
||||
QStringList corners = bbox.split( ',' );
|
||||
if ( corners.size() != 4 )
|
||||
{
|
||||
throw QgsRequestNotWellFormedException( QStringLiteral( "BBOX has to be composed of 4 elements: '%1'" ).arg( bbox ) );
|
||||
|
@ -2224,7 +2224,7 @@ namespace QgsWms
|
||||
continue;
|
||||
}
|
||||
|
||||
QDomElement fieldElem = doc.createElement( "qgs:" + attributeName.replace( QStringLiteral( " " ), QStringLiteral( "_" ) ) );
|
||||
QDomElement fieldElem = doc.createElement( "qgs:" + attributeName.replace( ' ', '_' ) );
|
||||
QString fieldTextString = featureAttributes.at( i ).toString();
|
||||
if ( layer )
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user