summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorThiago Marcos P. Santos <tmpsantos@gmail.com>2019-09-06 14:52:37 +0300
committerThiago Marcos P. Santos <tmpsantos@gmail.com>2019-09-06 16:23:15 +0300
commit1bd439ad82696deb77b8f90c12cab642881643a4 (patch)
tree28402602f8499e42802dfbb7059df807856b78cd /platform
parentd2368bef2ea79b996e3c91e804d059d4b4e1a888 (diff)
downloadqtlocation-mapboxgl-1bd439ad82696deb77b8f90c12cab642881643a4.tar.gz
[core] Fix build with old ICU versions
Use the old API for number formatting.
Diffstat (limited to 'platform')
-rw-r--r--platform/default/src/mbgl/util/format_number.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/platform/default/src/mbgl/util/format_number.cpp b/platform/default/src/mbgl/util/format_number.cpp
index 7cc863818a..f58d6e100a 100644
--- a/platform/default/src/mbgl/util/format_number.cpp
+++ b/platform/default/src/mbgl/util/format_number.cpp
@@ -23,7 +23,11 @@ std::string formatNumber(double number, const std::string& localeId, const std::
.toString();
} else {
ustr = icu::number::NumberFormatter::with()
+#if U_ICU_VERSION_MAJOR_NUM >= 62
.precision(icu::number::Precision::minMaxFraction(minFractionDigits, maxFractionDigits))
+#else
+ .rounding(icu::number::Rounder::minMaxFraction(minFractionDigits, maxFractionDigits))
+#endif
.locale(locale)
.formatDouble(number, status)
.toString();