summaryrefslogtreecommitdiffstats
path: root/src/corelib/doc
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2020-07-09 16:55:47 +0200
committerMårten Nordheim <marten.nordheim@qt.io>2020-09-03 14:15:52 +0200
commit8897aa071a668563a53a4c2e6909572f1762b1e7 (patch)
tree5c6ee5d4eb68361ad02b83cc735726c3a51f4af2 /src/corelib/doc
parent8eef75f0b52519f15078c29dfde5354ca7cccbdb (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.cpp2
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]