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.cpp | |
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.cpp')
-rw-r--r-- | src/corelib/tools/qstring.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp index d17dd32328..9b98f4322b 100644 --- a/src/corelib/tools/qstring.cpp +++ b/src/corelib/tools/qstring.cpp @@ -8800,7 +8800,6 @@ Since this class is only used to refer to string data, and does not take ownership of it, no memory is freed when instances are destroyed. */ - /*! \fn int QStringRef::position() const @@ -9039,6 +9038,19 @@ bool operator<(const QStringRef &s1,const QStringRef &s2) Q_DECL_NOTHROW */ /*! + \fn QChar QStringRef::operator[](int position) const + \since 5.7 + + Returns the character at the given index \a position in the + string reference. + + The \a position must be a valid index position in the string + reference (i.e., 0 <= \a position < size()). + + \sa at() +*/ + +/*! \fn void QStringRef::clear() Clears the contents of the string reference by making it null and empty. |