From 6c21f8103b671d68d4181005453972fd35c3c872 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Thu, 18 Jul 2024 11:25:15 +0200 Subject: [PATCH] q(v)snprintf(): mark the functions as \obsolete We can't deprecate them, yet, because there are way too many users in Qt and 6.8 is too close by now, but we should give users a heads-up that better alternatives exist these days. Pick-to: 6.7 6.5 6.2 5.15 Task-number: QTBUG-127110 Change-Id: Ic14e9d12fc746fdc65d6c0006756c37339aa25f0 Reviewed-by: Volker Hilsheimer (cherry picked from commit 3f54c71b78e4ed4ab513190bbcda89ae27256377) Reviewed-by: Qt Cherry-pick Bot --- src/corelib/text/qvsnprintf.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/corelib/text/qvsnprintf.cpp b/src/corelib/text/qvsnprintf.cpp index 839fc242170..1a3dc2e1f95 100644 --- a/src/corelib/text/qvsnprintf.cpp +++ b/src/corelib/text/qvsnprintf.cpp @@ -15,6 +15,10 @@ QT_BEGIN_NAMESPACE /*! \relates QByteArray + \obsolete + + Use C++11's \c{std::vsnprintf()} from \c{} instead. + A portable \c vsnprintf() function. Will call \c ::vsnprintf(), \c ::_vsnprintf(), or \c ::vsnprintf_s depending on the system, or fall back to an internal version. @@ -67,6 +71,10 @@ int qvsnprintf(char *str, size_t n, const char *fmt, va_list ap) \target bytearray-qsnprintf \relates QByteArray + \obsolete + + Use C++11's \c{std::snprintf()} from \c{} instead. + A portable snprintf() function, calls qvsnprintf. \a fmt is the \c printf() format string. The result is put into