From 070bfe9e4ac02963925fd550d3540cebce0398e3 Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Fri, 27 Dec 2019 15:11:44 +0000 Subject: [PATCH] use public QByteArray constructor in QByteArray::trimmed() Signed-off-by: Ivailo Monev --- src/core/tools/qbytearray.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/core/tools/qbytearray.cpp b/src/core/tools/qbytearray.cpp index 20f7a04c9..bcf0079f9 100644 --- a/src/core/tools/qbytearray.cpp +++ b/src/core/tools/qbytearray.cpp @@ -3169,8 +3169,7 @@ QByteArray QByteArray::trimmed() const } int l = end - start + 1; if (l <= 0) { - shared_empty.ref.ref(); - return QByteArray(&shared_empty, 0, 0); + return QByteArray(); } return QByteArray(s+start, l); }