- changed status to open
parsing of decimal in formula
Can not enter decimal number in formula.
On My Ubuntu ( german localization while my qtcreator has englisch localization) neither i.e. 3,4 (official german notation for decimals) nor 3.4 can be parsed.
Formulas from existing file work fine.
The debug console says:
Message: "Unexpected token ".4 " found at position 10." Expression: "Name_1 / 3.4 "
Formulas should accept only 3.4 notation (or both notations) in m.h.o.
Comments (4)
-
repo owner -
repo owner You can use point for decimal separator if you change settings. But it is not what we want. My solution is to catch all characters "." and "," and convert them to current locale settings, like do many programs.
-
reporter line:
result = Eval();
in
qreal Calculator::EvalFormula(const QString &formula)
triggers the error
if I deselect With OS options (,) in preferences the 3,4 notation works. We should avoid a state where neither notation works as it is confusing for the user.
-
repo owner - changed status to closed
I think now fixed. User should choose what use "." or ",". Because we also want functions we can't allow both at the same time.
- Log in to comment
Confirm.