mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-16 00:03:12 -04:00
#8725-R: fix old API in other test cpp files
This commit is contained in:
parent
062c1e411a
commit
1e781ff838
@ -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 );
|
||||||
|
|
||||||
|
@ -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" ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user