summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qstringview.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2017-04-04 22:06:16 +0200
committerMarc Mutz <marc.mutz@kdab.com>2017-04-06 02:38:25 +0000
commitbe49235266f07cffc4f8e6008c98605de79a05a0 (patch)
treefc28292cca534c284991594290f0f939cb9f00af /src/corelib/tools/qstringview.cpp
parent7d5e516e67bcafad7b81f3da2005ec38f574e590 (diff)
QStringView: use qssize_t as size_type
Nothing changes, we've just given 'QIntegerForSizeof<size_t>::Signed' a better name in qglobal.h and now use it in QStringView API and users. Change-Id: Ibea1ae26e95b3a96708400fd4b0cd120459d57b6 Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Diffstat (limited to 'src/corelib/tools/qstringview.cpp')
-rw-r--r--src/corelib/tools/qstringview.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/corelib/tools/qstringview.cpp b/src/corelib/tools/qstringview.cpp
index a2dfb8b97a..adffe1800c 100644
--- a/src/corelib/tools/qstringview.cpp
+++ b/src/corelib/tools/qstringview.cpp
@@ -131,9 +131,9 @@ QT_BEGIN_NAMESPACE
/*!
\typedef QStringView::size_type
- Alias for \c{std::ptrdiff_t}. Provided for compatibility with the STL.
+ Alias for qssize_t. Provided for compatibility with the STL.
- Unlike other Qt classes, QStringView uses \c ptrdiff_t as its \c size_type, to allow
+ Unlike other Qt classes, QStringView uses qssize_t as its \c size_type, to allow
accepting data from \c{std::basic_string} without truncation. The Qt API functions,
for example length(), return \c int, while the STL-compatible functions, for example
size(), return \c size_type.
@@ -233,7 +233,7 @@ QT_BEGIN_NAMESPACE
*/
/*!
- \fn QStringView::QStringView(const Char *str, size_type len)
+ \fn QStringView::QStringView(const Char *str, qssize_t len)
Constructs a string view on \a str with length \a len.
@@ -475,7 +475,7 @@ QT_BEGIN_NAMESPACE
*/
/*!
- \fn QStringView::size_type QStringView::size() const
+ \fn qssize_t QStringView::size() const
Returns the size of this string view, in UTF-16 code points (that is,
surrogate pairs count as two for the purposes of this function, the same
@@ -499,7 +499,7 @@ QT_BEGIN_NAMESPACE
*/
/*!
- \fn QChar QStringView::operator[](size_type n) const
+ \fn QChar QStringView::operator[](qssize_t n) const
Returns the character at position \a n in this string view.
@@ -509,7 +509,7 @@ QT_BEGIN_NAMESPACE
*/
/*!
- \fn QChar QStringView::at(size_type n) const
+ \fn QChar QStringView::at(qssize_t n) const
Returns the character at position \a n in this string view.
@@ -571,7 +571,7 @@ QT_BEGIN_NAMESPACE
*/
/*!
- \fn QStringView QStringView::mid(size_type start) const
+ \fn QStringView QStringView::mid(qssize_t start) const
Returns the substring starting at position \a start in this object,
and extending to the end of the string.
@@ -582,7 +582,7 @@ QT_BEGIN_NAMESPACE
*/
/*!
- \fn QStringView QStringView::mid(size_type start, size_type length) const
+ \fn QStringView QStringView::mid(qssize_t start, qssize_t length) const
\overload
Returns the substring of length \a length starting at position
@@ -595,7 +595,7 @@ QT_BEGIN_NAMESPACE
*/
/*!
- \fn QStringView QStringView::left(size_type length) const
+ \fn QStringView QStringView::left(qssize_t length) const
Returns the substring of length \a length starting at position
0 in this object.
@@ -606,7 +606,7 @@ QT_BEGIN_NAMESPACE
*/
/*!
- \fn QStringView QStringView::right(size_type length) const
+ \fn QStringView QStringView::right(qssize_t length) const
Returns the substring of length \a length starting at position
size() - \a length in this object.