#8725-R: fix old API in other test cpp files

This commit is contained in:
Alvaro Huarte 2014-01-07 13:59:14 +01:00 committed by Matthias Kuhn
parent 062c1e411a
commit 1e781ff838
2 changed files with 11 additions and 3 deletions

View File

@ -80,7 +80,9 @@ void TestQgsAtlasComposition::initTestCase()
vectorFileInfo.completeBaseName(), vectorFileInfo.completeBaseName(),
"ogr" ); "ogr" );
mVectorLayer->setSimplifyDrawingHints( QgsVectorLayer::NoSimplification ); QgsVectorSimplifyMethod simplifyMethod;
simplifyMethod.setSimplifyHints( QgsVectorLayer::NoSimplification );
mVectorLayer->setSimplifyMethod( simplifyMethod );
QgsMapLayerRegistry::instance()->addMapLayers( QList<QgsMapLayer*>() << mVectorLayer ); QgsMapLayerRegistry::instance()->addMapLayers( QList<QgsMapLayer*>() << mVectorLayer );

View File

@ -94,7 +94,11 @@ void TestQgsGradients::initTestCase()
QFileInfo myPolyFileInfo( myPolysFileName ); QFileInfo myPolyFileInfo( myPolysFileName );
mpPolysLayer = new QgsVectorLayer( myPolyFileInfo.filePath(), mpPolysLayer = new QgsVectorLayer( myPolyFileInfo.filePath(),
myPolyFileInfo.completeBaseName(), "ogr" ); myPolyFileInfo.completeBaseName(), "ogr" );
mpPolysLayer->setSimplifyDrawingHints( QgsVectorLayer::NoSimplification );
QgsVectorSimplifyMethod simplifyMethod;
simplifyMethod.setSimplifyHints( QgsVectorLayer::NoSimplification );
mpPolysLayer->setSimplifyMethod( simplifyMethod );
// Register the layer with the registry // Register the layer with the registry
QgsMapLayerRegistry::instance()->addMapLayers( QgsMapLayerRegistry::instance()->addMapLayers(
QList<QgsMapLayer *>() << mpPolysLayer ); QList<QgsMapLayer *>() << mpPolysLayer );
@ -245,7 +249,9 @@ void TestQgsGradients::gradientSymbolFromQml()
{ {
mReport += "<h2>Gradient symbol from QML test</h2>\n"; mReport += "<h2>Gradient symbol from QML test</h2>\n";
QVERIFY( setQml( "gradient" ) ); QVERIFY( setQml( "gradient" ) );
mpPolysLayer->setSimplifyDrawingHints( QgsVectorLayer::NoSimplification ); QgsVectorSimplifyMethod simplifyMethod;
simplifyMethod.setSimplifyHints( QgsVectorLayer::NoSimplification );
mpPolysLayer->setSimplifyMethod( simplifyMethod );
QVERIFY( imageCheck( "gradient_from_qml" ) ); QVERIFY( imageCheck( "gradient_from_qml" ) );
} }