[Kalzium] [Bug 112412] State of Matter: Temperature doesn't match the temperatures
Pino Toscano
toscano.pino at tiscali.it
Sun Sep 11 16:22:47 CEST 2005
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
http://bugs.kde.org/show_bug.cgi?id=112412
------- Additional Comments From toscano.pino tiscali it 2005-09-11 16:22 -------
SVN commit 459585 by pino:
Fix the display of a temperature.
CCBUG: 112412
M +6 -7 element.cpp
--- branches/KDE/3.5/kdeedu/kalzium/src/element.cpp #459584:459585
@ -147,23 +147,22 @
v = i18n( "Value unknown" );
else
{
- int newvalue = (int)TempUnit::convert( val, Prefs::temperature(), (int)TempUnit::Kelvin );
- QString value = QString::number( newvalue );
+ double newvalue = TempUnit::convert( val, (int)TempUnit::Kelvin, Prefs::temperature() );
switch (Prefs::temperature()) {
case 0: //Kelvin
- v = i18n( "%1 is the temperature in Kelvin", "%1 K" ).arg( QString::number( val ) );
+ v = i18n( "%1 is the temperature in Kelvin", "%1 K" ).arg( newvalue );
break;
case 1://Kelvin to Celsius
- v = i18n( "%1 is the temperature in Celsius", "%1 %2C" ).arg( val ).arg( "\xB0" );
+ v = i18n( "%1 is the temperature in Celsius", "%1 %2C" ).arg( newvalue ).arg( "\xB0" );
break;
case 2: // Kelvin to Fahrenheit
- v = i18n( "%1 is the temperature in Fahrenheit", "%1 %2F" ).arg( val ).arg( "\xB0" );
+ v = i18n( "%1 is the temperature in Fahrenheit", "%1 %2F" ).arg( newvalue ).arg( "\xB0" );
break;
case 3: // Kelvin to Rankine
- v = i18n( "%1 is the temperature in Rankine", "%1 %2Ra" ).arg( val ).arg( "\xB0" );
+ v = i18n( "%1 is the temperature in Rankine", "%1 %2Ra" ).arg( newvalue ).arg( "\xB0" );
break;
case 4: // Kelvin to Reamur
- v = i18n( "%1 is the temperature in Reamur", "%1 %2R" ).arg( val ).arg( "\xB0" );
+ v = i18n( "%1 is the temperature in Reamur", "%1 %2R" ).arg( newvalue ).arg( "\xB0" );
break;
}
}
More information about the Kalzium
mailing list