diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 06:08:18 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 06:08:18 +0000 |
commit | 1d14c95a7737078a695e99442628f450354c00ff (patch) | |
tree | f8a566f01e7edd9974aa10a7af636296cabcb933 /kweather | |
parent | 6537a93fb5bfe88e6a3e418f7445dd1202672f1d (diff) | |
download | tdetoys-1d14c95a7737078a695e99442628f450354c00ff.tar.gz tdetoys-1d14c95a7737078a695e99442628f450354c00ff.zip |
rename the following methods:
tqfind find
tqreplace replace
tqcontains contains
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdetoys@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kweather')
-rw-r--r-- | kweather/metar_parser.cpp | 62 | ||||
-rw-r--r-- | kweather/serviceconfigwidget.cpp | 2 | ||||
-rw-r--r-- | kweather/stationdatabase.cpp | 8 | ||||
-rw-r--r-- | kweather/sun.cpp | 4 | ||||
-rw-r--r-- | kweather/weatherbar.cpp | 4 |
5 files changed, 40 insertions, 40 deletions
diff --git a/kweather/metar_parser.cpp b/kweather/metar_parser.cpp index 5789ff3..2d3eab9 100644 --- a/kweather/metar_parser.cpp +++ b/kweather/metar_parser.cpp @@ -226,78 +226,78 @@ bool MetarParser::parseCurrent(const TQString &s) } // Decode the descriptor - if (sCode.tqcontains("MI")) + if (sCode.contains("MI")) descriptor = i18n("Shallow"); - else if (sCode.tqcontains("PR")) + else if (sCode.contains("PR")) descriptor = i18n("Partial"); - else if (sCode.tqcontains("BC")) + else if (sCode.contains("BC")) descriptor = i18n("Patches"); - else if (sCode.tqcontains("DR")) + else if (sCode.contains("DR")) descriptor = i18n("Low Drifting"); - else if (sCode.tqcontains("BL")) + else if (sCode.contains("BL")) descriptor = i18n("Blowing"); - else if (sCode.tqcontains("SH")) + else if (sCode.contains("SH")) { descriptor = i18n("Showers"); weatherInfo.theWeather = "shower"; } - else if (sCode.tqcontains("TS")) + else if (sCode.contains("TS")) { descriptor = i18n("Thunder Storm"); weatherInfo.theWeather = "tstorm"; } - else if (sCode.tqcontains("FZ")) + else if (sCode.contains("FZ")) { descriptor = i18n("Freezing"); } // Decode weather phenomena - if (sCode.tqcontains("DZ")) + if (sCode.contains("DZ")) { phenomena = i18n("Drizzle"); weatherInfo.theWeather = "light_rain"; } - else if (sCode.tqcontains("RA")) + else if (sCode.contains("RA")) { phenomena = i18n("Rain"); weatherInfo.theWeather = "shower"; } - else if (sCode.tqcontains("SN")) + else if (sCode.contains("SN")) { phenomena = i18n("Snow"); weatherInfo.theWeather = "snow"; } - else if (sCode.tqcontains("SG")) + else if (sCode.contains("SG")) { phenomena = i18n("Snow Grains"); weatherInfo.theWeather = "snow4"; } - else if (sCode.tqcontains("IC")) + else if (sCode.contains("IC")) { phenomena = i18n("Ice Crystals"); weatherInfo.theWeather = "hail"; } - else if (sCode.tqcontains("PE")) + else if (sCode.contains("PE")) { phenomena = i18n("Ice Pellets"); weatherInfo.theWeather = "hail"; } - else if (s.tqcontains("GR")) + else if (s.contains("GR")) { phenomena = i18n("Hail"); weatherInfo.theWeather = "hail"; } - else if (sCode.tqcontains("GS")) + else if (sCode.contains("GS")) { phenomena = i18n("Small Hail Pellets"); weatherInfo.theWeather = "hail"; } - else if (s.tqcontains("UP")) + else if (s.contains("UP")) { phenomena = i18n("Unknown Precipitation"); weatherInfo.theWeather = iconName("shower1"); } - else if (sCode.tqcontains("BR")) + else if (sCode.contains("BR")) { phenomena = i18n("Mist"); // Mist has lower priority than say rain or snow @@ -306,7 +306,7 @@ bool MetarParser::parseCurrent(const TQString &s) weatherInfo.theWeather = "mist"; } } - else if (sCode.tqcontains("FG")) + else if (sCode.contains("FG")) { phenomena = i18n("Fog"); // Fog has lower priority than say rain or snow @@ -315,32 +315,32 @@ bool MetarParser::parseCurrent(const TQString &s) weatherInfo.theWeather = "fog"; } } - else if (sCode.tqcontains("FU")) + else if (sCode.contains("FU")) phenomena = i18n("Smoke"); - else if (sCode.tqcontains("VA")) + else if (sCode.contains("VA")) phenomena = i18n("Volcanic Ash"); - else if (sCode.tqcontains("DU")) + else if (sCode.contains("DU")) phenomena = i18n("Widespread Dust"); - else if (sCode.tqcontains("SA")) + else if (sCode.contains("SA")) phenomena = i18n("Sand"); - else if (sCode.tqcontains("HZ")) + else if (sCode.contains("HZ")) phenomena = i18n("Haze"); - else if (sCode.tqcontains("PY")) + else if (sCode.contains("PY")) phenomena = i18n("Spray"); - else if (sCode.tqcontains("PO")) + else if (sCode.contains("PO")) phenomena = i18n("Dust/Sand Swirls"); - else if (sCode.tqcontains("SQ")) + else if (sCode.contains("SQ")) phenomena = i18n("Sudden Winds"); - else if (sCode.tqcontains("FC")) + else if (sCode.contains("FC")) { if (sIntensity == "+") currentWeather = i18n("Tornado"); else phenomena = i18n("Funnel Cloud"); } - else if (sCode.tqcontains("SS")) + else if (sCode.contains("SS")) phenomena = i18n("Sand Storm"); - else if (sCode.tqcontains("DS")) + else if (sCode.contains("DS")) phenomena = i18n("Dust Storm"); if (currentWeather.isEmpty()) currentWeather = i18n("%1 is the intensity, %2 is the descriptor and %3 is the phenomena", "%1 %2 %3").tqarg(intensity).tqarg(descriptor).tqarg(phenomena); @@ -854,7 +854,7 @@ bool MetarParser::isNight(const TQString &stationID) const // Midnight Sun & Polar Night - In summer, the Sun is always // over the horizon line ... so use latitude & today date to // set isNight() value. - return ((m_date.daysInYear() >= 80 || m_date.daysInYear() <= 264) && latitude.tqcontains("S")); + return ((m_date.daysInYear() >= 80 || m_date.daysInYear() <= 264) && latitude.contains("S")); } } } diff --git a/kweather/serviceconfigwidget.cpp b/kweather/serviceconfigwidget.cpp index 8604f27..52f5e25 100644 --- a/kweather/serviceconfigwidget.cpp +++ b/kweather/serviceconfigwidget.cpp @@ -224,7 +224,7 @@ void parseStationEntry( const TQString &line, TQString &name, TQString &uid ) for ( uint i = 0; i < list.count(); ++i ) { if ( inName ) { if ( list[ i ].endsWith( "\\" ) ) { - name.append( list[ i ].tqreplace( "\\", " " ) ); + name.append( list[ i ].replace( "\\", " " ) ); } else { name.append( list[ i ] ); inName = false; diff --git a/kweather/stationdatabase.cpp b/kweather/stationdatabase.cpp index a30a1f2..0e2caac 100644 --- a/kweather/stationdatabase.cpp +++ b/kweather/stationdatabase.cpp @@ -76,7 +76,7 @@ TQString StationDatabase::stationNameFromID( const TQString & stationID ) { TQString result; - if ( theDB.tqfind( stationID ) == theDB.end() ) + if ( theDB.find( stationID ) == theDB.end() ) { if ( loadStation( stationID ) ) result = theDB[ stationID ].cityName; @@ -98,7 +98,7 @@ TQString StationDatabase::stationLongitudeFromID( const TQString & stationID ) { TQString result; - if ( theDB.tqfind( stationID ) == theDB.end() ) + if ( theDB.find( stationID ) == theDB.end() ) { if ( loadStation( stationID ) ) result = theDB[ stationID ].longitude; @@ -120,7 +120,7 @@ TQString StationDatabase::stationLatitudeFromID( const TQString & stationID ) { TQString result; - if ( theDB.tqfind( stationID ) == theDB.end() ) + if ( theDB.find( stationID ) == theDB.end() ) { if ( loadStation( stationID ) ) result = theDB[ stationID ].latitude; @@ -142,7 +142,7 @@ TQString StationDatabase::stationCountryFromID( const TQString &stationID ) { TQString result; - if ( theDB.tqfind( stationID ) == theDB.end() ) + if ( theDB.find( stationID ) == theDB.end() ) { if ( loadStation( stationID ) ) result = theDB[ stationID ].country; diff --git a/kweather/sun.cpp b/kweather/sun.cpp index 50b89f0..43809cb 100644 --- a/kweather/sun.cpp +++ b/kweather/sun.cpp @@ -176,7 +176,7 @@ static double latitudeToDouble( const TQString &latitude ) result = dd + (mm / 60); - if (latitude.tqcontains("S")) + if (latitude.contains("S")) result *= -1; return result; @@ -192,7 +192,7 @@ static double longitudeToDouble( const TQString &longitude ) result = ddd + (mm / 60); - if (longitude.tqcontains("W")) + if (longitude.contains("W")) result *= -1; return result; diff --git a/kweather/weatherbar.cpp b/kweather/weatherbar.cpp index eb01876..540e912 100644 --- a/kweather/weatherbar.cpp +++ b/kweather/weatherbar.cpp @@ -100,7 +100,7 @@ TQWidget* KonqSidebarWeather::getWidget() void KonqSidebarWeather::refresh(TQString stationID) { kdDebug() << "refresh " << stationID << endl; - if(m_widgets.tqfind(stationID)) + if(m_widgets.find(stationID)) { DCOPRef dcopCall( "KWeatherService", "WeatherService" ); m_widgets[stationID]->setWeatherIcon(dcopCall.call("currentIcon(TQString)", stationID ,true )); @@ -134,7 +134,7 @@ void KonqSidebarWeather::update() TQStringList replyList = reply; for(int i = 0; i < replyList.size(); i++) { - if(!m_widgets.tqfind(replyList[i])) + if(!m_widgets.find(replyList[i])) { dockwidget *d = new dockwidget(m_container->viewport(), replyList[i].latin1()); m_container->addWidget(d, replyList[i].latin1()); |