[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdebase/workspace/plasma/dataengines/weather/ions
From:       Shawn Starr <shawn.starr () rogers ! com>
Date:       2009-08-07 0:57:09
Message-ID: 1249606629.363462.30217.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1008163 by spstarr:

For temperature, we must always set the unit, because we use this for not just current temperature, if \
it's not available, ie in Arctic Bay, NU

 M  +3 -2      ion_envcan.cpp  


--- trunk/KDE/kdebase/workspace/plasma/dataengines/weather/ions/ion_envcan.cpp #1008162:1008163
@@ -1654,12 +1654,10 @@
     QMap<QString, QString> temperatureInfo;
     if (!d->m_weatherData[source].temperature.isEmpty()) {
         temperatureInfo.insert("temperature", \
                QString::number(d->m_weatherData[source].temperature.toFloat(), 'f', 1));
-        temperatureInfo.insert("temperatureUnit", QString::number(WeatherUtils::Celsius));
     }
 
     if (d->m_weatherData[source].temperature == i18n("N/A")) {
         temperatureInfo.insert("temperature", i18n("N/A"));
-        temperatureInfo.insert("temperatureUnit", QString::number(WeatherUtils::NoUnit));
     }
 
     temperatureInfo.insert("comfortTemperature", i18n("N/A"));
@@ -1667,6 +1665,9 @@
     if (d->m_weatherData[source].comforttemp != i18n("N/A")) {
         temperatureInfo.insert("comfortTemperature", d->m_weatherData[source].comforttemp);
     }
+  
+    // This is used for not just current temperature but also 8 days. Cannot be NoUnit.
+    temperatureInfo.insert("temperatureUnit", QString::number(WeatherUtils::Celsius));
     return temperatureInfo;
 }
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic