@@ -40,16 +40,6 @@ QString QgsRangeFieldFormatter::representValue( QgsVectorLayer *layer, int field
4040
4141 QString result;
4242
43- // Prepare locale
44- std::function<QLocale ()> f_locale = [ ]
45- {
46- QLocale locale ( QgsApplication::instance ()->locale () );
47- QLocale::NumberOptions options ( locale.numberOptions () );
48- options |= QLocale::NumberOption::OmitGroupSeparator;
49- locale.setNumberOptions ( options );
50- return locale;
51- };
52-
5343 const QgsField field = layer->fields ().at ( fieldIndex );
5444
5545 if ( field.type () == QVariant::Double &&
@@ -64,7 +54,7 @@ QString QgsRangeFieldFormatter::representValue( QgsVectorLayer *layer, int field
6454 if ( ok )
6555 {
6656 // TODO: make the format configurable!
67- result = f_locale ().toString ( val, ' f' , precision );
57+ result = QLocale::system ().toString ( val, ' f' , precision );
6858 }
6959 }
7060 }
@@ -75,7 +65,7 @@ QString QgsRangeFieldFormatter::representValue( QgsVectorLayer *layer, int field
7565 double val ( value.toInt ( &ok ) );
7666 if ( ok )
7767 {
78- result = f_locale ().toString ( val, ' f' , 0 );
68+ result = QLocale::system ().toString ( val, ' f' , 0 );
7969 }
8070 }
8171 else if ( ( field.type () == QVariant::LongLong ) &&
@@ -85,7 +75,7 @@ QString QgsRangeFieldFormatter::representValue( QgsVectorLayer *layer, int field
8575 double val ( value.toLongLong ( &ok ) );
8676 if ( ok )
8777 {
88- result = f_locale ().toString ( val, ' f' , 0 );
78+ result = QLocale::system ().toString ( val, ' f' , 0 );
8979 }
9080 }
9181 else
0 commit comments