From 7b05e5df18d65f68fd2f089596b178c24f1ebc3a Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Fri, 22 May 2020 16:49:12 +0200 Subject: Port QLibraryInfo from QStringRef to QStringView Task-number: QTBUG-84319 Change-Id: I500e43e1918b22d636f11c915967e75223be9ef2 Reviewed-by: Thiago Macieira --- src/corelib/global/qlibraryinfo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp index b5164d1062..08aff5fa2a 100644 --- a/src/corelib/global/qlibraryinfo.cpp +++ b/src/corelib/global/qlibraryinfo.cpp @@ -771,7 +771,7 @@ QLibraryInfo::rawLocation(LibraryLocation loc, PathGroup group) int endIndex = ret.indexOf(QLatin1Char(')'), startIndex + 2); if (endIndex < 0) break; - QStringRef envVarName = ret.midRef(startIndex + 2, endIndex - startIndex - 2); + auto envVarName = QStringView{ret}.mid(startIndex + 2, endIndex - startIndex - 2); QString value = QString::fromLocal8Bit(qgetenv(envVarName.toLocal8Bit().constData())); ret.replace(startIndex, endIndex - startIndex + 1, value); startIndex += value.length(); -- cgit v1.2.3