1
0
mirror of https://github.com/qgis/QGIS.git synced 2025-04-24 00:04:42 -04:00

Misc. typos

Found via `codespell -q 3 -I ../qgis-word-whitelist.txt --skip="*.ts,*.po,./scripts/spell_check"`
This commit is contained in:
luz.paz 2018-09-06 16:19:15 -04:00 committed by Jürgen Fischer
parent d6b2537e1e
commit 0908daaa0e
38 changed files with 46 additions and 46 deletions

@ -33,7 +33,7 @@
""" """
import hashlib import hashlib
import sys import sys
# check to see if a class name was specified and if so, craete the context id # check to see if a class name was specified and if so, create the context id
if len(sys.argv) > 1: if len(sys.argv) > 1:
hash = hashlib.sha1() hash = hashlib.sha1()
# set the hash to the name passed on the command line # set the hash to the name passed on the command line

@ -1579,7 +1579,7 @@ void DualEdgeTriangulation::eliminateHorizontalTriangles()
el2 = mPointVector[p2]->z(); el2 = mPointVector[p2]->z();
el3 = mPointVector[p3]->z(); el3 = mPointVector[p3]->z();
if ( el1 == el2 && el2 == el3 )//we found a horizonal triangle if ( el1 == el2 && el2 == el3 )//we found a horizontal triangle
{ {
//swap edges if it is possible, if it would remove the horizontal triangle and if the minimum angle generated by the swap is high enough //swap edges if it is possible, if it would remove the horizontal triangle and if the minimum angle generated by the swap is high enough
if ( swapPossible( ( uint )e1 ) && mPointVector[mHalfEdge[mHalfEdge[mHalfEdge[e1]->getDual()]->getNext()]->getPoint()]->z() != el1 && swapMinAngle( e1 ) > minangle ) if ( swapPossible( ( uint )e1 ) && mPointVector[mHalfEdge[mHalfEdge[mHalfEdge[e1]->getDual()]->getNext()]->getPoint()]->z() != el1 && swapMinAngle( e1 ) > minangle )

@ -211,7 +211,7 @@ class CORE_EXPORT QgsTriangle : public QgsPolygon
bool isRight( double angleTolerance = 0.0001 ) const; bool isRight( double angleTolerance = 0.0001 ) const;
/** /**
* Is the triangle scalene (all sides have differen lengths)? * Is the triangle scalene (all sides have different lengths)?
* \param lengthTolerance The tolerance to use * \param lengthTolerance The tolerance to use
* \returns True or False. Always false for empty triangle. * \returns True or False. Always false for empty triangle.
* * Example: * * Example:

@ -499,7 +499,7 @@ void PointSet::splitPolygons( QLinkedList<PointSet *> &shapes_toProcess,
if ( shape->parent ) if ( shape->parent )
delete shape; delete shape;
} }
// check for useless spliting // check for useless splitting
else if ( imax == imin || nbPtSh1 <= 2 || nbPtSh2 <= 2 || nbPtSh1 == nbp || nbPtSh2 == nbp ) else if ( imax == imin || nbPtSh1 <= 2 || nbPtSh2 <= 2 || nbPtSh1 == nbp || nbPtSh2 == nbp )
{ {
shapes_final.append( shape ); shapes_final.append( shape );

@ -865,7 +865,7 @@ bool QgsProcessingModelAlgorithm::loadVariant( const QVariant &model )
for ( ; childIt != childMap.constEnd(); ++childIt ) for ( ; childIt != childMap.constEnd(); ++childIt )
{ {
QgsProcessingModelChildAlgorithm child; QgsProcessingModelChildAlgorithm child;
// we be leniant here - even if we couldn't load a parameter, don't interrupt the model loading // we be lenient here - even if we couldn't load a parameter, don't interrupt the model loading
// otherwise models may become unusable (e.g. due to removed plugins providing algs/parameters) // otherwise models may become unusable (e.g. due to removed plugins providing algs/parameters)
// with no way for users to repair them // with no way for users to repair them
if ( !child.loadVariant( childIt.value() ) ) if ( !child.loadVariant( childIt.value() ) )
@ -893,7 +893,7 @@ bool QgsProcessingModelAlgorithm::loadVariant( const QVariant &model )
for ( ; paramDefIt != paramDefMap.constEnd(); ++paramDefIt ) for ( ; paramDefIt != paramDefMap.constEnd(); ++paramDefIt )
{ {
std::unique_ptr< QgsProcessingParameterDefinition > param( QgsProcessingParameters::parameterFromVariantMap( paramDefIt.value().toMap() ) ); std::unique_ptr< QgsProcessingParameterDefinition > param( QgsProcessingParameters::parameterFromVariantMap( paramDefIt.value().toMap() ) );
// we be leniant here - even if we couldn't load a parameter, don't interrupt the model loading // we be lenient here - even if we couldn't load a parameter, don't interrupt the model loading
// otherwise models may become unusable (e.g. due to removed plugins providing algs/parameters) // otherwise models may become unusable (e.g. due to removed plugins providing algs/parameters)
// with no way for users to repair them // with no way for users to repair them
if ( param ) if ( param )

@ -326,7 +326,7 @@ class CORE_EXPORT QgsDataItem : public QObject
QVector<QgsDataItem *> mChildren; // easier to have it always QVector<QgsDataItem *> mChildren; // easier to have it always
State mState; State mState;
QString mName; QString mName;
// Path is slash ('/') separated chain of item identifiers which are usually item names, but may be differen if it is // Path is slash ('/') separated chain of item identifiers which are usually item names, but may be different if it is
// necessary to distinguish paths of two providers to the same source (e.g GRASS location and standard directory have the same // necessary to distinguish paths of two providers to the same source (e.g GRASS location and standard directory have the same
// name but different paths). Identifiers in path must not contain '/' characters. // name but different paths). Identifiers in path must not contain '/' characters.
// The path is used to identify item in tree. // The path is used to identify item in tree.

@ -116,7 +116,7 @@ class CORE_EXPORT QgsGmlSchema : public QObject
BoundingBox, BoundingBox,
FeatureMembers, // gml:featureMembers FeatureMembers, // gml:featureMembers
FeatureMember, // gml:featureMember FeatureMember, // gml:featureMember
Feature, // feature element containint attrs and geo (inside gml:featureMember) Feature, // feature element containing attrs and geo (inside gml:featureMember)
Attribute, Attribute,
Geometry Geometry
}; };

@ -38,7 +38,7 @@ QgsLegendSettings::QgsLegendSettings()
QStringList QgsLegendSettings::splitStringForWrapping( const QString &stringToSplt ) const QStringList QgsLegendSettings::splitStringForWrapping( const QString &stringToSplt ) const
{ {
QStringList list; QStringList list;
// If the string contains nothing then just return the string without spliting. // If the string contains nothing then just return the string without splitting.
if ( wrapChar().count() == 0 ) if ( wrapChar().count() == 0 )
list << stringToSplt; list << stringToSplt;
else else

@ -40,7 +40,7 @@ bool QgsTestUtils::testProviderIteratorThreadSafety( QgsVectorDataProvider *prov
jobs.append( qMakePair( provider, request ) ); jobs.append( qMakePair( provider, request ) );
} }
//freaking hammmer the provider with a ton of concurrent requests. //freaking hammer the provider with a ton of concurrent requests.
//thread unsafe providers... you better be ready!!!! //thread unsafe providers... you better be ready!!!!
QtConcurrent::blockingMap( jobs, getFeaturesForProvider ); QtConcurrent::blockingMap( jobs, getFeaturesForProvider );

@ -2258,7 +2258,7 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer, public QgsExpressionConte
void editCommandEnded(); void editCommandEnded();
/** /**
* Signal emitted, whan an edit command is destroyed * Signal emitted, when an edit command is destroyed
* \note This is not a rollback, it is only related to the current edit command. * \note This is not a rollback, it is only related to the current edit command.
* See beforeRollBack() * See beforeRollBack()
*/ */

@ -100,7 +100,7 @@ class CORE_EXPORT QgsVectorLayerDiagramProvider : public QgsAbstractLabelProvide
protected: protected:
//! initialization method - called from constructors //! initialization method - called from constructors
void init(); void init();
//! helper method to register one diagram feautre //! helper method to register one diagram feature
QgsLabelFeature *registerDiagram( QgsFeature &feat, QgsRenderContext &context, const QgsGeometry &obstacleGeometry = QgsGeometry() ); QgsLabelFeature *registerDiagram( QgsFeature &feat, QgsRenderContext &context, const QgsGeometry &obstacleGeometry = QgsGeometry() );
protected: protected:

@ -116,7 +116,7 @@ class CORE_EXPORT QgsRasterPipe
* Returns true on success */ * Returns true on success */
bool setOn( int idx, bool on ); bool setOn( int idx, bool on );
//! Test if interface at index may be swithed on/off //! Test if interface at index may be switched on/off
bool canSetOn( int idx, bool on ); bool canSetOn( int idx, bool on );
// Getters for special types of interfaces // Getters for special types of interfaces

@ -49,7 +49,7 @@ typedef QMap<int, QString> QgsSymbolGroupMap;
* *
* The supported constraints are: * The supported constraints are:
* tag -> symbol has the tag matching the parameter * tag -> symbol has the tag matching the parameter
* !tag -> symbol doesnot have the tag matching the parameter * !tag -> symbol doesn't have the tag matching the parameter
* name -> symbol has a part of its name matching the parameter * name -> symbol has a part of its name matching the parameter
* !name -> symbol doesn't have any part of the name matching the parameter * !name -> symbol doesn't have any part of the name matching the parameter
* *

@ -68,7 +68,7 @@ class GUI_EXPORT QgsAuthSslConfigWidget : public QWidget, private Ui::QgsAuthSsl
//! Gets the host:port to associate with the server certificate //! Gets the host:port to associate with the server certificate
const QString sslHost(); const QString sslHost();
//! Gets the SSL protocl used for connections //! Gets the SSL protocol used for connections
QSsl::SslProtocol sslProtocol(); QSsl::SslProtocol sslProtocol();
//! Gets list of the SSL errors (as enums) to be ignored for connections //! Gets list of the SSL errors (as enums) to be ignored for connections

@ -88,7 +88,7 @@ class GUI_EXPORT QgsAttributeDialog : public QDialog
void setEditCommandMessage( const QString &message ) { mAttributeForm->setEditCommandMessage( message ); } void setEditCommandMessage( const QString &message ) { mAttributeForm->setEditCommandMessage( message ); }
/** /**
* Intercept window activate/deactive events to show/hide the highlighted feature. * Intercept window activate/deactivate events to show/hide the highlighted feature.
* *
* \param e The event * \param e The event
* *

@ -54,7 +54,7 @@ class GUI_EXPORT QgsAttributeTypeLoadDialog: public QDialog, private Ui::QgsAttr
/** /**
* Returns the value map which is currently active. * Returns the value map which is currently active.
* *
* \returns value map of vlues selected from layer * \returns value map of values selected from layer
*/ */
QMap<QString, QVariant> &valueMap(); QMap<QString, QVariant> &valueMap();

@ -100,7 +100,7 @@ class GUI_EXPORT QgsRasterFormatSaveOptionsWidget: public QWidget, private Ui::Q
void apply(); void apply();
/** /**
* Opens window with options desctiption for given provider * Opens window with options description for given provider
* and output format * and output format
*/ */
void helpOptions(); void helpOptions();

@ -703,12 +703,12 @@ void QgsRasterLayerSaveAsDialog::mTileModeCheckBox_toggled( bool toggled )
// Disabled (Radim), auto enabling of pyramids was making impression that // Disabled (Radim), auto enabling of pyramids was making impression that
// we (programmers) know better what you (user) want to do, // we (programmers) know better what you (user) want to do,
// certainly auto expaning was bad experience // certainly auto expanding was a bad experience
//if ( ! mPyramidsGroupBox->isChecked() ) //if ( ! mPyramidsGroupBox->isChecked() )
// mPyramidsGroupBox->setChecked( true ); // mPyramidsGroupBox->setChecked( true );
// Auto expanding mPyramidsGroupBox is bad - it auto crolls content of dialog // Auto expanding mPyramidsGroupBox is bad - it auto scrolls content of dialog
//if ( mPyramidsGroupBox->isCollapsed() ) //if ( mPyramidsGroupBox->isCollapsed() )
// mPyramidsGroupBox->setCollapsed( false ); // mPyramidsGroupBox->setCollapsed( false );
//mPyramidsOptionsWidget->checkAllLevels( true ); //mPyramidsOptionsWidget->checkAllLevels( true );

@ -45,7 +45,7 @@ QgsRelationEditorWidget::QgsRelationEditorWidget( QWidget *parent )
// buttons // buttons
QHBoxLayout *buttonLayout = new QHBoxLayout(); QHBoxLayout *buttonLayout = new QHBoxLayout();
buttonLayout->setContentsMargins( 0, 0, 0, 0 ); buttonLayout->setContentsMargins( 0, 0, 0, 0 );
// toogle editing // toggle editing
mToggleEditingButton = new QToolButton( this ); mToggleEditingButton = new QToolButton( this );
mToggleEditingButton->setObjectName( QStringLiteral( "mToggleEditingButton" ) ); mToggleEditingButton->setObjectName( QStringLiteral( "mToggleEditingButton" ) );
mToggleEditingButton->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionToggleEditing.svg" ) ) ); mToggleEditingButton->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionToggleEditing.svg" ) ) );

