Bug 91287 - Fahrenheit Celsius are Reversed
Summary: Fahrenheit Celsius are Reversed
Status: RESOLVED FIXED
Alias: None
Product: kalzium
Classification: Applications
Component: general (show other bugs)
Version: 1.2
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Carsten Niehaus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-14 05:33 UTC by Jeff Kendall
Modified: 2004-10-17 03:19 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jeff Kendall 2004-10-14 05:33:59 UTC
Version:           1.2 (using KDE KDE 3.3.0)
Installed from:    Gentoo Packages
Compiler:          gcc version 3.3.4 20040623 CFLAGS="-mcpu=athlon-xp -march=athlon-xp -mmmx -m3dnow -msse -pipe -funroll-loops -O3"
OS:                Linux

Under the miscellaneous settings, if "Use Degrees Fahrenheit" is selected, the temperatures are reported in celsius.  As well, if "Use Degrees Celsius" is selected, the temperatures are reported in fahrenheit.  These values are reported incorrectly in the Energy Information section, for each element.  It is expected that selecting celsius, would display values in celsius, and vice-versa.
Comment 1 Anne-Marie Mahfouf 2004-10-17 03:19:03 UTC
CVS commit by annma: 

fix bug 91287
BUG:91287
CCMAIL=cniehaus@kde.org


  M +6 -6      element.cpp   1.7


--- kdeedu/kalzium/src/element.cpp  #1.6:1.7
@@ -110,13 +110,13 @@ const QString Element::adjustUnits( doub
                                         v.append( "K" );
                                         break;
-                                case 1:// Kelvin to Fahrenheit
-                                        val = val * 1.8 - 459.67;
+                                case 1://Kelvin to Celsius
+                                        val-=273.15;
                                         v = QString::number( val );
-                                        v.append( "F" );
+                                        v.append( "C" );
                                         break;
-                                case 2: //Kelvin to Celsius
-                                        val-=273.15;
+                                case 2: // Kelvin to Fahrenheit
+                                        val = val * 1.8 - 459.67;
                                         v = QString::number( val );
-                                        v.append( "