-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial value of IBU Adjustments erroneous on systems that use coma as decimal separator #158
Comments
This is a hard thing. The essence is that in BtLineEdit::setText(BeerXMLElement *element), the conversion went from QVariant to QString to double. The problem was that the QString ended up as something like "1.045". The conversion from QString to double is locale aware, so en_US would get 1.045 but locales like bt_PR would get 1e3+45. I fixed this by replacing the QVariant->QString->double conversion with a QVariant->double conversion. It *seems* to work -- I've tried this with en_US, bt_PR, de_DE and fr_FR and they all *appear* to do the right thing. I don't think we need to fix anything else. The values written to the database are written as doubles, so this kind of conversion is irrelevant. On the other hand, I have demonstrated an annoying inability to test my own code and my database my not behave like anybody elses.
Tested on latest dev build, looks like it's fixed. Close? |
@dpettersson can you test this on linux and see if it's an issue for you? |
Sure, i can test it. And also the fix for this has been merged into develop. I don't think it has been included in 2.4 (yet) |
It seems to work for me. But im not sure if it is 2.4. So if we should close it then maybe we should import the patch. |
Closes #158. Imported the patch from develop
closed? |
Since, from the most recent comments, it looks like this is fixed, I'm closing. Please re-open if I've misunderstood. |
After a fresh install of BT 2.3.0 on windows, I noticed that the default values of IBU Adjustments were set to 10 000,000 instead of 10,000. This is obviously due to the use of coma as separator in my system configuration.
This bug is not blocking as if I set 10,000 as a new value it will remains as is.
The text was updated successfully, but these errors were encountered: