QString: Fix snippet explaining "non-spaced numbered place markers"
The snippet tries to explain the advantage of
str.arg("Hello", QString::number(20), QString::number(50));
over
str.arg("Hello").arg(20).arg(50);
which only makes sense, if str contains the same formating sequence,
namely "%1%3%2". That also matches the belonging comment.
Amends 8481500f63
Task-number: QTBUG-44044
Change-Id: Ic2595107bc599c6d244ebf88184a5cc5569ed4f1
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
20ac20bcea
commit
689a1e186b
@ -291,7 +291,7 @@ void Widget::argFunction()
|
|||||||
//! [97]
|
//! [97]
|
||||||
|
|
||||||
//! [98]
|
//! [98]
|
||||||
str = "%1%2%3";
|
str = "%1%3%2";
|
||||||
str.arg("Hello", QString::number(20), QString::number(50)); // returns "Hello5020"
|
str.arg("Hello", QString::number(20), QString::number(50)); // returns "Hello5020"
|
||||||
//! [98]
|
//! [98]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user