summaryrefslogtreecommitdiffstats
path: root/src/corelib/global
diff options
context:
space:
mode:
authorAnton Kudryavtsev <a.kudryavtsev@netris.ru>2016-03-31 12:01:59 +0300
committerAnton Kudryavtsev <a.kudryavtsev@netris.ru>2016-07-02 07:39:06 +0000
commit6662919ecde901771d9641fd732aa0735ebb39e6 (patch)
tree449752f7d9582cd685d81829e0e2245b0f9a0ece /src/corelib/global
parent2185b2f054ddae0fc67b8799b3561c57729f1cd7 (diff)
CoreLib: use QStringRef to optimize memory allocation
Replace substring functions that return QString with corresponding functions that return QStringRef where it's possible. Create QString from QStringRef only where necessary. Change-Id: Id9ea11b16947220cd27787c0b529de62d10b6c26 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/corelib/global')
-rw-r--r--src/corelib/global/qlibraryinfo.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp
index c31b6daa00..4303f74709 100644
--- a/src/corelib/global/qlibraryinfo.cpp
+++ b/src/corelib/global/qlibraryinfo.cpp
@@ -532,7 +532,7 @@ QLibraryInfo::rawLocation(LibraryLocation loc, PathGroup group)
reg_var.setMinimal(true);
while((rep = reg_var.indexIn(ret)) != -1) {
ret.replace(rep, reg_var.matchedLength(),
- QString::fromLocal8Bit(qgetenv(ret.mid(rep + 2,
+ QString::fromLocal8Bit(qgetenv(ret.midRef(rep + 2,
reg_var.matchedLength() - 3).toLatin1().constData()).constData()));
}