From 13e2161b7282f995cc702af5d343b5c9d4c03e48 Mon Sep 17 00:00:00 2001 From: Ivan Solovev Date: Fri, 27 Nov 2020 19:16:17 +0100 Subject: 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 --- src/corelib/doc/snippets/qstring/main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/corelib/doc/snippets') 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] -- cgit v1.2.3