nomic-ai / gpt4all-chat

gpt4all-j chat
Other
1.27k stars 155 forks source link

locale mismatch in float handling for settings #126

Closed apage43 closed 1 year ago

apage43 commented 1 year ago

it seems on a Windows system with German locale the only way to set float values is entering them like 2E-01, both 0.2 and 0,2 incorrectly become 2

I believe the QML DoubleValidator etc are locale aware by default but parseFloat is not

We either need to change the validators on the text field to behave in a way that matches JS parseFloat

or use locale-aware parsing/displaying https://doc.qt.io/qt-6/qml-qtqml-number.html#fromLocaleString-method