diff options
author | Lars Knoll <lars.knoll@qt.io> | 2020-07-09 16:55:47 +0200 |
---|---|---|
committer | Mårten Nordheim <marten.nordheim@qt.io> | 2020-09-03 14:15:52 +0200 |
commit | 8897aa071a668563a53a4c2e6909572f1762b1e7 (patch) | |
tree | 5c6ee5d4eb68361ad02b83cc735726c3a51f4af2 /src/corelib/doc | |
parent | 8eef75f0b52519f15078c29dfde5354ca7cccbdb (diff) |
Clean up the QByteArray API and implementation
Add overloads using a QByteArrayView where it makes sense, and
call those inline from the other overloads. Remove overloads
that are not required anymore (due to implicit conversion of
a const char * to a QByteArrayView).
Guard all implementations against passing this object to them.
Change-Id: I930156f8b05ce72c32cb8201c70513f2e6e19d3e
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/corelib/doc')
-rw-r--r-- | src/corelib/doc/snippets/code/src_corelib_text_qbytearray.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/doc/snippets/code/src_corelib_text_qbytearray.cpp b/src/corelib/doc/snippets/code/src_corelib_text_qbytearray.cpp index 196c992c8e..a166439659 100644 --- a/src/corelib/doc/snippets/code/src_corelib_text_qbytearray.cpp +++ b/src/corelib/doc/snippets/code/src_corelib_text_qbytearray.cpp @@ -195,7 +195,7 @@ x.append(y); //! [17] QByteArray ba("Meal"); -ba.insert(1, QByteArray("ontr")); +ba.insert(1, QByteArrayView("ontr")); // ba == "Montreal" //! [17] |