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 Change-Id: Iba738a1bdaf5821df48bf5e222bee911c5ddf1fc Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> (cherry picked from commit b3e5b134eeaae85025879cd0309664ce0ba1f6de) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
3b9f202539
commit
12e30532de
@ -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]
|
||||
}
|
||||
|
||||
|
||||
|
@ -5431,7 +5431,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