D10555: Accept dot as decimal separator even if the decimal separator is comma and the group separator is not dot neither comma

Christoph Feck noreply at phabricator.kde.org
Wed Aug 15 15:44:17 BST 2018


cfeck added inline comments.

INLINE COMMENTS

> kcalcdisplay.cpp:314
> +	if (KNumber::decimalSeparator() == QStringLiteral(",") &&
> +		(QLocale().groupSeparator() != ',' && QLocale().groupSeparator() != '.') &&
> +		tmp_str.count('.') == 1) {

Move `&&` to beginning of lines.

> kcalcdisplay.cpp:316
> +		tmp_str.count('.') == 1) {
> +		tmp_str = tmp_str.replace(QStringLiteral("."), QStringLiteral(","));
> +	}

Please use `QChar` for comparisons and replacements.

REPOSITORY
  R353 KCalc

REVISION DETAIL
  https://phabricator.kde.org/D10555

To: martonmiklos, cfeck, teran
Cc: cfeck, kde-utils-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-utils-devel/attachments/20180815/8ec6d54f/attachment.html>


More information about the Kde-utils-devel mailing list