Skip to content

Commit e952031

Browse files
committedJun 12, 2018
Use default QLocale instead of system
no effect for now, but it makes the locale override possible through QLocale::setDefault()
1 parent dc651b6 commit e952031

16 files changed

+64
-64
lines changed
 

‎src/app/layout/qgslayoutmapwidget.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ void QgsLayoutMapWidget::mScaleLineEdit_editingFinished()
477477
}
478478

479479
bool conversionSuccess = false;
480-
double scaleDenominator = QLocale::system().toDouble( mScaleLineEdit->text(), &conversionSuccess );
480+
double scaleDenominator = QLocale().toDouble( mScaleLineEdit->text(), &conversionSuccess );
481481
if ( !conversionSuccess )
482482
{
483483
return;
@@ -726,16 +726,16 @@ void QgsLayoutMapWidget::updateComposerExtentFromGui()
726726
double xmin, ymin, xmax, ymax;
727727
bool conversionSuccess;
728728

729-
xmin = QLocale::system().toDouble( mXMinLineEdit->text(), &conversionSuccess );
729+
xmin = QLocale().toDouble( mXMinLineEdit->text(), &conversionSuccess );
730730
if ( !conversionSuccess )
731731
return;
732-
xmax = QLocale::system().toDouble( mXMaxLineEdit->text(), &conversionSuccess );
732+
xmax = QLocale().toDouble( mXMaxLineEdit->text(), &conversionSuccess );
733733
if ( !conversionSuccess )
734734
return;
735-
ymin = QLocale::system().toDouble( mYMinLineEdit->text(), &conversionSuccess );
735+
ymin = QLocale().toDouble( mYMinLineEdit->text(), &conversionSuccess );
736736
if ( !conversionSuccess )
737737
return;
738-
ymax = QLocale::system().toDouble( mYMaxLineEdit->text(), &conversionSuccess );
738+
ymax = QLocale().toDouble( mYMaxLineEdit->text(), &conversionSuccess );
739739
if ( !conversionSuccess )
740740
return;
741741

‎src/app/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1162,7 +1162,7 @@ int main( int argc, char *argv[] )
11621162
{
11631163
if ( !myLocaleOverrideFlag || myUserLocale.isEmpty() )
11641164
{
1165-
myTranslationCode = QLocale::system().name();
1165+
myTranslationCode = QLocale().name();
11661166
//setting the locale/userLocale when the --lang= option is not set will allow third party
11671167
//plugins to always use the same locale as the QGIS, otherwise they can be out of sync
11681168
mySettings.setValue( QStringLiteral( "locale/userLocale" ), myTranslationCode );

‎src/app/qgscustomprojectiondialog.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -510,9 +510,9 @@ void QgsCustomProjectionDialog::pbnCalculate_clicked()
510510
precision = 7;
511511
}
512512

513-
tmp = QLocale::system().toString( northing, 'f', precision );
513+
tmp = QLocale().toString( northing, 'f', precision );
514514
projectedX->setText( tmp );
515-
tmp = QLocale::system().toString( easting, 'f', precision );
515+
tmp = QLocale().toString( easting, 'f', precision );
516516
projectedY->setText( tmp );
517517
}
518518

‎src/app/qgsmeasuredialog.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ void QgsMeasureDialog::mouseMove( const QgsPointXY &point )
167167
QTreeWidgetItem *item = mTable->topLevelItem( mTable->topLevelItemCount() - 1 );
168168
if ( item )
169169
{
170-
item->setText( 0, QLocale::system().toString( d, 'f', mDecimalPlaces ) );
170+
item->setText( 0, QLocale().toString( d, 'f', mDecimalPlaces ) );
171171
}
172172
}
173173
}
@@ -184,7 +184,7 @@ void QgsMeasureDialog::addPoint()
184184
{
185185
if ( !mTool->done() )
186186
{
187-
QTreeWidgetItem *item = new QTreeWidgetItem( QStringList( QLocale::system().toString( 0.0, 'f', mDecimalPlaces ) ) );
187+
QTreeWidgetItem *item = new QTreeWidgetItem( QStringList( QLocale().toString( 0.0, 'f', mDecimalPlaces ) ) );
188188
item->setTextAlignment( 0, Qt::AlignRight );
189189
mTable->addTopLevelItem( item );
190190
mTable->scrollToItem( item );
@@ -231,7 +231,7 @@ void QgsMeasureDialog::removeLastPoint()
231231
d = convertLength( d, mDistanceUnits );
232232

233233
QTreeWidgetItem *item = mTable->topLevelItem( mTable->topLevelItemCount() - 1 );
234-
item->setText( 0, QLocale::system().toString( d, 'f', mDecimalPlaces ) );
234+
item->setText( 0, QLocale().toString( d, 'f', mDecimalPlaces ) );
235235
editTotal->setText( formatDistance( mTotal + d ) );
236236
}
237237
else
@@ -501,7 +501,7 @@ void QgsMeasureDialog::updateUi()
501501
d = convertLength( d, mDistanceUnits );
502502
}
503503

