diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2019-05-11 22:45:49 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-05-12 12:25:43 -0700 |
commit | e362afe43ca4144838fd544bcb048d4a033690bc (patch) | |
tree | f82e071e688af93f0b19456e015f04b25239d1a6 /core/qthelper.cpp | |
parent | 32720a7c18f5774e5ac44338bfbac8129b0bc3c9 (diff) | |
download | subsurface-e362afe43ca4144838fd544bcb048d4a033690bc.tar.gz |
Cleanup: remove UTF8 macros
At some places we use UTF8 string literals. Therefore, we effectively
only support UTF8 build systems. We might just as well remove all
the other UTF_* macros and use direct string literals.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/qthelper.cpp')
-rw-r--r-- | core/qthelper.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/core/qthelper.cpp b/core/qthelper.cpp index 37e6dcdfc..3abcec04a 100644 --- a/core/qthelper.cpp +++ b/core/qthelper.cpp @@ -98,9 +98,9 @@ QString printGPSCoords(const location_t *location) lonmin = (lon % 1000000U) * 60U; latsec = (latmin % 1000000) * 60; lonsec = (lonmin % 1000000) * 60; - result.sprintf("%u%s%02d\'%06.3f\"%s %u%s%02d\'%06.3f\"%s", - latdeg, UTF8_DEGREE, latmin / 1000000, latsec / 1000000, qPrintable(lath), - londeg, UTF8_DEGREE, lonmin / 1000000, lonsec / 1000000, qPrintable(lonh)); + result.sprintf("%u°%02d\'%06.3f\"%s %u°%02d\'%06.3f\"%s", + latdeg, latmin / 1000000, latsec / 1000000, qPrintable(lath), + londeg, lonmin / 1000000, lonsec / 1000000, qPrintable(lonh)); } else { result.sprintf("%f %f", (double) lat / 1000000.0, (double) lon / 1000000.0); } @@ -577,19 +577,19 @@ QString get_temperature_string(temperature_t temp, bool showunit) return ""; //temperature not defined } else if (prefs.units.temperature == units::CELSIUS) { double celsius = mkelvin_to_C(temp.mkelvin); - return QString("%L1%2%3").arg(celsius, 0, 'f', 1).arg(showunit ? (UTF8_DEGREE) : "").arg(showunit ? gettextFromC::tr("C") : QString()); + return QString("%L1%2%3").arg(celsius, 0, 'f', 1).arg(showunit ? "°" : "").arg(showunit ? gettextFromC::tr("C") : QString()); } else { double fahrenheit = mkelvin_to_F(temp.mkelvin); - return QString("%L1%2%3").arg(fahrenheit, 0, 'f', 1).arg(showunit ? (UTF8_DEGREE) : "").arg(showunit ? gettextFromC::tr("F") : QString()); + return QString("%L1%2%3").arg(fahrenheit, 0, 'f', 1).arg(showunit ? "°" : "").arg(showunit ? gettextFromC::tr("F") : QString()); } } QString get_temp_unit() { if (prefs.units.temperature == units::CELSIUS) - return QString(UTF8_DEGREE "C"); + return QString("°C"); else - return QString(UTF8_DEGREE "F"); + return QString("°F"); } QString get_volume_string(int mliter, bool showunit) |