summaryrefslogtreecommitdiffstats
path: root/kweather
diff options
context:
space:
mode:
Diffstat (limited to 'kweather')
-rw-r--r--kweather/weather_icon.cpp21
1 files changed, 14 insertions, 7 deletions
diff --git a/kweather/weather_icon.cpp b/kweather/weather_icon.cpp
index 6e2f164..6ea3287 100644
--- a/kweather/weather_icon.cpp
+++ b/kweather/weather_icon.cpp
@@ -20,9 +20,11 @@ WeatherIcon::WeatherIcon( int condition, bool night )
case Fog:
{
name = "weather-fog";
- if( night && iconExists( TQString(name.latin1()).append("-night")) )
+ if( night )
{
- name.append("-night");
+ TQString night_icon = name + "-night";
+ if( iconExists(night_icon) )
+ name = night_icon;
}
iconName = name;
return;
@@ -31,9 +33,11 @@ WeatherIcon::WeatherIcon( int condition, bool night )
case Mist:
{
name = "weather-mist";
- if( night && iconExists( TQString(name.latin1()).append("-night")) )
+ if( night )
{
- name.append("-night");
+ TQString night_icon = name + "-night";
+ if( iconExists(night_icon) )
+ name = night_icon;
}
iconName = name;
return;
@@ -111,7 +115,8 @@ WeatherIcon::WeatherIcon( int condition, bool night, unsigned int strength )
case 2:
{
name = "weather-snow-moderate";
- if (! iconExists( TQString(name.latin1()).append("-day")) )
+ TQString test_icon = name + "-day";
+ if (! iconExists(test_icon) )
{
name = "weather-snow-scattered";
}
@@ -120,7 +125,8 @@ WeatherIcon::WeatherIcon( int condition, bool night, unsigned int strength )
case 3:
{
name = "weather-snow-ample";
- if ( iconExists( TQString(name.latin1()).append("-day") ) )
+ TQString test_icon = name + "-day";
+ if ( iconExists(test_icon) )
break;
}
case 4: { iconName = "weather-snow-scattered"; return; }
@@ -139,7 +145,8 @@ WeatherIcon::WeatherIcon( int condition, bool night, unsigned int strength )
case 2:
{
name = "weather-storm-moderate";
- if (! iconExists( TQString(name.latin1()).append("-day")) )
+ TQString test_icon = name + "-day";
+ if (! iconExists(test_icon) )
{
name = "weather-storm";
}