Skip to content
Permalink
Browse files
avoid warning about not created test difference image
(cherry picked from commit d40d481)
  • Loading branch information
jef-n committed May 27, 2015
1 parent 3c70150 commit 4d0413ad35fb57aaa5049e5885848a5310507b1d
Showing with 13 additions and 13 deletions.
  1. +11 −11 src/core/qgsrenderchecker.cpp
  2. +2 −2 src/gui/qgscomposerruler.cpp
@@ -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 )
{
}

@@ -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
@@ -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;

//
@@ -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;
@@ -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

0 comments on commit 4d0413a

Please sign in to comment.