From 54da2b2911ace652dbd2c8ea852c5b8c47ab09c8 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 28 Jul 2014 23:31:32 -0700 Subject: Simplify and unify Q{ByteArray,String{,Ref}}::{simplify,trimmed} MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As a side effect, QString::simplified() will always return a detached copy, even if it's the same contents. QStringRef::trimmed() can use the same calculation algorithm but can't use the trimmed_helper() template function due to its lack of a constructor taking begin pointer and size (std::string_view could do it). That constructor can't be added because QStringRef always refers to an existing QString, not to data in memory. Change-Id: Ib966c1741819c68c6bac5fcbb00f8ac818b3ccab Reviewed-by: Olivier Goffart Reviewed-by: Jędrzej Nowacki Reviewed-by: Marc Mutz --- src/corelib/tools/tools.pri | 1 + 1 file changed, 1 insertion(+) (limited to 'src/corelib/tools/tools.pri') diff --git a/src/corelib/tools/tools.pri b/src/corelib/tools/tools.pri index af0ed228bd..adda91b739 100644 --- a/src/corelib/tools/tools.pri +++ b/src/corelib/tools/tools.pri @@ -57,6 +57,7 @@ HEADERS += \ tools/qsize.h \ tools/qstack.h \ tools/qstring.h \ + tools/qstringalgorithms_p.h \ tools/qstringbuilder.h \ tools/qstringiterator_p.h \ tools/qstringlist.h \ -- cgit v1.2.3