Doc: QString::slice uses the wrong snippet
Changed the number, which caused the problem of showing the snippet. Two of the same numbers were given to the different snippets. Fixes: QTBUG-130565 Pick-to: 6.8 Change-Id: Iba738a1bdaf5821df48bf5e222bee911c5ddf1fc Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
This commit is contained in:
parent
1cf03c974c
commit
b3e5b134ee
@ -912,11 +912,11 @@ void Widget::arrayOperator()
|
||||
|
||||
void Widget::sliceFunction()
|
||||
{
|
||||
//! [86]
|
||||
//! [97]
|
||||
QString x = u"Nine pineapples"_s;
|
||||
x.slice(5); // x == "pineapples"
|
||||
x.slice(4, 3); // x == "app"
|
||||
//! [86]
|
||||
//! [97]
|
||||
}
|
||||
|
||||
|
||||
|
@ -5428,7 +5428,7 @@ QString QString::sliced_helper(QString &str, qsizetype pos, qsizetype n)
|
||||
\note The behavior is undefined if \a pos < 0, \a n < 0,
|
||||
or \a pos + \a n > size().
|
||||
|
||||
\snippet qstring/main.cpp 86
|
||||
\snippet qstring/main.cpp 97
|
||||
|
||||
\sa sliced(), first(), last(), chopped(), chop(), truncate()
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user