Created
November 14, 2014 11:26
-
-
Save m-kuhn/4892bc89d1900d2fad3c to your computer and use it in GitHub Desktop.
Atlas test cleanup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/tests/src/core/testqgsatlascomposition.cpp b/tests/src/core/testqgsatlascomposition.cpp | |
index 19b9463..2c3f86c 100644 | |
--- a/tests/src/core/testqgsatlascomposition.cpp | |
+++ b/tests/src/core/testqgsatlascomposition.cpp | |
@@ -189,6 +189,17 @@ void TestQgsAtlasComposition::init() | |
void TestQgsAtlasComposition::cleanup() | |
{ | |
+ | |
+ mAtlasMap->setAtlasDriven( false ); | |
+ mAtlasMap->setAtlasMargin( 0 ); | |
+ mAtlas->setCoverageLayer( mVectorLayer ); | |
+ mAtlas->setEnabled( true ); | |
+ | |
+ Q_NOWARN_DEPRECATED_PUSH | |
+ mAtlas->setFixedScale( false ); | |
+ mAtlas->setComposerMap( 0 ); | |
+ mAtlas->setMargin( 0 ); | |
+ Q_NOWARN_DEPRECATED_POP | |
} | |
void TestQgsAtlasComposition::filename() | |
@@ -222,8 +233,6 @@ void TestQgsAtlasComposition::autoscale_render() | |
QVERIFY( checker.testComposition( mReport, 0, 100 ) ); | |
} | |
mAtlas->endRender(); | |
- mAtlasMap->setAtlasDriven( false ); | |
- mAtlasMap->setAtlasMargin( 0 ); | |
} | |
void TestQgsAtlasComposition::autoscale_render_2_0_api() | |
@@ -245,12 +254,6 @@ void TestQgsAtlasComposition::autoscale_render_2_0_api() | |
QVERIFY( checker.testComposition( mReport, 0, 100 ) ); | |
} | |
mAtlas->endRender(); | |
- Q_NOWARN_DEPRECATED_PUSH | |
- mAtlas->setFixedScale( false ); | |
- mAtlas->setMargin( 0 ); | |
- mAtlas->setComposerMap( 0 ); | |
- mAtlasMap->setAtlasDriven( false ); | |
- Q_NOWARN_DEPRECATED_POP | |
} | |
void TestQgsAtlasComposition::fixedscale_render() | |
@@ -270,8 +273,6 @@ void TestQgsAtlasComposition::fixedscale_render() | |
QVERIFY( checker.testComposition( mReport, 0, 100 ) ); | |
} | |
mAtlas->endRender(); | |
- | |
- mAtlasMap->setAtlasDriven( false ); | |
} | |
void TestQgsAtlasComposition::fixedscale_render_2_0_api() | |
@@ -292,12 +293,6 @@ void TestQgsAtlasComposition::fixedscale_render_2_0_api() | |
QVERIFY( checker.testComposition( mReport, 0, 100 ) ); | |
} | |
mAtlas->endRender(); | |
- Q_NOWARN_DEPRECATED_PUSH | |
- mAtlas->setFixedScale( false ); | |
- mAtlas->setComposerMap( 0 ); | |
- mAtlasMap->setAtlasDriven( false ); | |
- | |
- Q_NOWARN_DEPRECATED_POP | |
} | |
void TestQgsAtlasComposition::predefinedscales_render() | |
@@ -330,8 +325,6 @@ void TestQgsAtlasComposition::predefinedscales_render() | |
QVERIFY( checker.testComposition( mReport, 0, 100 ) ); | |
} | |
mAtlas->endRender(); | |
- | |
- mAtlasMap->setAtlasDriven( false ); | |
} | |
void TestQgsAtlasComposition::two_map_autoscale_render() | |
@@ -354,9 +347,6 @@ void TestQgsAtlasComposition::two_map_autoscale_render() | |
QVERIFY( checker.testComposition( mReport, 0, 100 ) ); | |
} | |
mAtlas->endRender(); | |
- mAtlasMap->setAtlasDriven( false ); | |
- mAtlasMap->setAtlasMargin( 0 ); | |
- mOverview->setAtlasDriven( false ); | |
} | |
void TestQgsAtlasComposition::hiding_render() | |
@@ -467,10 +457,6 @@ void TestQgsAtlasComposition::test_remove_layer() | |
QVERIFY( !mAtlas->enabled() ); | |
QVERIFY( spyToggled.count() == 1 ); | |
- | |
- //clean up | |
- mAtlas->setCoverageLayer( mVectorLayer ); | |
- mAtlas->setEnabled( true ); | |
} | |
QTEST_MAIN( TestQgsAtlasComposition ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment