From 8897aa071a668563a53a4c2e6909572f1762b1e7 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Thu, 9 Jul 2020 16:55:47 +0200 Subject: Clean up the QByteArray API and implementation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Lars Knoll Reviewed-by: MÃ¥rten Nordheim --- src/corelib/doc/snippets/code/src_corelib_text_qbytearray.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/corelib/doc/snippets') 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] -- cgit v1.2.3