504-
QTreeWidgetItem *item = new QTreeWidgetItem( QStringList( QLocale::system().toString( d, 'f', mDecimalPlaces ) ) );
504+
QTreeWidgetItem *item = new QTreeWidgetItem( QStringList( QLocale().toString( d, 'f', mDecimalPlaces ) ) );
505505
item->setTextAlignment( 0, Qt::AlignRight );
506506
mTable->addTopLevelItem( item );
507507
mTable->scrollToItem( item );

‎src/app/qgsoptions.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -903,7 +903,7 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WindowFlags fl, const QList<QgsOpti
903903
//
904904
// Locale settings
905905
//
906-
QString mySystemLocale = QLocale::system().name();
906+
QString mySystemLocale = QLocale().name();
907907
lblSystemLocale->setText( tr( "Detected active locale on your system: %1" ).arg( mySystemLocale ) );
908908
QString myUserLocale = mSettings->value( QStringLiteral( "locale/userLocale" ), QString() ).toString();
909909
QStringList myI18nList = i18nList();

‎src/app/qgsprojectproperties.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ QgsProjectProperties::QgsProjectProperties( QgsMapCanvas *mapCanvas, QWidget *pa
523523
mWMSInspireLanguage->addItem( QIcon( QString( ":/images/flags/%1.png" ).arg( "cy" ) ), QLocale( QStringLiteral( "cy" ) ).nativeLanguageName(), "cym" );
524524
mWMSInspireLanguage->setCurrentIndex(
525525
mWMSInspireLanguage->findText(
526-
QLocale::system().nativeLanguageName()
526+
QLocale().nativeLanguageName()
527527
)
528528
);
529529

@@ -932,8 +932,8 @@ void QgsProjectProperties::apply()
932932
if ( leSemiMajor->isModified() || leSemiMinor->isModified() )
933933
{
934934
QgsDebugMsgLevel( "Using parameteric major/minor", 4 );
935-
major = QLocale::system().toDouble( leSemiMajor->text() );
936-
minor = QLocale::system().toDouble( leSemiMinor->text() );
935+
major = QLocale().toDouble( leSemiMajor->text() );
936+
minor = QLocale().toDouble( leSemiMinor->text() );
937937
}
938938
QgsProject::instance()->setEllipsoid( QStringLiteral( "PARAMETER:%1:%2" )
939939
.arg( major, 0, 'g', 17 )
@@ -1980,8 +1980,8 @@ void QgsProjectProperties::updateEllipsoidUI( int newIndex )
19801980
if ( leSemiMajor->isModified() || leSemiMinor->isModified() )
19811981
{
19821982
QgsDebugMsgLevel( "Saving major/minor", 4 );
1983-
mEllipsoidList[ mEllipsoidIndex ].semiMajor = QLocale::system().toDouble( leSemiMajor->text() );
1984-
mEllipsoidList[ mEllipsoidIndex ].semiMinor = QLocale::system().toDouble( leSemiMinor->text() );
1983+
mEllipsoidList[ mEllipsoidIndex ].semiMajor = QLocale().toDouble( leSemiMajor->text() );
1984+
mEllipsoidList[ mEllipsoidIndex ].semiMinor = QLocale().toDouble( leSemiMinor->text() );
19851985
}
19861986

19871987
mEllipsoidIndex = newIndex;
@@ -2004,8 +2004,8 @@ void QgsProjectProperties::updateEllipsoidUI( int newIndex )
20042004
}
20052005
if ( mEllipsoidList[ mEllipsoidIndex ].acronym != GEO_NONE )
20062006
{
2007-
leSemiMajor->setText( QLocale::system().toString( myMajor, 'f', 3 ) );
2008-
leSemiMinor->setText( QLocale::system().toString( myMinor, 'f', 3 ) );
2007+
leSemiMajor->setText( QLocale().toString( myMajor, 'f', 3 ) );
2008+
leSemiMinor->setText( QLocale().toString( myMinor, 'f', 3 ) );
20092009
}
20102010

20112011
if ( mCrs.isValid() )

‎src/core/expression/qgsexpression.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ double QgsExpression::evaluateToDouble( const QString &text, const double fallba
513513
//first test if text is directly convertible to double
514514
// use system locale: e.g. in German locale, user is presented with numbers "1,23" instead of "1.23" in C locale
515515
// so we also want to allow user to rewrite it to "5,23" and it is still accepted
516-
double convertedValue = QLocale::system().toDouble( text, &ok );
516+
double convertedValue = QLocale().toDouble( text, &ok );
517517
if ( ok )
518518
{
519519
return convertedValue;

‎src/core/qgis.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,15 +97,15 @@ const double Qgis::UI_SCALE_FACTOR = 1;
9797
double qgsPermissiveToDouble( QString string, bool &ok )
9898
{
9999
//remove any thousands separators
100-
string.remove( QLocale::system().groupSeparator() );
101-
return QLocale::system().toDouble( string, &ok );
100+
string.remove( QLocale().groupSeparator() );
101+
return QLocale().toDouble( string, &ok );
102102
}
103103

104104
int qgsPermissiveToInt( QString string, bool &ok )
105105
{
106106
//remove any thousands separators
107-
string.remove( QLocale::system().groupSeparator() );
108-
return QLocale::system().toInt( string, &ok );
107+
string.remove( QLocale().groupSeparator() );
108+
return QLocale().toInt( string, &ok );
109109
}
110110

111111
void *qgsMalloc( size_t size )

‎src/core/qgsapplication.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -976,7 +976,7 @@ QString QgsApplication::locale()
976976
}
977977
else
978978
{
979-
return QLocale::system().name().left( 2 );
979+
return QLocale().name().left( 2 );
980980
}
981981
}
982982

‎src/core/qgsexpressionsorter.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class QgsExpressionSorter
3030
// QString::localeAwareCompare() is case insensitive for common locales,
3131
// but case sensitive for the C locale. So use an explicit case
3232
// insensitive comparison in that later case to avoid test failures.
33-
, mUseCaseInsensitiveComparison( QLocale::system().name() == QLocale::c().name() )
33+
, mUseCaseInsensitiveComparison( QLocale().name() == QLocale::c().name() )
3434
{}
3535

3636
bool operator()( const QgsIndexedFeature &f1, const QgsIndexedFeature &f2 ) const

‎src/gui/editorwidgets/qgsdatetimeeditconfig.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ QgsDateTimeEditConfig::QgsDateTimeEditConfig( QgsVectorLayer *vl, int fieldIdx,
142142
"<td bgcolor=\"#f6f6f6\" style=\"vertical-align:top; padding-left:10; padding-right:10; padding-top:3; padding-bottom:3;\">"
143143
"<p><span style=\"font-family:'Open Sans,sans-serif'; font-size:11px; color:#66666e; background-color:#f6f6f6;\">" )
144144
+ tr( "the abbreviated localized day name (e.g. 'Mon' to 'Sun'). Uses the system locale to localize the name, i.e. " )
145-
+ QStringLiteral( "</span><a href=\"http://qt-project.org/doc/qt-5/qlocale.html#system\"><span style=\"font-family:'Arial,FreeSans,sans-serif'; font-size:12px; font-weight:600; text-decoration: underline; color:#00732f;\">QLocale::system</span></a><span style=\"font-family:'Open Sans,sans-serif'; font-size:11px; color:#66666e;\">().</span></p>"
145+
+ QStringLiteral( "</span><a href=\"http://qt-project.org/doc/qt-5/qlocale.html#system\"><span style=\"font-family:'Arial,FreeSans,sans-serif'; font-size:12px; font-weight:600; text-decoration: underline; color:#00732f;\">QLocale</span></a><span style=\"font-family:'Open Sans,sans-serif'; font-size:11px; color:#66666e;\">().</span></p>"
146146
"</td>"
147147
"</tr>"
148148
"<tr>"
@@ -154,7 +154,7 @@ QgsDateTimeEditConfig::QgsDateTimeEditConfig( QgsVectorLayer *vl, int fieldIdx,
154154
+ tr( "the long localized day name (e.g. 'Monday' to '" )
155155
+ QStringLiteral( "</span><a href=\"http://qt-project.org/doc/qt-5/qt.html#DayOfWeek-enum\"><span style=\"font-family:'Arial,FreeSans,sans-serif'; font-size:12px; font-weight:600; text-decoration: underline; color:#00732f;\">Qt::Sunday</span></a><span style=\"font-family:'Open Sans,sans-serif'; font-size:11px; color:#66666e;\">')." )
156156
+ tr( "Uses the system locale to localize the name, i.e. " )
157-
+ QStringLiteral( "</span><a href=\"http://qt-project.org/doc/qt-5/qlocale.html#system\"><span style=\"font-family:'Arial,FreeSans,sans-serif'; font-size:12px; font-weight:600; text-decoration: underline; color:#00732f;\">QLocale::system</span></a><span style=\"font-family:'Open Sans,sans-serif'; font-size:11px; color:#66666e;\">().</span></p>"
157+
+ QStringLiteral( "</span><a href=\"http://qt-project.org/doc/qt-5/qlocale.html#system\"><span style=\"font-family:'Arial,FreeSans,sans-serif'; font-size:12px; font-weight:600; text-decoration: underline; color:#00732f;\">QLocale</span></a><span style=\"font-family:'Open Sans,sans-serif'; font-size:11px; color:#66666e;\">().</span></p>"
158158
"</td>"
159159
"</tr>"
160160
"<tr>"
@@ -184,7 +184,7 @@ QgsDateTimeEditConfig::QgsDateTimeEditConfig( QgsVectorLayer *vl, int fieldIdx,
184184
"<td bgcolor=\"#f6f6f6\" style=\"vertical-align:top; padding-left:10; padding-right:10; padding-top:3; padding-bottom:3;\">"
185185
"<p><span style=\"font-family:'Open Sans,sans-serif'; font-size:11px; color:#66666e; background-color:#f6f6f6;\">" )
186186
+ tr( "the abbreviated localized month name (e.g. 'Jan' to 'Dec'). Uses the system locale to localize the name, i.e." )
187-
+ QStringLiteral( "</span><a href=\"http://qt-project.org/doc/qt-5/qlocale.html#system\"><span style=\"font-family:'Arial,FreeSans,sans-serif'; font-size:12px; font-weight:600; text-decoration: underline; color:#00732f;\">QLocale::system</span></a><span style=\"font-family:'Open Sans,sans-serif'; font-size:11px; color:#66666e;\">().</span></p>"
187+
+ QStringLiteral( "</span><a href=\"http://qt-project.org/doc/qt-5/qlocale.html#system\"><span style=\"font-family:'Arial,FreeSans,sans-serif'; font-size:12px; font-weight:600; text-decoration: underline; color:#00732f;\">QLocale</span></a><span style=\"font-family:'Open Sans,sans-serif'; font-size:11px; color:#66666e;\">().</span></p>"
188188
"</td>"
189189
"</tr>"
190190
"<tr>"
@@ -194,7 +194,7 @@ QgsDateTimeEditConfig::QgsDateTimeEditConfig( QgsVectorLayer *vl, int fieldIdx,
194194
"<td bgcolor=\"#ffffff\" style=\"vertical-align:top; padding-left:10; padding-right:10; padding-top:3; padding-bottom:3;\">"
195195
"<p><span style=\"font-family:'Open Sans,sans-serif'; font-size:11px; color:#66666e; background-color:#ffffff;\">" )
196196
+ tr( "the long localized month name (e.g. 'January' to 'December'). Uses the system locale to localize the name, i.e." )
197-
+ QStringLiteral( "</span><a href=\"http://qt-project.org/doc/qt-5/qlocale.html#system\"><span style=\"font-family:'Arial,FreeSans,sans-serif'; font-size:12px; font-weight:600; text-decoration: underline; color:#00732f;\">QLocale::system</span></a><span style=\"font-family:'Open Sans,sans-serif'; font-size:11px; color:#66666e;\">().</span></p>"
197+
+ QStringLiteral( "</span><a href=\"http://qt-project.org/doc/qt-5/qlocale.html#system\"><span style=\"font-family:'Arial,FreeSans,sans-serif'; font-size:12px; font-weight:600; text-decoration: underline; color:#00732f;\">QLocale</span></a><span style=\"font-family:'Open Sans,sans-serif'; font-size:11px; color:#66666e;\">().</span></p>"
198198
"</td>"
199199
"</tr>"
200200
"<tr>"

‎src/gui/qgsconfigureshortcutsdialog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ void QgsConfigureShortcutsDialog::loadShortcuts()
206206
}
207207
else // use QGIS locale
208208
{
209-
currentLocale = QLocale::system().name();
209+
currentLocale = QLocale().name();
210210
}
211211

212212
if ( root.attribute( QStringLiteral( "locale" ) ) != currentLocale )

‎src/gui/qgsmaptoolidentify.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ bool QgsMapToolIdentify::identifyVectorLayer( QList<QgsMapToolIdentify::Identify
341341

342342
void QgsMapToolIdentify::closestVertexAttributes( const QgsAbstractGeometry &geometry, QgsVertexId vId, QgsMapLayer *layer, QMap< QString, QString > &derivedAttributes )
343343
{
344-
QString str = QLocale::system().toString( vId.vertex + 1 );
344+
QString str = QLocale().toString( vId.vertex + 1 );
345345
derivedAttributes.insert( tr( "Closest vertex number" ), str );
346346

347347
QgsPoint closestPoint = geometry.vertexAt( vId );
@@ -352,12 +352,12 @@ void QgsMapToolIdentify::closestVertexAttributes( const QgsAbstractGeometry &geo
352352

353353
if ( closestPoint.is3D() )
354354
{
355-
str = QLocale::system().toString( closestPoint.z(), 'g', 10 );
355+
str = QLocale().toString( closestPoint.z(), 'g', 10 );
356356
derivedAttributes.insert( QStringLiteral( "Closest vertex Z" ), str );
357357
}
358358
if ( closestPoint.isMeasure() )
359359
{
360-
str = QLocale::system().toString( closestPoint.m(), 'g', 10 );
360+
str = QLocale().toString( closestPoint.m(), 'g', 10 );
361361
derivedAttributes.insert( QStringLiteral( "Closest vertex M" ), str );
362362
}
363363

@@ -370,7 +370,7 @@ void QgsMapToolIdentify::closestVertexAttributes( const QgsAbstractGeometry &geo
370370
++vIdAfter.vertex;
371371
QgsGeometryUtils::circleCenterRadius( geometry.vertexAt( vIdBefore ), geometry.vertexAt( vId ),
372372
geometry.vertexAt( vIdAfter ), radius, centerX, centerY );
373-
derivedAttributes.insert( QStringLiteral( "Closest vertex radius" ), QLocale::system().toString( radius ) );
373+
derivedAttributes.insert( QStringLiteral( "Closest vertex radius" ), QLocale().toString( radius ) );
374374
}
375375
}
376376

@@ -419,9 +419,9 @@ QMap< QString, QString > QgsMapToolIdentify::featureDerivedAttributes( const Qgs
419419

420420
if ( QgsWkbTypes::isMultiType( wkbType ) )
421421
{
422-
QString str = QLocale::system().toString( static_cast<const QgsGeometryCollection *>( feature.geometry().constGet() )->numGeometries() );
422+
QString str = QLocale().toString( static_cast<const QgsGeometryCollection *>( feature.geometry().constGet() )->numGeometries() );
423423
derivedAttributes.insert( tr( "Parts" ), str );
424-
str = QLocale::system().toString( vId.part + 1 );
424+
str = QLocale().toString( vId.part + 1 );
425425
derivedAttributes.insert( tr( "Part number" ), str );
426426
}
427427

@@ -447,7 +447,7 @@ QMap< QString, QString > QgsMapToolIdentify::featureDerivedAttributes( const Qgs
447447
const QgsAbstractGeometry *geom = feature.geometry().constGet();
448448
if ( geom )
449449
{
450-
str = QLocale::system().toString( geom->nCoordinates() );
450+
str = QLocale().toString( geom->nCoordinates() );
451451
derivedAttributes.insert( tr( "Vertices" ), str );
452452
//add details of closest vertex to identify point
453453
closestVertexAttributes( *geom, vId, layer, derivedAttributes );
@@ -493,7 +493,7 @@ QMap< QString, QString > QgsMapToolIdentify::featureDerivedAttributes( const Qgs
493493
* QgsUnitTypes::fromUnitToUnitFactor( layer->crs().mapUnits(), cartesianDistanceUnits ), cartesianDistanceUnits );
494494
derivedAttributes.insert( tr( "Perimeter (Cartesian)" ), str );
495495

496-
str = QLocale::system().toString( feature.geometry().constGet()->nCoordinates() );
496+
str = QLocale().toString( feature.geometry().constGet()->nCoordinates() );
497497
derivedAttributes.insert( tr( "Vertices" ), str );
498498

499499
//add details of closest vertex to identify point
@@ -512,12 +512,12 @@ QMap< QString, QString > QgsMapToolIdentify::featureDerivedAttributes( const Qgs
512512

513513
if ( QgsWkbTypes::hasZ( wkbType ) )
514514
{
515-
str = QLocale::system().toString( static_cast<const QgsPoint *>( feature.geometry().constGet() )->z(), 'g', 10 );
515+
str = QLocale().toString( static_cast<const QgsPoint *>( feature.geometry().constGet() )->z(), 'g', 10 );
516516
derivedAttributes.insert( QStringLiteral( "Z" ), str );
517517
}
518518
if ( QgsWkbTypes::hasM( wkbType ) )
519519
{
520-
str = QLocale::system().toString( static_cast<const QgsPoint *>( feature.geometry().constGet() )->m(), 'g', 10 );
520+
str = QLocale().toString( static_cast<const QgsPoint *>( feature.geometry().constGet() )->m(), 'g', 10 );
521521
derivedAttributes.insert( QStringLiteral( "M" ), str );
522522
}
523523
}

‎src/gui/qgsscalecombobox.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ void QgsScaleComboBox::updateScales( const QStringList &scales )
6666
for ( int i = 0; i < myScalesList.size(); ++i )
6767
{
6868
parts = myScalesList[ i ] .split( ':' );
69-
denominator = QLocale::system().toDouble( parts[1], &ok );
69+
denominator = QLocale().toDouble( parts[1], &ok );
7070
if ( ok )
7171
{
7272
myScalesList[ i ] = toString( denominator );
@@ -185,11 +185,11 @@ QString QgsScaleComboBox::toString( double scale )
185185
}
186186
else if ( scale <= 1 )
187187
{
188-
return QStringLiteral( "%1:1" ).arg( QLocale::system().toString( static_cast< int >( std::round( 1.0 / scale ) ) ) );
188+
return QStringLiteral( "%1:1" ).arg( QLocale().toString( static_cast< int >( std::round( 1.0 / scale ) ) ) );
189189
}
190190
else
191191
{
192-
return QStringLiteral( "1:%1" ).arg( QLocale::system().toString( static_cast< int >( std::round( scale ) ) ) );
192+
return QStringLiteral( "1:%1" ).arg( QLocale().toString( static_cast< int >( std::round( scale ) ) ) );
193193
}
194194
}
195195

0 commit comments

Comments
 (0)