From aa5f2e7c735e1b9a00647a9a6b6797044c60ec4a Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Mon, 26 Oct 2020 07:24:18 -0700 Subject: cleanup: replace deprecated sprintf()/vsprintf() calls Signed-off-by: Dirk Hohndel --- core/downloadfromdcthread.cpp | 2 +- core/qthelper.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'core') diff --git a/core/downloadfromdcthread.cpp b/core/downloadfromdcthread.cpp index 44120894e..a93bba7ab 100644 --- a/core/downloadfromdcthread.cpp +++ b/core/downloadfromdcthread.cpp @@ -18,7 +18,7 @@ static QString str_error(const char *fmt, ...) { va_list args; va_start(args, fmt); - const QString str = QString().vsprintf(fmt, args); + const QString str = QString().vasprintf(fmt, args); va_end(args); return str; diff --git a/core/qthelper.cpp b/core/qthelper.cpp index 889d08b60..d3e225639 100644 --- a/core/qthelper.cpp +++ b/core/qthelper.cpp @@ -105,11 +105,11 @@ QString printGPSCoords(const location_t *location) lonmin = (lon % 1000000U) * 60U; latsec = (latmin % 1000000) * 60; lonsec = (lonmin % 1000000) * 60; - result.sprintf("%u°%02d\'%06.3f\"%s %u°%02d\'%06.3f\"%s", + result.asprintf("%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); + result.asprintf("%f %f", (double) lat / 1000000.0, (double) lon / 1000000.0); } return result; } -- cgit v1.2.3-70-g09d2