Skip to content

Commit

Permalink
2.18 also uses Qt4 which doesn't have QStringLiteral (followup a122e02
Browse files Browse the repository at this point in the history
…and c71e550)
  • Loading branch information
jef-n committed Dec 19, 2017
1 parent a122e02 commit b06f99b
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions tests/src/app/testqgsmaptoolreshape.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ void TestQgsMapToolReshape::initTestCase()
QgsApplication::initQgis();

// Set up the QgsSettings environment
QCoreApplication::setOrganizationName( QStringLiteral( "QGIS" ) );
QCoreApplication::setOrganizationDomain( QStringLiteral( "qgis.org" ) );
QCoreApplication::setApplicationName( QStringLiteral( "QGIS-TEST" ) );
QCoreApplication::setOrganizationName( "QGIS" );
QCoreApplication::setOrganizationDomain( "qgis.org" );
QCoreApplication::setApplicationName( "QGIS-TEST" );

QgsApplication::showSettings();

Expand All @@ -76,7 +76,7 @@ void TestQgsMapToolReshape::cleanup()
void TestQgsMapToolReshape::reshapeWithBindingLine()
{
// prepare vector layer
QgsVectorLayer *vl = new QgsVectorLayer( QStringLiteral( "LineString?crs=epsg:4326&field=name:string(20)" ), QStringLiteral( "vl" ), QStringLiteral( "memory" ) );
QgsVectorLayer *vl = new QgsVectorLayer( "LineString?crs=epsg:4326&field=name:string(20)", "vl", "memory" );

QgsGeometry *g0 = QgsGeometry::fromWkt( "LineString (0 0, 1 1, 1 2)" );
QgsFeature f0;
Expand Down Expand Up @@ -116,10 +116,10 @@ void TestQgsMapToolReshape::reshapeWithBindingLine()
tool0.reshape( vl );

vl->getFeatures( QgsFeatureRequest().setFilterFid( 1 ) ).nextFeature( f0 );
QCOMPARE( f0.geometry()->exportToWkt(), QStringLiteral( "LineString (0 0, 1 1, 1 2, 2 1)" ) );
QCOMPARE( f0.geometry()->exportToWkt(), QString( "LineString (0 0, 1 1, 1 2, 2 1)" ) );

vl->getFeatures( QgsFeatureRequest().setFilterFid( 2 ) ).nextFeature( f1 );
QCOMPARE( f1.geometry()->exportToWkt(), QStringLiteral( "LineString (2 1, 3 2, 3 3, 2 2)" ) );
QCOMPARE( f1.geometry()->exportToWkt(), QString( "LineString (2 1, 3 2, 3 3, 2 2)" ) );

vl->rollBack();

Expand All @@ -138,10 +138,10 @@ void TestQgsMapToolReshape::reshapeWithBindingLine()
tool1.reshape( vl );

vl->getFeatures( QgsFeatureRequest().setFilterFid( 1 ) ).nextFeature( f0 );
QCOMPARE( f0.geometry()->exportToWkt(), QStringLiteral( "LineString (0 0, 1 1, 1 2)" ) );
QCOMPARE( f0.geometry()->exportToWkt(), QString( "LineString (0 0, 1 1, 1 2)" ) );

vl->getFeatures( QgsFeatureRequest().setFilterFid( 2 ) ).nextFeature( f1 );
QCOMPARE( f1.geometry()->exportToWkt(), QStringLiteral( "LineString (1 2, 2 1, 3 2, 3 3, 2 2)" ) );
QCOMPARE( f1.geometry()->exportToWkt(), QString( "LineString (1 2, 2 1, 3 2, 3 3, 2 2)" ) );

vl->rollBack();
}
Expand Down

0 comments on commit b06f99b

Please sign in to comment.