diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2016-01-25 10:41:15 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2016-01-26 11:21:09 +0000 |
commit | cf51e2f33fa9ce28c3e822d75fcc87dfeaeed4b1 (patch) | |
tree | 43e4ad3b453a6f73c4e1836e752bb893c3092313 /src/corelib/tools/qstring.h | |
parent | 1c470f3af0e3093b9e17ffacb229bfff4c91511e (diff) |
QStringRef: add missing op[]
[ChangeLog][QtCore][QStringRef] Added subscript operator.
Change-Id: Ia85d5efcb7747d2961ba55922ddabe6a46bdf20b
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Diffstat (limited to 'src/corelib/tools/qstring.h')
-rw-r--r-- | src/corelib/tools/qstring.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/corelib/tools/qstring.h b/src/corelib/tools/qstring.h index 6d57343356..da651f865e 100644 --- a/src/corelib/tools/qstring.h +++ b/src/corelib/tools/qstring.h @@ -1462,6 +1462,7 @@ public: inline const QChar at(int i) const { Q_ASSERT(uint(i) < uint(size())); return m_string->at(i + m_position); } + QChar operator[](int i) const { return at(i); } #if !defined(QT_NO_CAST_FROM_ASCII) && !defined(QT_RESTRICTED_CAST_FROM_ASCII) // ASCII compatibility |