From 1fc5527e2d9319e23dd7f419de216d60e90ac2c4 Mon Sep 17 00:00:00 2001 From: Alexey Edelev Date: Tue, 26 Mar 2024 10:18:59 +0100 Subject: [PATCH] Add the note about data size to QByteArray::operator=(const char*) Add the note about the way the str size is determined when using QByteArray::operator=(const char*). Pick-to: 6.5 Change-Id: I39b2d0fc2967832622fbf0c11b3ff6c7ff99b8f2 Reviewed-by: Thiago Macieira Reviewed-by: Leena Miettinen (cherry picked from commit 32e2386b157effa5f253ffd669ed52471863823b) Reviewed-by: Qt Cherry-pick Bot (cherry picked from commit 41ecbdf4670171f1d9f68fb6ccd74ef4b05368cd) --- src/corelib/text/qbytearray.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/corelib/text/qbytearray.cpp b/src/corelib/text/qbytearray.cpp index 267d8a33713..8f5c7303c38 100644 --- a/src/corelib/text/qbytearray.cpp +++ b/src/corelib/text/qbytearray.cpp @@ -1333,6 +1333,9 @@ QByteArray &QByteArray::operator=(const QByteArray & other) noexcept \overload Assigns \a str to this byte array. + + \a str is assumed to point to a null-terminated string, and its length is + determined dynamically. */ QByteArray &QByteArray::operator=(const char *str)