summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets/qwidgettextcontrol.cpp
diff options
context:
space:
mode:
authorAnton Kudryavtsev <a.kudryavtsev@netris.ru>2016-04-05 18:39:14 +0300
committerAnton Kudryavtsev <a.kudryavtsev@netris.ru>2016-04-06 12:23:37 +0000
commit9b699fa839f560a9ea9da69c8975b9aa4654ab8b (patch)
treee4a3b79c059bf391163c574f4875f99d209b14ce /src/widgets/widgets/qwidgettextcontrol.cpp
parent9d0dbc32dd3c37c1199115762fab6ac1cedb9ce3 (diff)
Widgets: 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: Id1c39093199519f2794b11560c2c0ded2d52b928 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'src/widgets/widgets/qwidgettextcontrol.cpp')
-rw-r--r--src/widgets/widgets/qwidgettextcontrol.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/widgets/qwidgettextcontrol.cpp b/src/widgets/widgets/qwidgettextcontrol.cpp
index dfb1f865dc..af6d879661 100644
--- a/src/widgets/widgets/qwidgettextcontrol.cpp
+++ b/src/widgets/widgets/qwidgettextcontrol.cpp
@@ -2123,7 +2123,7 @@ QVariant QWidgetTextControl::inputMethodQuery(Qt::InputMethodQuery property, QVa
tmpCursor.movePosition(QTextCursor::NextBlock);
--numBlocks;
}
- result += block.text().mid(0,localPos);
+ result += block.text().midRef(0, localPos);
return QVariant(result);
}
default: