Skip to content

Commit

Permalink
avoid warning about not created test difference image
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed May 25, 2015
1 parent 98c601d commit d40d481
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 23 deletions.
8 changes: 4 additions & 4 deletions python/core/qgspallabeling.sip
Expand Up @@ -723,15 +723,15 @@ class QgsPalLabeling : QgsLabelingEngineInterface
// void drawLabel( pal::LabelPosition* label, QgsRenderContext& context, QgsPalLayerSettings& tmpLyr, DrawLabelType drawType );

static void drawLabelBuffer( QgsRenderContext& context,
const QgsLabelComponent& component,
const QgsLabelComponent &component,
const QgsPalLayerSettings& tmpLyr );

static void drawLabelBackground( QgsRenderContext& context,
QgsLabelComponent component,
const QgsPalLayerSettings& tmpLyr );

static void drawLabelShadow( QgsRenderContext& context,
const QgsLabelComponent& component,
static void drawLabelShadow( QgsRenderContext &context,
const QgsLabelComponent &component,
const QgsPalLayerSettings& tmpLyr );

//! load/save engine settings to project file
Expand Down Expand Up @@ -764,7 +764,7 @@ class QgsPalLabeling : QgsLabelingEngineInterface
*/
static bool geometryRequiresPreparation( const QgsGeometry *geometry, const QgsRenderContext &context, const QgsCoordinateTransform *ct, QgsGeometry *clipGeometry = 0 );

/** Splits a text string to a list of seperate lines, using a specified wrap character.
/** Splits a text string to a list of separate lines, using a specified wrap character.
* The text string will be split on either newline characters or the wrap character.
* @param text text string to split
* @param wrapCharacter additional character to wrap on
Expand Down
12 changes: 6 additions & 6 deletions src/core/qgspallabeling.h
Expand Up @@ -99,16 +99,16 @@ class CORE_EXPORT QgsPalLayerSettings

enum UpsideDownLabels
{
Upright, /*!< upside-down labels (90 <= angle < 270) are shown upright*/
ShowDefined, /*!< show upside down when rotation is layer- or data-defined*/
ShowAll /*!< show upside down for all labels, including dynamic ones*/
Upright, /*!< upside-down labels (90 <= angle < 270) are shown upright */
ShowDefined, /*!< show upside down when rotation is layer- or data-defined */
ShowAll /*!< show upside down for all labels, including dynamic ones */
};

enum DirectionSymbols
{
SymbolLeftRight, /*!< place direction symbols on left/right of label*/
SymbolAbove, /*!< place direction symbols on above label*/
SymbolBelow /*!< place direction symbols on below label*/
SymbolLeftRight, /*!< place direction symbols on left/right of label */
SymbolAbove, /*!< place direction symbols on above label */
SymbolBelow /*!< place direction symbols on below label */
};

enum MultiLineAlign
Expand Down
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 d40d481

Please sign in to comment.