Skip to content

Commit 590b380

Browse files
committed
Fix failing test
1 parent a98e7a1 commit 590b380

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/src/gui/testqgsmapcanvas.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ void TestQgsMapCanvas::testMagnification()
194194
checker.setControlName( QStringLiteral( "expected_map_magnification" ) );
195195
checker.setRenderedImage( tmpName );
196196
checker.setSizeTolerance( 10, 10 );
197-
QCOMPARE( checker.compareImages( "map_magnification", 100 ), true );
197+
QCOMPARE( checker.compareImages( QStringLiteral( "map_magnification" ), 100 ), true );
198198
}
199199

200200
void compareExtent( const QgsRectangle &initialExtent,
@@ -303,6 +303,7 @@ void TestQgsMapCanvas::testMagnificationScale()
303303

304304
void TestQgsMapCanvas::testScaleLockCanvasResize()
305305
{
306+
QSize prevSize = mCanvas->size();
306307
mCanvas->resize( 600, 400 );
307308
QCOMPARE( mCanvas->width(), 600 );
308309
QCOMPARE( mCanvas->height(), 400 );
@@ -320,6 +321,7 @@ void TestQgsMapCanvas::testScaleLockCanvasResize()
320321

321322
mCanvas->setScaleLocked( false );
322323
mCanvas->setMagnificationFactor( 1.0 );
324+
mCanvas->resize( prevSize );
323325
}
324326

325327
void TestQgsMapCanvas::testZoomByWheel()

0 commit comments

Comments
 (0)