Skip to content

Commit

Permalink
avoid warning about not created test difference image
Browse files Browse the repository at this point in the history
(cherry picked from commit d40d481)
  • Loading branch information
jef-n committed May 27, 2015
1 parent 3c70150 commit 4d0413a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
22 changes: 11 additions & 11 deletions src/core/qgsrenderchecker.cpp
Expand Up @@ -27,16 +27,16 @@
#include <QDebug>
#include <QBuffer>

QgsRenderChecker::QgsRenderChecker() :
mReport( "" ),
mMatchTarget( 0 ),
mElapsedTime( 0 ),
mRenderedImageFile( "" ),
mExpectedImageFile( "" ),
mMismatchCount( 0 ),
mColorTolerance( 0 ),
mElapsedTimeTarget( 0 ),
mBufferDashMessages( false )
QgsRenderChecker::QgsRenderChecker()
: mReport( "" )
, mMatchTarget( 0 )
, mElapsedTime( 0 )
, mRenderedImageFile( "" )
, mExpectedImageFile( "" )
, mMismatchCount( 0 )
, mColorTolerance( 0 )
, mElapsedTimeTarget( 0 )
, mBufferDashMessages( false )
{
}

Expand Down Expand Up @@ -359,7 +359,6 @@ bool QgsRenderChecker::compareImages( QString theTestName,
//
emitDashMessage( "Rendered Image " + theTestName + prefix, QgsDartMeasurement::ImagePng, mRenderedImageFile );
emitDashMessage( "Expected Image " + theTestName + prefix, QgsDartMeasurement::ImagePng, mExpectedImageFile );
emitDashMessage( "Difference Image " + theTestName + prefix, QgsDartMeasurement::ImagePng, myDiffImageFile );

//
// Put the same info to debug too
Expand Down Expand Up @@ -430,6 +429,7 @@ bool QgsRenderChecker::compareImages( QString theTestName,
//save the diff image to disk
//
myDifferenceImage.save( myDiffImageFile );
emitDashMessage( "Difference Image " + theTestName + prefix, QgsDartMeasurement::ImagePng, myDiffImageFile );
delete maskImage;

//
Expand Down
4 changes: 2 additions & 2 deletions src/gui/qgscomposerruler.cpp
Expand Up @@ -25,7 +25,7 @@ QgsComposerRuler::QgsComposerRuler( QgsComposerRuler::Direction d ) : QWidget( 0
mRulerFont->setPointSize( RULER_FONT_SIZE );
mRulerFontMetrics = new QFontMetrics( *mRulerFont );

//calculate ruler sizes and marker seperations
//calculate ruler sizes and marker separations

//minimum gap required between major ticks is 3 digits * 250%, based on appearance
mScaleMinPixelsWidth = mRulerFontMetrics->width( "000" ) * 2.5;
Expand Down Expand Up @@ -345,7 +345,7 @@ int QgsComposerRuler::optimumNumberDivisions( double rulerScale, int scaleMultip
{
//find pixel size for this small division
double candidateSize = largeDivisionSize / ( *divisions_it );
//check if this seperation is more then allowed min seperation
//check if this separation is more then allowed min separation
if ( candidateSize >= mMinPixelsPerDivision )
{
//found a good candidate, return it
Expand Down

0 comments on commit 4d0413a

Please sign in to comment.