@@ -54,9 +54,7 @@ class TestQgsInvertedPolygon : public QObject
54
54
void checkSymbolItem ();
55
55
void preprocess ();
56
56
void projectionTest ();
57
- #if defined(GDAL_VERSION_NUM) && GDAL_VERSION_MAJOR >= 2
58
57
void curvedPolygons ();
59
- #endif
60
58
61
59
private:
62
60
bool mTestHasError = false ;
@@ -153,26 +151,24 @@ void TestQgsInvertedPolygon::projectionTest()
153
151
QVERIFY ( imageCheck ( " inverted_polys_projection" , &extent ) );
154
152
QVERIFY ( setQml ( mpPolysLayer, " inverted_polys_preprocess.qml" ) );
155
153
QVERIFY ( imageCheck ( " inverted_polys_projection2" , &extent ) );
154
+ mMapSettings .setDestinationCrs ( mpPolysLayer->crs () );
156
155
}
157
156
158
- #if defined(GDAL_VERSION_NUM) && GDAL_VERSION_MAJOR >= 2
159
157
// This test relies on GDAL support of curved polygons
160
158
void TestQgsInvertedPolygon::curvedPolygons ()
161
159
{
162
160
QString myCurvedPolysFileName = mTestDataDir + " curved_polys.gpkg" ;
163
161
QFileInfo myCurvedPolyFileInfo ( myCurvedPolysFileName );
164
162
QgsVectorLayer *curvedLayer = new QgsVectorLayer ( myCurvedPolyFileInfo.filePath () + " |layername=polys" ,
165
163
myCurvedPolyFileInfo.completeBaseName (), " ogr" );
166
- curvedLayer->setSimplifyMethod ( simplifyMethod );
167
164
QgsProject::instance ()->addMapLayers ( QList<QgsMapLayer *>() << curvedLayer );
168
165
169
166
mReport += " <h2>Inverted polygon renderer, curved polygons test</h2>\n " ;
170
- mMapSettings .setLayers ( QStringList () << curvedLayer-> id () );
171
- QVERIFY ( setQml ( mpCurvedPolysLayer , " inverted_polys_single.qml" ) );
167
+ mMapSettings .setLayers ( QList< QgsMapLayer * > () << curvedLayer );
168
+ QVERIFY ( setQml ( curvedLayer , " inverted_polys_single.qml" ) );
172
169
QVERIFY ( imageCheck ( " inverted_polys_curved" ) );
173
- mMapSettings .setLayers ( QStringList () << curvedLayer-> id () );
170
+ mMapSettings .setLayers ( QList< QgsMapLayer * > () << mpPolysLayer );
174
171
}
175
- #endif
176
172
177
173
//
178
174
// Private helper functions not called directly by CTest
0 commit comments