Skip to content

Commit 4619246

Browse files
committedMar 31, 2014
fix regression992 test
1 parent 1c27ee3 commit 4619246

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed
 

‎tests/src/core/regression992.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@ class Regression992: public QObject
5353
private:
5454
bool render( QString theFileName );
5555
QString mTestDataDir;
56-
QgsRasterLayer * mpRasterLayer;
57-
QgsMapSettings mMapSettings;
56+
QgsRasterLayer *mpRasterLayer;
5857
QString mReport;
5958
};
6059

@@ -63,10 +62,10 @@ void Regression992::initTestCase()
6362
{
6463
// init QGIS's paths - true means that all path will be inited from prefix
6564
QgsApplication::init();
65+
QgsApplication::initQgis();
6666
QgsApplication::showSettings();
6767
// QgsApplication::skipGdalDriver( "JP2ECW" );
6868
// QgsApplication::skipGdalDriver( "JP2MrSID" );
69-
QgsApplication::initQgis();
7069

7170
//create some objects that will be used in all tests...
7271
//create a raster layer that will be used in all tests...
@@ -89,7 +88,6 @@ void Regression992::initTestCase()
8988
myList << mpRasterLayer;
9089
QgsMapLayerRegistry::instance()->addMapLayers( myList );
9190
// add the test layer to the maprender
92-
mMapSettings.setLayers( QStringList() << mpRasterLayer->id() );
9391
mReport += "<h1>Regression 992 Test</h1>\n";
9492
mReport += "<p>See <a href=\"http://hub.qgis.org/issues/992\">"
9593
"redmine ticket 992</a> for more details.</p>";
@@ -114,6 +112,7 @@ void Regression992::regression992()
114112
{
115113
QgsMapSettings settings;
116114
settings.setExtent( mpRasterLayer->extent() );
115+
settings.setLayers( QStringList() << mpRasterLayer->id() );
117116
QgsRenderChecker myChecker;
118117
myChecker.setMapSettings( settings );
119118
myChecker.setControlName( "expected_rgbwcmyk01_YeGeo.jp2" );

0 commit comments

Comments
 (0)
Please sign in to comment.