Version: 0.30 (using Devel) OS: Linux Hi The calculators (concentration, gas and nuklear) do not work. For the concentration calculator the error ocours somewhere in kunitconversion. The Volume is always 0. Since there has been no changes, i assume they never worked? If i find some time i could try to debug a bit and share my findings. Reproducible: Always Steps to Reproduce: Open the concentration calculator in kalzium. change some values, i.e mass and volume Actual Results: only an error is displayed "Volume must be greater than 0". concentration is not calculated. Expected Results: the concentration should be calculated OS: Linux (i686) release 2.6.33-ARCH Compiler: gcc
confirmed recent trunk + branch compiled from sources + lucid (4.4.2)
I can confirm this bug, too, but only when the application language is set to German. If I switch to English the calculators work fine. Perhaps there is some problem with the decimal separator? Versions are KDE 4.4.4 (Gentoo) with Kalzium 2.3.80
(In reply to comment #2) > I can confirm this bug, too, but only when the application language is set to > German. Not only in german, but also using language x-test. > If I switch to English the calculators work fine. Perhaps there is some > problem with the decimal separator? > There is a strange matter with the decimal separator in the calculators here in trunk + 4.5, it is always the comma. Even if I change that in systemsettings to dot, it is still the comma in the calculators, whereas in kalzium's main window the decimal separator is used according to the choice in systemsettings.
May be a i18n() should be used for names of units in calls to Value(...)? Example: m_vol = Value(22.4, "liters");
Thanks Alexander. I tested your theory and it actually has a positiv effect. But i feel uneasy to link technical information to the i18n team. So, after browsing the KUnitConverter docs i found out that all units have an enum. Example: m_vol = Value(22.4, KUnitConversion::Liter); That works:) There is still the issue with the comboboxes though. But that should not be a problem now that we have found the bug. I just need a little time.
SVN commit 1225239 by erebetez: Fixing the gas calculator when i18n was used. Now using the unit id's instead of the string. CCBUG:241530 M +79 -54 gasCalculator.cpp M +17 -0 gasCalculator.h M +10 -173 gasCalculator.ui WebSVN link: http://websvn.kde.org/?view=rev&revision=1225239
Git commit 79626beaefee13be4dd25bc6b9a84da3bdb68260 by Etienne Rebetez. Committed on 23/09/2012 at 22:56. Pushed by erebetez into branch 'master'. Fixing the other calculators with the unit issue. Also add the populateUnitCombobox to the kalzium utils M +75 -66 src/calculator/concCalculator.cpp M +8 -2 src/calculator/concCalculator.h M +7 -13 src/calculator/gasCalculator.cpp M +93 -47 src/calculator/nuclearCalculator.cpp M +10 -1 src/calculator/nuclearCalculator.h M +2 -12 src/kalziumunitcombobox.cpp M +18 -0 src/kalziumutils.cpp M +9 -0 src/kalziumutils.h http://commits.kde.org/kalzium/79626beaefee13be4dd25bc6b9a84da3bdb68260