diff options
| author | Albert Astals Cid <albert.astals.cid@kdab.com> | 2020-06-26 16:18:49 +0200 |
|---|---|---|
| committer | Albert Astals Cid <albert.astals.cid@kdab.com> | 2020-06-29 13:24:11 +0200 |
| commit | ee6aadcff4576be50ffc953db2363522b86feb58 (patch) | |
| tree | 6687fdb3710e8137dc40aac17642a3ca81c693cb /src | |
| parent | 943340222e841904707dc4f3e08f0df57d2e5c28 (diff) | |
QByteArray::operator[] no longer resizes
Fix the documentation
Change-Id: I328d9dd9255f15225992502dc35ae8877fe206a1
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Diffstat (limited to 'src')
| -rw-r--r-- | src/corelib/text/qbytearray.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/corelib/text/qbytearray.cpp b/src/corelib/text/qbytearray.cpp index 265c1fbf725..2b46bf734d6 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 |
