@@ -121,7 +121,7 @@ namespace QgsWfs
121
121
QString name = layer->name ();
122
122
if ( !layer->shortName ().isEmpty () )
123
123
name = layer->shortName ();
124
- name = name.replace ( QLatin1String ( " " ), QLatin1String ( " _ " ) );
124
+ name = name.replace ( ' ' , ' _ ' );
125
125
126
126
if ( typeNameList.contains ( name ) )
127
127
{
@@ -387,7 +387,7 @@ namespace QgsWfs
387
387
// parse FEATUREID
388
388
if ( parameters.contains ( QStringLiteral ( " FEATUREID" ) ) )
389
389
{
390
- QStringList fidList = parameters.value ( QStringLiteral ( " FEATUREID" ) ).split ( QStringLiteral ( " , " ) );
390
+ QStringList fidList = parameters.value ( QStringLiteral ( " FEATUREID" ) ).split ( ' , ' );
391
391
// Verifying the 1:1 mapping between FEATUREID and PROPERTYNAME
392
392
if ( !propertyNameList.isEmpty () && propertyNameList.size () != fidList.size () )
393
393
{
@@ -417,13 +417,13 @@ namespace QgsWfs
417
417
propertyName = *propertyNameIt;
418
418
}
419
419
// testing typename in the WFS featureID
420
- if ( !fid.contains ( QLatin1String ( " . " ) ) )
420
+ if ( !fid.contains ( ' . ' ) )
421
421
{
422
422
throw QgsRequestNotWellFormedException ( QStringLiteral ( " FEATUREID has to have TYPENAME in the values" ) );
423
423
}
424
424
425
- QString typeName = fid.section ( QStringLiteral ( " . " ) , 0 , 0 );
426
- fid = fid.section ( QStringLiteral ( " . " ) , 1 , 1 );
425
+ QString typeName = fid.section ( ' . ' , 0 , 0 );
426
+ fid = fid.section ( ' . ' , 1 , 1 );
427
427
if ( !typeNameList.contains ( typeName ) )
428
428
{
429
429
typeNameList << typeName;
@@ -467,23 +467,23 @@ namespace QgsWfs
467
467
{
468
468
QStringList propertyList;
469
469
470
- QStringList attrList = propertyName.split ( QStringLiteral ( " , " ) );
470
+ QStringList attrList = propertyName.split ( ' , ' );
471
471
QStringList::const_iterator alstIt;
472
472
for ( alstIt = attrList.begin (); alstIt != attrList.end (); ++alstIt )
473
473
{
474
474
QString fieldName = *alstIt;
475
475
fieldName = fieldName.trimmed ();
476
- if ( fieldName.contains ( QLatin1String ( " : " ) ) )
476
+ if ( fieldName.contains ( ' : ' ) )
477
477
{
478
- fieldName = fieldName.section ( QStringLiteral ( " : " ) , 1 , 1 );
478
+ fieldName = fieldName.section ( ' : ' , 1 , 1 );
479
479
}
480
- if ( fieldName.contains ( QLatin1String ( " / " ) ) )
480
+ if ( fieldName.contains ( ' / ' ) )
481
481
{
482
- if ( fieldName.section ( QStringLiteral ( " / " ) , 0 , 0 ) != typeName )
482
+ if ( fieldName.section ( ' / ' , 0 , 0 ) != typeName )
483
483
{
484
484
throw QgsRequestNotWellFormedException ( QStringLiteral ( " PropertyName text '%1' has to contain TypeName '%2'" ).arg ( fieldName ).arg ( typeName ) );
485
485
}
486
- fieldName = fieldName.section ( QStringLiteral ( " / " ) , 1 , 1 );
486
+ fieldName = fieldName.section ( ' / ' , 1 , 1 );
487
487
}
488
488
propertyList.append ( fieldName );
489
489
}
@@ -513,7 +513,7 @@ namespace QgsWfs
513
513
throw QgsRequestNotWellFormedException ( QStringLiteral ( " TYPENAME is mandatory except if FEATUREID is used" ) );
514
514
}
515
515
516
- typeNameList = parameters.value ( QStringLiteral ( " TYPENAME" ) ).split ( QStringLiteral ( " , " ) );
516
+ typeNameList = parameters.value ( QStringLiteral ( " TYPENAME" ) ).split ( ' , ' );
517
517
// Verifying the 1:1 mapping between TYPENAME and PROPERTYNAME
518
518
if ( !propertyNameList.isEmpty () && typeNameList.size () != propertyNameList.size () )
519
519
{
@@ -549,23 +549,23 @@ namespace QgsWfs
549
549
{
550
550
QStringList propertyList;
551
551
552
- QStringList attrList = propertyName.split ( QStringLiteral ( " , " ) );
552
+ QStringList attrList = propertyName.split ( ' , ' );
553
553
QStringList::const_iterator alstIt;
554
554
for ( alstIt = attrList.begin (); alstIt != attrList.end (); ++alstIt )
555
555
{
556
556
QString fieldName = *alstIt;
557
557
fieldName = fieldName.trimmed ();
558
- if ( fieldName.contains ( QLatin1String ( " : " ) ) )
558
+ if ( fieldName.contains ( ' : ' ) )
559
559
{
560
- fieldName = fieldName.section ( QStringLiteral ( " : " ) , 1 , 1 );
560
+ fieldName = fieldName.section ( ' : ' , 1 , 1 );
561
561
}
562
- if ( fieldName.contains ( QLatin1String ( " / " ) ) )
562
+ if ( fieldName.contains ( ' / ' ) )
563
563
{
564
- if ( fieldName.section ( QStringLiteral ( " / " ) , 0 , 0 ) != typeName )
564
+ if ( fieldName.section ( ' / ' , 0 , 0 ) != typeName )
565
565
{
566
566
throw QgsRequestNotWellFormedException ( QStringLiteral ( " PropertyName text '%1' has to contain TypeName '%2'" ).arg ( fieldName ).arg ( typeName ) );
567
567
}
568
- fieldName = fieldName.section ( QStringLiteral ( " / " ) , 1 , 1 );
568
+ fieldName = fieldName.section ( ' / ' , 1 , 1 );
569
569
}
570
570
propertyList.append ( fieldName );
571
571
}
@@ -660,7 +660,7 @@ namespace QgsWfs
660
660
bool ok;
661
661
for ( int i = 0 ; i < 4 ; i++ )
662
662
{
663
- corners[i].replace ( QLatin1String ( " " ), QLatin1String ( " + " ) );
663
+ corners[i].replace ( ' ' , ' + ' );
664
664
d[i] = corners[i].toDouble ( &ok );
665
665
if ( !ok )
666
666
{
@@ -769,9 +769,9 @@ namespace QgsWfs
769
769
getFeatureQuery parseQueryElement ( QDomElement &queryElem )
770
770
{
771
771
QString typeName = queryElem.attribute ( QStringLiteral ( " typeName" ), QLatin1String ( " " ) );
772
- if ( typeName.contains ( QLatin1String ( " : " ) ) )
772
+ if ( typeName.contains ( ' : ' ) )
773
773
{
774
- typeName = typeName.section ( QStringLiteral ( " : " ) , 1 , 1 );
774
+ typeName = typeName.section ( ' : ' , 1 , 1 );
775
775
}
776
776
777
777
QgsFeatureRequest featureRequest;
@@ -785,17 +785,17 @@ namespace QgsWfs
785
785
if ( queryChildElem.tagName () == QLatin1String ( " PropertyName" ) )
786
786
{
787
787
QString fieldName = queryChildElem.text ().trimmed ();
788
- if ( fieldName.contains ( QLatin1String ( " : " ) ) )
788
+ if ( fieldName.contains ( ' : ' ) )
789
789
{
790
- fieldName = fieldName.section ( QStringLiteral ( " : " ) , 1 , 1 );
790
+ fieldName = fieldName.section ( ' : ' , 1 , 1 );
791
791
}
792
- if ( fieldName.contains ( QLatin1String ( " / " ) ) )
792
+ if ( fieldName.contains ( ' / ' ) )
793
793
{
794
- if ( fieldName.section ( QStringLiteral ( " / " ) , 0 , 0 ) != typeName )
794
+ if ( fieldName.section ( ' / ' , 0 , 0 ) != typeName )
795
795
{
796
796
throw QgsRequestNotWellFormedException ( QStringLiteral ( " PropertyName text '%1' has to contain TypeName '%2'" ).arg ( fieldName ).arg ( typeName ) );
797
797
}
798
- fieldName = fieldName.section ( QStringLiteral ( " / " ) , 1 , 1 );
798
+ fieldName = fieldName.section ( ' / ' , 1 , 1 );
799
799
}
800
800
propertyList.append ( fieldName );
801
801
}
@@ -878,7 +878,7 @@ namespace QgsWfs
878
878
query.removeAllQueryItems ( QStringLiteral ( " _DC" ) );
879
879
880
880
query.addQueryItem ( QStringLiteral ( " REQUEST" ), QStringLiteral ( " DescribeFeatureType" ) );
881
- query.addQueryItem ( QStringLiteral ( " TYPENAME" ), typeNames.join ( QStringLiteral ( " , " ) ) );
881
+ query.addQueryItem ( QStringLiteral ( " TYPENAME" ), typeNames.join ( ' , ' ) );
882
882
query.addQueryItem ( QStringLiteral ( " OUTPUTFORMAT" ), QStringLiteral ( " XMLSCHEMA" ) );
883
883
884
884
mapUrl.setQuery ( query );
0 commit comments