doc: Fix QString::slice() code example
The snippet referred to had a duplicate identifier to an earlier snippet in the snippet file, causing that one to be quoted instead. Change-Id: Id46f6da807806f874291cd5d4c25b8884e511cfc Pick-to: 6.8 Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
This commit is contained in:
parent
e409947113
commit
d2c9982a56
@ -912,11 +912,11 @@ void Widget::arrayOperator()
|
||||
|
||||
void Widget::sliceFunction()
|
||||
{
|
||||
//! [97]
|
||||
//! [slice97]
|
||||
QString x = u"Nine pineapples"_s;
|
||||
x.slice(5); // x == "pineapples"
|
||||
x.slice(4, 3); // x == "app"
|
||||
//! [97]
|
||||
//! [slice97]
|
||||
}
|
||||
|
||||
|
||||
|
@ -5427,7 +5427,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 97
|
||||
\snippet qstring/main.cpp slice97
|
||||
|
||||
\sa sliced(), first(), last(), chopped(), chop(), truncate()
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user