diff options
author | Marc Mutz <marc.mutz@qt.io> | 2022-08-11 14:10:03 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-09-01 15:32:16 +0000 |
commit | e8e91ef35ce559b31e63cbd1c2a87ea111fbed58 (patch) | |
tree | b7da71b27f7200aba552cfecb24a103cc2470b23 /src/corelib/text/qstringview.cpp | |
parent | 53997b5196f1beb3d777a16e7c12a8bbb6688fa8 (diff) |
[docs] Fix ints that should be qsizetype [src/corelib/text]
For the constructors, replace int with qsizetype. For the incorrect
return type in \fn of length(), drop the return type, the presence of
which violated DRY, stressing the importance of that SOLID principle.
Fixes: QTBUG-103531
Change-Id: Ic7a8e1953333c28a2722fd7f753a0b5af6777395
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 334c27dad139956135b8687bf695e3cfa0228b9c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/corelib/text/qstringview.cpp')
-rw-r--r-- | src/corelib/text/qstringview.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/text/qstringview.cpp b/src/corelib/text/qstringview.cpp index c13b51b493..8f1aa3dfea 100644 --- a/src/corelib/text/qstringview.cpp +++ b/src/corelib/text/qstringview.cpp @@ -32,7 +32,7 @@ QT_BEGIN_NAMESPACE When used as an interface type, QStringView allows a single function to accept a wide variety of UTF-16 string data sources. One function accepting QStringView thus replaces three function overloads (taking QString and - \c{(const QChar*, int)}), while at the same time enabling even more string data + \c{(const QChar*, qsizetype)}), while at the same time enabling even more string data sources to be passed to the function, such as \c{u"Hello World"}, a \c char16_t string literal. @@ -481,7 +481,7 @@ QT_BEGIN_NAMESPACE */ /*! - \fn int QStringView::length() const + \fn QStringView::length() const Same as size(). |