Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
4.6.2
-
None
-
720f4ca0ec3b42a101ac24b2cf74cdc87d29eac9
Description
QString::arg(): When specifying %L1 with a number that would have a group separator in it when the default locale is set to omit the group separator then this option is ignored and it is shown anyway
Example:
#include <QtCore> int main(int argc, char **argv) { QLocale l(QLocale::English, QLocale::UnitedKingdom); l.setNumberOptions(QLocale::OmitGroupSeparator); QLocale::setDefault(l); QCoreApplication ca(argc, argv); QString str("%L1"); str = str.arg(5000); qDebug() << str; return 0; }
In the example given, str should be 5000, but it is in fact 5,000. The patch attached should solve the issue.