diff options
author | Anton Kudryavtsev <a.kudryavtsev@netris.ru> | 2016-04-05 18:39:14 +0300 |
---|---|---|
committer | Anton Kudryavtsev <a.kudryavtsev@netris.ru> | 2016-04-06 12:23:37 +0000 |
commit | 9b699fa839f560a9ea9da69c8975b9aa4654ab8b (patch) | |
tree | e4a3b79c059bf391163c574f4875f99d209b14ce /src/widgets/widgets/qcalendarwidget.cpp | |
parent | 9d0dbc32dd3c37c1199115762fab6ac1cedb9ce3 (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/qcalendarwidget.cpp')
-rw-r--r-- | src/widgets/widgets/qcalendarwidget.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/widgets/qcalendarwidget.cpp b/src/widgets/widgets/qcalendarwidget.cpp index 66e4a89fe9..caeabb660b 100644 --- a/src/widgets/widgets/qcalendarwidget.cpp +++ b/src/widgets/widgets/qcalendarwidget.cpp @@ -554,7 +554,7 @@ void QCalendarDateValidator::setFormat(const QString &format) bool quoting = false; QString separator; while (pos < format.size()) { - QString mid = format.mid(pos); + const QStringRef mid = format.midRef(pos); int offset = 1; if (mid.startsWith(quote)) { |