@@ -610,10 +610,10 @@ void TestQgsNetworkAnalysis::testSpeedStrategy()
610610void TestQgsNetworkAnalysis::testCurvedGeometries ()
611611{
612612 // CompaundCurve containing straight lines
613- auto network = std::make_unique<QgsVectorLayer>( u " CompoundCurve?crs=epsg:4326&field=cost:int" _s, u " x" _s, u " memory" _s );
613+ auto network = std::make_unique<QgsVectorLayer>( QStringLiteral ( " CompoundCurve?crs=epsg:4326&field=cost:int" ), QStringLiteral ( " x" ), QStringLiteral ( " memory" ) );
614614
615615 QgsFeature ff ( 0 );
616- QgsGeometry refGeom = QgsGeometry::fromWkt ( u " COMPOUNDCURVE((0 0, 10 0), (10 0, 10 10))" _s );
616+ QgsGeometry refGeom = QgsGeometry::fromWkt ( QStringLiteral ( " COMPOUNDCURVE((0 0, 10 0), (10 0, 10 10))" ) );
617617 ff.setGeometry ( refGeom );
618618 ff.setAttributes ( QgsAttributes () << 1 );
619619 network->dataProvider ()->addFeatures ( QgsFeatureList () << ff );
@@ -664,8 +664,8 @@ void TestQgsNetworkAnalysis::testCurvedGeometries()
664664 QCOMPARE ( graph->edgeCount (), 8 );
665665
666666 // CompaundCurve containing both straight line and CircularString
667- network.reset ( new QgsVectorLayer ( u " CompoundCurve?crs=epsg:4326&field=cost:int" _s, u " x" _s, u " memory" _s ) );
668- refGeom = QgsGeometry::fromWkt ( u " CompoundCurve((0 0, 5 0), CircularString(5 0, 7.5 2.5, 10 0))" _s );
667+ network.reset ( new QgsVectorLayer ( QStringLiteral ( " CompoundCurve?crs=epsg:4326&field=cost:int" ), QStringLiteral ( " x" ), QStringLiteral ( " memory" ) ) );
668+ refGeom = QgsGeometry::fromWkt ( QStringLiteral ( " CompoundCurve((0 0, 5 0), CircularString(5 0, 7.5 2.5, 10 0))" ) );
669669 ff.setGeometry ( refGeom );
670670 network->dataProvider ()->addFeatures ( QgsFeatureList () << ff );
671671
@@ -697,8 +697,8 @@ void TestQgsNetworkAnalysis::testCurvedGeometries()
697697 QVERIFY ( junctionFound );
698698
699699 // CircularString
700- network.reset ( new QgsVectorLayer ( u " CircularString?crs=epsg:4326&field=cost:int" _s, u " x" _s, u " memory" _s ) );
701- refGeom = QgsGeometry::fromWkt ( u " CircularString(0 0, 5 5, 10 0)" _s );
700+ network.reset ( new QgsVectorLayer ( QStringLiteral ( " CircularString?crs=epsg:4326&field=cost:int" ), QStringLiteral ( " x" ), QStringLiteral ( " memory" ) ) );
701+ refGeom = QgsGeometry::fromWkt ( QStringLiteral ( " CircularString(0 0, 5 5, 10 0)" ) );
702702 ff.setGeometry ( refGeom );
703703 network->dataProvider ()->addFeatures ( QgsFeatureList () << ff );
704704 director.reset ( new QgsVectorLayerDirector ( network.get (), -1 , QString (), QString (), QString (), QgsVectorLayerDirector::DirectionBoth ) );
@@ -746,11 +746,11 @@ void TestQgsNetworkAnalysis::testCurvedGeometries()
746746 totalLength = builder->distanceArea ()->convertLengthMeasurement ( totalLength, Qgis::DistanceUnit::Degrees );
747747 const double expectedLength = M_PI * 5.0 ;
748748 const double tolerance = expectedLength * 0.05 ;
749- QVERIFY2 ( std::abs ( totalLength - expectedLength ) < tolerance, u " Path length %1 differs from expected %2 by more than tolerance %3" _s .arg ( totalLength ).arg ( expectedLength ).arg ( tolerance ).toLatin1 ().constData () );
749+ QVERIFY2 ( std::abs ( totalLength - expectedLength ) < tolerance, QStringLiteral ( " Path length %1 differs from expected %2 by more than tolerance %3" ) .arg ( totalLength ).arg ( expectedLength ).arg ( tolerance ).toLatin1 ().constData () );
750750
751751 // MultiCurve
752- network.reset ( new QgsVectorLayer ( u " MultiCurve?crs=epsg:4326&field=cost:int" _s, u " x" _s, u " memory" _s ) );
753- refGeom = QgsGeometry::fromWkt ( u " MultiCurve(CircularString(0 0, 2.5 2.5, 5 0), CircularString(5 0, 7.5 -2.5, 10 0))" _s );
752+ network.reset ( new QgsVectorLayer ( QStringLiteral ( " MultiCurve?crs=epsg:4326&field=cost:int" ), QStringLiteral ( " x" ), QStringLiteral ( " memory" ) ) );
753+ refGeom = QgsGeometry::fromWkt ( QStringLiteral ( " MultiCurve(CircularString(0 0, 2.5 2.5, 5 0), CircularString(5 0, 7.5 -2.5, 10 0))" ) );
754754 ff.setGeometry ( refGeom );
755755 network->dataProvider ()->addFeatures ( QgsFeatureList () << ff );
756756 director.reset ( new QgsVectorLayerDirector ( network.get (), -1 , QString (), QString (), QString (), QgsVectorLayerDirector::DirectionBoth ) );
0 commit comments