diff options
author | Ivan Solovev <ivan.solovev@qt.io> | 2020-11-27 19:16:17 +0100 |
---|---|---|
committer | Ivan Solovev <ivan.solovev@qt.io> | 2020-12-15 15:54:46 +0100 |
commit | 13e2161b7282f995cc702af5d343b5c9d4c03e48 (patch) | |
tree | 41ed093afad0382d4b23addd51eb374293a0077c /src/corelib/doc/snippets | |
parent | 21e4e85a5798884837b35859f73f1eca4cb976d2 (diff) |
QString: update documentation
The QString documentation is aligned with QList regarding common
wording and ideas:
- Extend general class description
- Revise description of several methods
- Fix examples to use qsizetype instead of int
- Wrap descriptions at 80 characters
Pick-to: 6.0
Task-number: QTBUG-87962
Change-Id: I7d5a7e829ce8b98a0a1a7fae6b7ae0dec4effbae
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src/corelib/doc/snippets')
-rw-r--r-- | src/corelib/doc/snippets/qstring/main.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/doc/snippets/qstring/main.cpp b/src/corelib/doc/snippets/qstring/main.cpp index 8abe69ed42..d0a1b9c9ba 100644 --- a/src/corelib/doc/snippets/qstring/main.cpp +++ b/src/corelib/doc/snippets/qstring/main.cpp @@ -393,7 +393,7 @@ void Widget::fromRawDataFunction() static const QChar unicode[] = { 0x005A, 0x007F, 0x00A4, 0x0060, 0x1009, 0x0020, 0x0020}; - int size = sizeof(unicode) / sizeof(QChar); + qsizetype size = sizeof(unicode) / sizeof(QChar); QString str = QString::fromRawData(unicode, size); if (str.contains(pattern) { @@ -586,7 +586,7 @@ void Widget::reserveFunction() { //! [44] QString result; - int maxSize; + qsizetype maxSize; bool condition; QChar nextChar; @@ -700,7 +700,7 @@ void Widget::sizeFunction() { //! [58] QString str = "World"; - int n = str.size(); // n == 5 + qsizetype n = str.size(); // n == 5 str.data()[0]; // returns 'W' str.data()[4]; // returns 'd' //! [58] |