Bug 56524 - Always reports a Sandstorm in Sydney (YSSY) - probably other funnies elsewhere
Summary: Always reports a Sandstorm in Sydney (YSSY) - probably other funnies elsewhere
Status: RESOLVED FIXED
Alias: None
Product: kweather-kde3
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Mandrake RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: geiseri
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-03-28 02:53 UTC by Cris
Modified: 2003-06-04 19:39 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
bugfix patch (534 bytes, patch)
2003-04-25 09:17 UTC, Christian Loose
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Cris 2003-03-28 02:53:23 UTC
Version:           2.0.1 (using 3.0.5a) (using KDE KDE 3.0.5)
Installed from:    Mandrake RPMs
Compiler:          gcc 3.2 I think - mandrake supplied binaries in mdk9.0
OS:          Linux

Using kweather for my local weather station (Sydney, Airport), kweather always reports a sandstorm in progress.From a quick browse of CVSweb, I'd say that it's matching the code for sandstorm (SS) in the icao code for my station (YSSY), as the complete report text includes the station name at the beginning ("YSSY blah blah blah CODES CODES blah").Funnily enough, I haven't used kweather for a while, and the last time I did, we were actually having a sandstorm, so I never noticed this bug. (Although I did notice that kweather thought it lasted a bit longer than it really did!)I imagine other weather codes could be found in other icao station codes, so there could well be a few places reported as having strange things falling out of the sky...(I couldn't see any bug reports or suggestions in CVS that this had been reported/fixed, so apologies if this is done in KDE 3.1 or CVS...)Cris
Comment 1 Cris 2003-03-28 02:58:01 UTC
Theory confirmed - I found that ESSL (Linkoping-saab, in Sweden) which is having a misty winters day, is also having a sandstom.  Cheers. 
Comment 2 Christian Loose 2003-04-25 09:17:46 UTC
Created attachment 1432 [details]
bugfix patch

I could reproduce the bug when the icao code was in lowercase or had additional
white spaces. The existing check in WeatherLib::processData() to not parse the
icao location didn't work anymore. The attached patch should fix this.

Christian Loose
Comment 3 geiseri 2003-06-04 19:39:20 UTC
Subject: kdetoys/kweather

CVS commit by geiseri: 

Applied patch from Christian Loose.  This should fix bug #56524.
Thanks Christian, I love one liners :)

Nadeem, are you still running 3.1 that you can backport this?  Otherwise I will.

CCMAIL: christian.loose@hamburg.de
CCMAIL: 56524-done@bugs.kde.org
CCMAIL: Nadeem Hasan <nhasan@nadmm.com>


  M +1 -1      weatherlib.cpp   1.59


--- kdetoys/kweather/weatherlib.cpp  #1.58:1.59
@@ -723,5 +723,5 @@ void WeatherLib::processData(QString met
 
                 // Don't try to parse the ICAO location code
-                if ((!found) && (*it == d->reportLocation))
+                if ((!found) && (*it == d->reportLocation.upper().stripWhiteSpace()))
                 {
                         found = true;