diff options
author | Anton Kudryavtsev <a.kudryavtsev@netris.ru> | 2016-08-15 17:30:44 +0300 |
---|---|---|
committer | Anton Kudryavtsev <a.kudryavtsev@netris.ru> | 2016-08-18 07:29:37 +0000 |
commit | 1075f6c7644e098530b317d3ac271328c7ddb481 (patch) | |
tree | 697e95f8b6cddb8e87aa2a742f5753fbad924a0a /src/gui/text/qcssparser.cpp | |
parent | 469b13916983aff4625657eecbb7d2399cac901d (diff) |
Use QStringRef to optimize memory allocation
Replace substring functions that return QString
with corresponding functions that return QStringRef.
Change-Id: I3c485f89352a1ee66076fba74fd486da9349c354
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/gui/text/qcssparser.cpp')
-rw-r--r-- | src/gui/text/qcssparser.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/text/qcssparser.cpp b/src/gui/text/qcssparser.cpp index 72c5d5ff33..3e36a6d1c9 100644 --- a/src/gui/text/qcssparser.cpp +++ b/src/gui/text/qcssparser.cpp @@ -2107,7 +2107,7 @@ QString Scanner::preprocess(const QString &input, bool *hasEscapeSequences) hexCount = qMin(hexCount, 6); bool ok = false; - ushort code = output.mid(hexStart, hexCount).toUShort(&ok, 16); + ushort code = output.midRef(hexStart, hexCount).toUShort(&ok, 16); if (ok) { output.replace(hexStart - 1, hexCount + 1, QChar(code)); i = hexStart; |