@ -27,7 +27,7 @@ class QgsSymbolSelectorWidget;
#include <QAbstractItemModel> #include <QAbstractItemModel>
/* Features count fro rule */ /* Features count for rule */
struct QgsRuleBasedRendererCount SIP_SKIP struct QgsRuleBasedRendererCount SIP_SKIP
{ {
int count; // number of features int count; // number of features

@ -224,7 +224,7 @@ int GRASS_LIB_EXPORT QgsGrassGisLib::G__gisinit( const char *version, const char
} }
mDistanceArea.setSourceCrs( mCrs ); mDistanceArea.setSourceCrs( mCrs );
// Read region fron environment variable // Read region from environment variable
// QGIS_GRASS_REGION=west,south,east,north,cols,rows // QGIS_GRASS_REGION=west,south,east,north,cols,rows
#if 0 #if 0
QString regionStr = getenv( "QGIS_GRASS_REGION" ); QString regionStr = getenv( "QGIS_GRASS_REGION" );

@ -620,7 +620,7 @@ void QgsMssqlSourceSelect::btnConnect_clicked()
else else
{ {
QApplication::restoreOverrideCursor(); QApplication::restoreOverrideCursor();
// Let user know we couldn't retieve tables from the MSSQL provider // Let user know we couldn't retrieve tables from the MSSQL provider
QMessageBox::warning( this, QMessageBox::warning( this,
tr( "MSSQL Provider" ), q.lastError().text() ); tr( "MSSQL Provider" ), q.lastError().text() );
return; return;

@ -63,7 +63,7 @@ static QString WCS_DESCRIPTION = QStringLiteral( "OGC Web Coverage Service versi
static QString DEFAULT_LATLON_CRS = QStringLiteral( "CRS:84" ); static QString DEFAULT_LATLON_CRS = QStringLiteral( "CRS:84" );
// TODO: colortable - use comon baseclass with gdal, mapserver does not support http://trac.osgeo.org/mapserver/ticket/1671 // TODO: colortable - use common baseclass with gdal, mapserver does not support http://trac.osgeo.org/mapserver/ticket/1671
QgsWcsProvider::QgsWcsProvider( const QString &uri, const ProviderOptions &options ) QgsWcsProvider::QgsWcsProvider( const QString &uri, const ProviderOptions &options )
: QgsRasterDataProvider( uri, options ) : QgsRasterDataProvider( uri, options )

@ -66,7 +66,7 @@ class SERVER_EXPORT QgsBufferServerResponse: public QgsServerResponse
QMap<QString, QString> headers() const override { return mHeaders; } QMap<QString, QString> headers() const override { return mHeaders; }
/** /**
* Returns true if the headers have alredy been sent * Returns true if the headers have already been sent
*/ */
bool headersSent() const override; bool headersSent() const override;

@ -73,7 +73,7 @@ class SERVER_EXPORT QgsServerResponse
virtual QMap<QString, QString> headers() const = 0; virtual QMap<QString, QString> headers() const = 0;
/** /**
* Returns true if the headers have alredy been sent * Returns true if the headers have already been sent
*/ */
virtual bool headersSent() const = 0; virtual bool headersSent() const = 0;

@ -2,8 +2,8 @@
qgswms.cpp qgswms.cpp
------------------------- -------------------------
begin : December 20 , 2016 begin : December 20 , 2016
copyright : (C) 2007 by Marco Hugentobler ( parts fron qgswmshandler) copyright : (C) 2007 by Marco Hugentobler ( parts from qgswmshandler)
(C) 2012 by René-Luc D'Hont ( parts fron qgswmshandler) (C) 2012 by René-Luc D'Hont ( parts from qgswmshandler)
(C) 2014 by Alessandro Pasotti ( parts from qgswmshandler) (C) 2014 by Alessandro Pasotti ( parts from qgswmshandler)
(C) 2016 by David Marteau (C) 2016 by David Marteau
email : marco dot hugentobler at karto dot baug dot ethz dot ch email : marco dot hugentobler at karto dot baug dot ethz dot ch

@ -2,7 +2,7 @@
qgsfssutils.cpp qgsfssutils.cpp
------------------------- -------------------------
begin : December 20 , 2016 begin : December 20 , 2016
copyright : (C) 2007 by Marco Hugentobler ( parts fron qgswmshandler) copyright : (C) 2007 by Marco Hugentobler ( parts from qgswmshandler)
(C) 2012 by René-Luc D'Hont ( parts from qgswmshandler) (C) 2012 by René-Luc D'Hont ( parts from qgswmshandler)
(C) 2014 by Alessandro Pasotti ( parts from qgswmshandler) (C) 2014 by Alessandro Pasotti ( parts from qgswmshandler)
(C) 2017 by David Marteau (C) 2017 by David Marteau

@ -4,7 +4,7 @@
Define WFS service utility functions Define WFS service utility functions
------------------------------------ ------------------------------------
begin : December 20 , 2016 begin : December 20 , 2016
copyright : (C) 2007 by Marco Hugentobler ( parts fron qgswfshandler) copyright : (C) 2007 by Marco Hugentobler ( parts from qgswfshandler)
(C) 2012 by René-Luc D'Hont ( parts from qgswmshandler) (C) 2012 by René-Luc D'Hont ( parts from qgswmshandler)
(C) 2014 by Alessandro Pasotti ( parts from qgswfshandler) (C) 2014 by Alessandro Pasotti ( parts from qgswfshandler)
(C) 2017 by David Marteau (C) 2017 by David Marteau

@ -2,7 +2,7 @@
qgsmediancut.cpp qgsmediancut.cpp
------------------------- -------------------------
begin : December 20 , 2016 begin : December 20 , 2016
copyright : (C) 2007 by Marco Hugentobler ( parts fron qgswmshandler) copyright : (C) 2007 by Marco Hugentobler ( parts from qgswmshandler)
(C) 2014 by Alessandro Pasotti ( parts from qgswmshandler) (C) 2014 by Alessandro Pasotti ( parts from qgswmshandler)
(C) 2016 by David Marteau (C) 2016 by David Marteau
email : marco dot hugentobler at karto dot baug dot ethz dot ch email : marco dot hugentobler at karto dot baug dot ethz dot ch

@ -4,7 +4,7 @@
Median cut color reduction implementation Median cut color reduction implementation
----------------------------------------- -----------------------------------------
begin : December 20 , 2016 begin : December 20 , 2016
copyright : (C) 2007 by Marco Hugentobler ( parts fron qgswmshandler) copyright : (C) 2007 by Marco Hugentobler ( parts from qgswmshandler)
(C) 2014 by Alessandro Pasotti ( parts from qgswmshandler) (C) 2014 by Alessandro Pasotti ( parts from qgswmshandler)
(C) 2016 by David Marteau (C) 2016 by David Marteau
email : marco dot hugentobler at karto dot baug dot ethz dot ch email : marco dot hugentobler at karto dot baug dot ethz dot ch

@ -2,7 +2,7 @@
qgswms.cpp qgswms.cpp
------------------------- -------------------------
begin : December 20 , 2016 begin : December 20 , 2016
copyright : (C) 2007 by Marco Hugentobler ( parts fron qgswmshandler) copyright : (C) 2007 by Marco Hugentobler ( parts from qgswmshandler)
(C) 2014 by Alessandro Pasotti ( parts from qgswmshandler) (C) 2014 by Alessandro Pasotti ( parts from qgswmshandler)
(C) 2016 by David Marteau (C) 2016 by David Marteau
email : marco dot hugentobler at karto dot baug dot ethz dot ch email : marco dot hugentobler at karto dot baug dot ethz dot ch

@ -2,7 +2,7 @@
qgswmsutils.cpp qgswmsutils.cpp
------------------------- -------------------------
begin : December 20 , 2016 begin : December 20 , 2016
copyright : (C) 2007 by Marco Hugentobler ( parts fron qgswmshandler) copyright : (C) 2007 by Marco Hugentobler ( parts from qgswmshandler)
(C) 2014 by Alessandro Pasotti ( parts from qgswmshandler) (C) 2014 by Alessandro Pasotti ( parts from qgswmshandler)
(C) 2016 by David Marteau (C) 2016 by David Marteau
email : marco dot hugentobler at karto dot baug dot ethz dot ch email : marco dot hugentobler at karto dot baug dot ethz dot ch

@ -4,7 +4,7 @@
Define WMS service utility functions Define WMS service utility functions
------------------------------------ ------------------------------------
begin : December 20 , 2016 begin : December 20 , 2016
copyright : (C) 2007 by Marco Hugentobler ( parts fron qgswmshandler) copyright : (C) 2007 by Marco Hugentobler ( parts from qgswmshandler)
(C) 2014 by Alessandro Pasotti ( parts from qgswmshandler) (C) 2014 by Alessandro Pasotti ( parts from qgswmshandler)
(C) 2016 by David Marteau (C) 2016 by David Marteau
email : marco dot hugentobler at karto dot baug dot ethz dot ch email : marco dot hugentobler at karto dot baug dot ethz dot ch

@ -37,7 +37,7 @@ class TestQgsLayoutObject: public QObject
void context(); void context();
void writeReadXml(); void writeReadXml();
void writeRetrieveDDProperty(); //test writing and retrieving dd properties from xml void writeRetrieveDDProperty(); //test writing and retrieving dd properties from xml
void writeRetrieveCustomProperties(); //test writing/retreiving custom properties from xml void writeRetrieveCustomProperties(); //test writing/retrieving custom properties from xml
private: private:

@ -43,10 +43,10 @@ class TestQgsLayoutShapes : public QObject
void init();// will be called before each testfunction is executed. void init();// will be called before each testfunction is executed.
void cleanup();// will be called after every testfunction. void cleanup();// will be called after every testfunction.
void rectangle(); //test if rectangle shape is functioning void rectangle(); //test if rectangle shape is functioning
void triangle(); //test if triange shape is functioning void triangle(); //test if triangle shape is functioning
void ellipse(); //test if ellipse shape is functioning void ellipse(); //test if ellipse shape is functioning
void roundedRectangle(); //test if rounded rectangle shape is functioning void roundedRectangle(); //test if rounded rectangle shape is functioning
void symbol(); //test is styling shapes via symbol is working void symbol(); //test if styling shapes via symbol is working
void readWriteXml(); void readWriteXml();
void bounds(); void bounds();
void shapeRotation(); void shapeRotation();

@ -440,7 +440,7 @@ void TestQgsLayoutUtils::scaledFontPixelSize()
void TestQgsLayoutUtils::fontAscentMM() void TestQgsLayoutUtils::fontAscentMM()
{ {
mTestFont.setPointSize( 12 ); mTestFont.setPointSize( 12 );
//platform specific font rendering differences mean these tests need to be very leniant //platform specific font rendering differences mean these tests need to be very lenient
QGSCOMPARENEAR( QgsLayoutUtils::fontAscentMM( mTestFont ), 3.9, 0.5 ); QGSCOMPARENEAR( QgsLayoutUtils::fontAscentMM( mTestFont ), 3.9, 0.5 );
} }
@ -453,14 +453,14 @@ void TestQgsLayoutUtils::fontDescentMM()
void TestQgsLayoutUtils::fontHeightMM() void TestQgsLayoutUtils::fontHeightMM()
{ {
mTestFont.setPointSize( 12 ); mTestFont.setPointSize( 12 );
//platform specific font rendering differences mean these tests need to be very leniant //platform specific font rendering differences mean these tests need to be very lenient
QGSCOMPARENEAR( QgsLayoutUtils::fontHeightMM( mTestFont ), 4.9, 0.5 ); QGSCOMPARENEAR( QgsLayoutUtils::fontHeightMM( mTestFont ), 4.9, 0.5 );
} }
void TestQgsLayoutUtils::fontHeightCharacterMM() void TestQgsLayoutUtils::fontHeightCharacterMM()
{ {
mTestFont.setPointSize( 12 ); mTestFont.setPointSize( 12 );
//platform specific font rendering differences mean these tests need to be very leniant //platform specific font rendering differences mean these tests need to be very lenient
QGSCOMPARENEAR( QgsLayoutUtils::fontHeightCharacterMM( mTestFont, QChar( 'a' ) ), 2.4, 0.15 ); QGSCOMPARENEAR( QgsLayoutUtils::fontHeightCharacterMM( mTestFont, QChar( 'a' ) ), 2.4, 0.15 );
QGSCOMPARENEAR( QgsLayoutUtils::fontHeightCharacterMM( mTestFont, QChar( 'l' ) ), 3.15, 0.16 ); QGSCOMPARENEAR( QgsLayoutUtils::fontHeightCharacterMM( mTestFont, QChar( 'l' ) ), 3.15, 0.16 );
QGSCOMPARENEAR( QgsLayoutUtils::fontHeightCharacterMM( mTestFont, QChar( 'g' ) ), 3.2, 0.11 ); QGSCOMPARENEAR( QgsLayoutUtils::fontHeightCharacterMM( mTestFont, QChar( 'g' ) ), 3.2, 0.11 );
@ -469,7 +469,7 @@ void TestQgsLayoutUtils::fontHeightCharacterMM()
void TestQgsLayoutUtils::textWidthMM() void TestQgsLayoutUtils::textWidthMM()
{ {
//platform specific font rendering differences mean this test needs to be very leniant //platform specific font rendering differences mean this test needs to be very lenient
mTestFont.setPointSize( 12 ); mTestFont.setPointSize( 12 );
QGSCOMPARENEAR( QgsLayoutUtils::textWidthMM( mTestFont, QString( "test string" ) ), 20, 2 ); QGSCOMPARENEAR( QgsLayoutUtils::textWidthMM( mTestFont, QString( "test string" ) ), 20, 2 );
@ -477,7 +477,7 @@ void TestQgsLayoutUtils::textWidthMM()
void TestQgsLayoutUtils::textHeightMM() void TestQgsLayoutUtils::textHeightMM()
{ {
//platform specific font rendering differences mean this test needs to be very leniant //platform specific font rendering differences mean this test needs to be very lenient
mTestFont.setPointSize( 12 ); mTestFont.setPointSize( 12 );
QGSCOMPARENEAR( QgsLayoutUtils::textHeightMM( mTestFont, QString( "test string" ) ), 3.9, 0.2 ); QGSCOMPARENEAR( QgsLayoutUtils::textHeightMM( mTestFont, QString( "test string" ) ), 3.9, 0.2 );
QGSCOMPARENEAR( QgsLayoutUtils::textHeightMM( mTestFont, QString( "test\nstring" ) ), 8.7, 0.2 ); QGSCOMPARENEAR( QgsLayoutUtils::textHeightMM( mTestFont, QString( "test\nstring" ) ), 8.7, 0.2 );

@ -56,7 +56,7 @@ TEST_DATA_DIR = unitTestDataPath()
# look for Poppler w/ Cairo, then muPDF # look for Poppler w/ Cairo, then muPDF
# * Poppler w/ Cairo renders correctly # * Poppler w/ Cairo renders correctly
# * Poppler w/o Cairo does not always correctly render vectors in PDF to image # * Poppler w/o Cairo does not always correctly render vectors in PDF to image
# * muPDF renders correctly, but sightly shifts colors # * muPDF renders correctly, but slightly shifts colors
for util in [ for util in [
'pdftocairo', 'pdftocairo',
# 'mudraw', # 'mudraw',

@ -55,7 +55,7 @@ from test_qgspallabeling_tests import (
# look for Poppler w/ Cairo, then muPDF # look for Poppler w/ Cairo, then muPDF
# * Poppler w/ Cairo renders correctly # * Poppler w/ Cairo renders correctly
# * Poppler w/o Cairo does not always correctly render vectors in PDF to image # * Poppler w/o Cairo does not always correctly render vectors in PDF to image
# * muPDF renders correctly, but sightly shifts colors # * muPDF renders correctly, but slightly shifts colors
for util in [ for util in [
'pdftocairo', 'pdftocairo',
# 'mudraw', # 'mudraw',