From 5bd7668403761fae0eb434ae7f7b9ce99f894802 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Mon, 11 May 2020 15:37:25 +0200 Subject: Replace some QString::fromRawData() with QStringViews around the code Even though QString::fromRawData() may not be as expensive as it used to be, it's still and out-of-line call _and_ more characters to type, so replace with QStringView construction where applicable. Change-Id: I70662da1bd45284f67e117e92b25d242afb8aaf8 Reviewed-by: Lars Knoll --- src/corelib/io/qurl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/corelib/io/qurl.cpp') diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp index 7b09db5566..308d993440 100644 --- a/src/corelib/io/qurl.cpp +++ b/src/corelib/io/qurl.cpp @@ -1210,7 +1210,7 @@ static const QChar *parseIpFuture(QString &host, const QChar *begin, const QChar (begin[2].unicode() >= '0' && begin[2].unicode() <= '9')) { // this is so unlikely that we'll just go down the slow path // decode the whole string, skipping the "[vH." and "]" which we already know to be there - host += QString::fromRawData(begin, 4); + host += QStringView(begin, 4); // uppercase the version, if necessary if (begin[2].unicode() >= 'a') -- cgit v1.2.3