summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2025-08-01 12:52:15 +0200
committerMarc Mutz <marc.mutz@qt.io>2025-08-20 21:40:24 +0200
commitf49ba1a6ec430dd0df24d89799894b511e5b33e4 (patch)
tree8be2547540c3e5323f2d4bc6b1373860184c47e8 /src
parent46b8f2eb1a2ef9655c963b567a517352facd307c (diff)
qvsnprintf: port from qt_saturate to q26::saturate_cast
The latter isn't in Qt 6.5 to which the amended commit was picked, so we used the old name qt_saturate there. This patch ports to the new name. Amends the commit that fixed QTBUG-138860 (final SHA-1 not known at this point). Task-number: QTBUG-138860 Pick-to: 6.10 6.9 6.8 Change-Id: Ia84ae50ddfd18cf028ecc7461821f4e727f0009a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/text/qvsnprintf.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/text/qvsnprintf.cpp b/src/corelib/text/qvsnprintf.cpp
index 522c56fb800..abe3dd6772d 100644
--- a/src/corelib/text/qvsnprintf.cpp
+++ b/src/corelib/text/qvsnprintf.cpp
@@ -5,10 +5,10 @@
#include "qplatformdefs.h"
#include "qbytearray.h"
-#include <QtCore/private/qnumeric_p.h>
#include "qstring.h"
#include <cerrno>
+#include <QtCore/q26numeric.h>
#include "string.h"
@@ -68,7 +68,7 @@ int qvsnprintf(char *str, size_t n, const char *fmt, va_list ap)
const auto realSize = ba.size();
int result;
if constexpr (sizeof(int) != sizeof(realSize)) {
- result = qt_saturate<int>(realSize);
+ result = q26::saturate_cast<int>(realSize);
if (result != realSize) {
errno = EOVERFLOW;
return -1;