From 9d6e84906e31bfb9472979fcb99aacef107b00b5 Mon Sep 17 00:00:00 2001 From: Jimi Huotari Date: Fri, 23 Aug 2019 14:46:09 +0300 Subject: [PATCH] refactor(Qt): use 'asprintf' instead of 'sprintf' Deprecated since Qt 5.14. - https://code.qt.io/cgit/qt/qtbase.git/commit/?h=5.14&id=f8f592d5 --- src/widget/form/chatform.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/widget/form/chatform.cpp b/src/widget/form/chatform.cpp index f3cb6fcaa..3489aacd5 100644 --- a/src/widget/form/chatform.cpp +++ b/src/widget/form/chatform.cpp @@ -88,18 +88,18 @@ QString secondsToDHMS(quint32 duration) // I assume no one will ever have call longer than a month if (days) { - return cD + res.sprintf("%dd%02dh %02dm %02ds", days, hours, minutes, seconds); + return cD + res.asprintf("%dd%02dh %02dm %02ds", days, hours, minutes, seconds); } if (hours) { - return cD + res.sprintf("%02dh %02dm %02ds", hours, minutes, seconds); + return cD + res.asprintf("%02dh %02dm %02ds", hours, minutes, seconds); } if (minutes) { - return cD + res.sprintf("%02dm %02ds", minutes, seconds); + return cD + res.asprintf("%02dm %02ds", minutes, seconds); } - return cD + res.sprintf("%02ds", seconds); + return cD + res.asprintf("%02ds", seconds); } } // namespace