From ee6aadcff4576be50ffc953db2363522b86feb58 Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Fri, 26 Jun 2020 16:18:49 +0200 Subject: [PATCH] QByteArray::operator[] no longer resizes Fix the documentation Change-Id: I328d9dd9255f15225992502dc35ae8877fe206a1 Reviewed-by: Giuseppe D'Angelo --- src/corelib/text/qbytearray.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/corelib/text/qbytearray.cpp b/src/corelib/text/qbytearray.cpp index 265c1fbf72..2b46bf734d 100644 --- a/src/corelib/text/qbytearray.cpp +++ b/src/corelib/text/qbytearray.cpp @@ -1363,9 +1363,8 @@ QByteArray &QByteArray::operator=(const char *str) Returns the byte at index position \a i as a modifiable reference. - If an assignment is made beyond the end of the byte array, the - array is extended with resize() before the assignment takes - place. + \a i must be a valid index position in the byte array (i.e., 0 <= + \a i < size()). Example: \snippet code/src_corelib_text_qbytearray.cpp 9