From d40d481bd33db7fb3277a145eb36dda2fee47d3c Mon Sep 17 00:00:00 2001 From: "Juergen E. Fischer" Date: Mon, 25 May 2015 21:43:55 +0200 Subject: [PATCH] avoid warning about not created test difference image --- python/core/qgspallabeling.sip | 8 ++++---- src/core/qgspallabeling.h | 12 ++++++------ src/core/qgsrenderchecker.cpp | 22 +++++++++++----------- src/gui/qgscomposerruler.cpp | 4 ++-- 4 files changed, 23 insertions(+), 23 deletions(-) diff --git a/python/core/qgspallabeling.sip b/python/core/qgspallabeling.sip index d74feb9ae88..2bc49d08cb8 100644 --- a/python/core/qgspallabeling.sip +++ b/python/core/qgspallabeling.sip @@ -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 @@ -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 diff --git a/src/core/qgspallabeling.h b/src/core/qgspallabeling.h index 75b71487704..f878f34782c 100644 --- a/src/core/qgspallabeling.h +++ b/src/core/qgspallabeling.h @@ -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 diff --git a/src/core/qgsrenderchecker.cpp b/src/core/qgsrenderchecker.cpp index b425df864f5..5bb22fdfe95 100644 --- a/src/core/qgsrenderchecker.cpp +++ b/src/core/qgsrenderchecker.cpp @@ -27,16 +27,16 @@ #include #include -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; // diff --git a/src/gui/qgscomposerruler.cpp b/src/gui/qgscomposerruler.cpp index 1f32746e6a3..48a9123b233 100644 --- a/src/gui/qgscomposerruler.cpp +++ b/src/gui/qgscomposerruler.cpp @@ -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