Skip to content
Permalink
Browse files

Fix failing composer scale bar test on less common locales

  • Loading branch information
wonder-sk committed Jan 4, 2016
1 parent 7b2298e commit 215ba22597443097b184b18d2049f146ee8e5b05
Showing with 8 additions and 0 deletions.
  1. +8 −0 tests/src/core/testqgscomposerscalebar.cpp
@@ -25,6 +25,8 @@
#include "qgsmultibandcolorrenderer.h"
#include "qgsrasterlayer.h"
#include "qgsfontutils.h"

#include <QLocale>
#include <QObject>
#include <QtTest/QtTest>

@@ -67,6 +69,12 @@ void TestQgsComposerScaleBar::initTestCase()
QgsApplication::init();
QgsApplication::initQgis();

// the scale denominator is formatted in a locale aware manner
// so 10000 is rendered as "10,000" in C (or en_US) locale, however
// other locales may render the number differently (e.g. "10 000" in cs_CZ)
// so we enforce C locale to make sure we get expected result
QLocale::setDefault( QLocale::c() );

mMapSettings = new QgsMapSettings();

//create maplayers from testdata and add to layer registry

0 comments on commit 215ba22

Please sign in to comment.
You can’t perform that action at this time.