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
v3.5.13-sru
tpearson 13 years ago
parent 6537a93fb5
commit 1d14c95a77

@ -170,7 +170,7 @@ bool AmorThemeManager::setTheme(const TQString & file)
else else
{ {
// relative to config file. // relative to config file.
mPath.truncate(mPath.tqfindRev('/')+1); mPath.truncate(mPath.findRev('/')+1);
mPath += pixmapPath; mPath += pixmapPath;
} }
@ -195,7 +195,7 @@ AmorAnim *AmorThemeManager::random(const TQString & group)
if (mStatic) if (mStatic)
grp = "Base"; grp = "Base";
AmorAnimationGroup *animGroup = mAnimations.tqfind(grp); AmorAnimationGroup *animGroup = mAnimations.find(grp);
if (animGroup) { if (animGroup) {
int idx = kapp->random()%animGroup->count(); int idx = kapp->random()%animGroup->count();

@ -56,7 +56,7 @@ AmorPixmapManager::~AmorPixmapManager()
// //
const TQPixmap *AmorPixmapManager::load(const TQString & img) const TQPixmap *AmorPixmapManager::load(const TQString & img)
{ {
TQPixmap *pixmap = mPixmaps.tqfind(img); TQPixmap *pixmap = mPixmaps.find(img);
if (!pixmap) if (!pixmap)
{ {

@ -50,7 +50,7 @@ public:
{ mPixmapDir = "."; mPixmaps.clear(); } { mPixmapDir = "."; mPixmaps.clear(); }
const TQPixmap *load(const TQString & img); const TQPixmap *load(const TQString & img);
const TQPixmap *pixmap(const TQString & img) const const TQPixmap *pixmap(const TQString & img) const
{ return mPixmaps.tqfind(img); } { return mPixmaps.find(img); }
static AmorPixmapManager *manager(); static AmorPixmapManager *manager();

@ -103,11 +103,11 @@ bool AmorTips::readKTips()
const TQRegExp rx("\\n+"); const TQRegExp rx("\\n+");
int pos = -1; int pos = -1;
while ((pos = content.tqfind("<html>", pos + 1, false)) != -1) while ((pos = content.find("<html>", pos + 1, false)) != -1)
{ {
TQString tip = content TQString tip = content
.mid(pos + 6, content.tqfind("</html>", pos, false) - pos - 6) .mid(pos + 6, content.find("</html>", pos, false) - pos - 6)
.tqreplace(rx, "\n"); .replace(rx, "\n");
if (!tip.endsWith("\n")) if (!tip.endsWith("\n"))
tip += "\n"; tip += "\n";
if (tip.startsWith("\n")) if (tip.startsWith("\n"))

@ -235,7 +235,7 @@ void PiecesTable::mousePressEvent(TQMouseEvent* e)
// GAME LOGIC // GAME LOGIC
// find the free position // find the free position
int pos = _map.tqfind(15); int pos = _map.find(15);
if(pos < 0) return; if(pos < 0) return;
int frow = pos / numCols(); int frow = pos / numCols();

@ -1280,7 +1280,7 @@ void QtTableView::paintEvent( TQPaintEvent *e )
TQPainter paint( this ); TQPainter paint( this );
if ( !contentsRect().tqcontains( updateR, TRUE ) ) {// update frame ? if ( !contentsRect().contains( updateR, TRUE ) ) {// update frame ?
drawFrame( &paint ); drawFrame( &paint );
if ( updateR.left() < frameWidth() ) //### if ( updateR.left() < frameWidth() ) //###
updateR.setLeft( frameWidth() ); updateR.setLeft( frameWidth() );
@ -1343,7 +1343,7 @@ void QtTableView::paintEvent( TQPaintEvent *e )
matrix.translate( xPos, yPos ); matrix.translate( xPos, yPos );
paint.setWorldMatrix( matrix ); paint.setWorldMatrix( matrix );
if ( testTableFlags(Tbl_clipCellPainting) || if ( testTableFlags(Tbl_clipCellPainting) ||
frameWidth() > 0 && !winR.tqcontains( cellR ) ) { //##arnt frameWidth() > 0 && !winR.contains( cellR ) ) { //##arnt
paint.setClipRect( cellUR ); paint.setClipRect( cellUR );
paintCell( &paint, row, col ); paintCell( &paint, row, col );
paint.setClipping( FALSE ); paint.setClipping( FALSE );
@ -1355,7 +1355,7 @@ void QtTableView::paintEvent( TQPaintEvent *e )
#else #else
paint.translate( xPos, yPos ); paint.translate( xPos, yPos );
if ( testTableFlags(Tbl_clipCellPainting) || if ( testTableFlags(Tbl_clipCellPainting) ||
frameWidth() > 0 && !winR.tqcontains( cellR ) ) { //##arnt frameWidth() > 0 && !winR.contains( cellR ) ) { //##arnt
paint.setClipRect( cellUR ); paint.setClipRect( cellUR );
paintCell( &paint, row, col ); paintCell( &paint, row, col );
paint.setClipping( FALSE ); paint.setClipping( FALSE );

@ -227,7 +227,7 @@ TQImage MoonWidget::loadMoon(int index)
TQString filename = TQString("kmoon/pics/moon%1.png").tqarg(index); TQString filename = TQString("kmoon/pics/moon%1.png").tqarg(index);
TQString path = locate("data", filename); TQString path = locate("data", filename);
if (path.isNull()) if (path.isNull())
kdFatal() << "cound't tqfind " << filename << ". Exiting.\n"; kdFatal() << "cound't find " << filename << ". Exiting.\n";
TQImage image(path); TQImage image(path);
KIconEffect iconeffect; KIconEffect iconeffect;
image=iconeffect.apply(image, KIcon::Panel, KIcon::DefaultState); image=iconeffect.apply(image, KIcon::Panel, KIcon::DefaultState);

@ -121,7 +121,7 @@ Kodometer::Kodometer(TQWidget* tqparent, const char* name)
} }
/* /*
* Now I'm not really sure what this does. I assume its here to tqfind * Now I'm not really sure what this does. I assume its here to find
* all the displays on your system, and measure them. During the mouse * all the displays on your system, and measure them. During the mouse
* tracking phase, we use the information stored here to determine how * tracking phase, we use the information stored here to determine how
* far the mouse moved on a given screen. * far the mouse moved on a given screen.

@ -309,7 +309,7 @@ void TopLevel::timerEvent(TQTimerEvent *)
} }
if (useAction && (!action.isEmpty())) { if (useAction && (!action.isEmpty())) {
TQString cmd = action; TQString cmd = action;
cmd.tqreplace("%t", current_name); cmd.replace("%t", current_name);
system(TQFile::encodeName(cmd)); system(TQFile::encodeName(cmd));
} }
if (usePopup) if (usePopup)

@ -44,7 +44,7 @@ void SpriteObject::setBounds( int x1, int y1, int x2, int y2 )
bool SpriteObject::outOfBounds() const bool SpriteObject::outOfBounds() const
{ {
bool in = mBound.tqcontains( static_cast<int>(x()), static_cast<int>(y()) ); bool in = mBound.contains( static_cast<int>(x()), static_cast<int>(y()) );
return !in; return !in;
} }

@ -29,7 +29,7 @@ int SpriteRange::random() const
void SpriteRange::set(const TQString &str) void SpriteRange::set(const TQString &str)
{ {
int r = str.tqfind(".."); int r = str.find("..");
if (r > 0) if (r > 0)
{ {

@ -39,7 +39,7 @@ SpritePixmapManager::~SpritePixmapManager()
// //
const TQPixmap *SpritePixmapManager::load(const TQString & img) const TQPixmap *SpritePixmapManager::load(const TQString & img)
{ {
TQPixmap *pixmap = mPixmaps.tqfind(img); TQPixmap *pixmap = mPixmaps.find(img);
if (!pixmap) if (!pixmap)
{ {
@ -115,7 +115,7 @@ SpriteSequenceManager::~SpriteSequenceManager()
SpritePixmapSequence *SpriteSequenceManager::load(KConfigBase &config, SpritePixmapSequence *SpriteSequenceManager::load(KConfigBase &config,
const TQString & name) const TQString & name)
{ {
SpritePixmapSequence *sprite = mSprites.tqfind(name); SpritePixmapSequence *sprite = mSprites.find(name);
if (!sprite) if (!sprite)
{ {

@ -34,7 +34,7 @@ public:
{ mPixmapDir = "."; mPixmaps.clear(); } { mPixmapDir = "."; mPixmaps.clear(); }
const TQPixmap *load(const TQString & img); const TQPixmap *load(const TQString & img);
const TQPixmap *pixmap(const char *img) const const TQPixmap *pixmap(const char *img) const
{ return mPixmaps.tqfind(img); } { return mPixmaps.find(img); }
static SpritePixmapManager *manager(); static SpritePixmapManager *manager();
@ -69,7 +69,7 @@ public:
SpritePixmapSequence *load(KConfigBase &config, const TQString & name); SpritePixmapSequence *load(KConfigBase &config, const TQString & name);
SpritePixmapSequence *sprite(const char *name) SpritePixmapSequence *sprite(const char *name)
{ return mSprites.tqfind(name); } { return mSprites.find(name); }
static SpriteSequenceManager *manager(); static SpriteSequenceManager *manager();

@ -226,78 +226,78 @@ bool MetarParser::parseCurrent(const TQString &s)
} }
// Decode the descriptor // Decode the descriptor
if (sCode.tqcontains("MI")) if (sCode.contains("MI"))
descriptor = i18n("Shallow"); descriptor = i18n("Shallow");
else if (sCode.tqcontains("PR")) else if (sCode.contains("PR"))
descriptor = i18n("Partial"); descriptor = i18n("Partial");
else if (sCode.tqcontains("BC")) else if (sCode.contains("BC"))
descriptor = i18n("Patches"); descriptor = i18n("Patches");
else if (sCode.tqcontains("DR")) else if (sCode.contains("DR"))
descriptor = i18n("Low Drifting"); descriptor = i18n("Low Drifting");
else if (sCode.tqcontains("BL")) else if (sCode.contains("BL"))
descriptor = i18n("Blowing"); descriptor = i18n("Blowing");
else if (sCode.tqcontains("SH")) else if (sCode.contains("SH"))
{ {
descriptor = i18n("Showers"); descriptor = i18n("Showers");
weatherInfo.theWeather = "shower"; weatherInfo.theWeather = "shower";
} }
else if (sCode.tqcontains("TS")) else if (sCode.contains("TS"))
{ {
descriptor = i18n("Thunder Storm"); descriptor = i18n("Thunder Storm");
weatherInfo.theWeather = "tstorm"; weatherInfo.theWeather = "tstorm";
} }
else if (sCode.tqcontains("FZ")) else if (sCode.contains("FZ"))
{ {
descriptor = i18n("Freezing"); descriptor = i18n("Freezing");
} }
// Decode weather phenomena // Decode weather phenomena
if (sCode.tqcontains("DZ")) if (sCode.contains("DZ"))
{ {
phenomena = i18n("Drizzle"); phenomena = i18n("Drizzle");
weatherInfo.theWeather = "light_rain"; weatherInfo.theWeather = "light_rain";
} }
else if (sCode.tqcontains("RA")) else if (sCode.contains("RA"))
{ {
phenomena = i18n("Rain"); phenomena = i18n("Rain");
weatherInfo.theWeather = "shower"; weatherInfo.theWeather = "shower";
} }
else if (sCode.tqcontains("SN")) else if (sCode.contains("SN"))
{ {
phenomena = i18n("Snow"); phenomena = i18n("Snow");
weatherInfo.theWeather = "snow"; weatherInfo.theWeather = "snow";
} }
else if (sCode.tqcontains("SG")) else if (sCode.contains("SG"))
{ {
phenomena = i18n("Snow Grains"); phenomena = i18n("Snow Grains");
weatherInfo.theWeather = "snow4"; weatherInfo.theWeather = "snow4";
} }
else if (sCode.tqcontains("IC")) else if (sCode.contains("IC"))
{ {
phenomena = i18n("Ice Crystals"); phenomena = i18n("Ice Crystals");
weatherInfo.theWeather = "hail"; weatherInfo.theWeather = "hail";
} }
else if (sCode.tqcontains("PE")) else if (sCode.contains("PE"))
{ {
phenomena = i18n("Ice Pellets"); phenomena = i18n("Ice Pellets");
weatherInfo.theWeather = "hail"; weatherInfo.theWeather = "hail";
} }
else if (s.tqcontains("GR")) else if (s.contains("GR"))
{ {
phenomena = i18n("Hail"); phenomena = i18n("Hail");
weatherInfo.theWeather = "hail"; weatherInfo.theWeather = "hail";
} }
else if (sCode.tqcontains("GS")) else if (sCode.contains("GS"))
{ {
phenomena = i18n("Small Hail Pellets"); phenomena = i18n("Small Hail Pellets");
weatherInfo.theWeather = "hail"; weatherInfo.theWeather = "hail";
} }
else if (s.tqcontains("UP")) else if (s.contains("UP"))
{ {
phenomena = i18n("Unknown Precipitation"); phenomena = i18n("Unknown Precipitation");
weatherInfo.theWeather = iconName("shower1"); weatherInfo.theWeather = iconName("shower1");
} }
else if (sCode.tqcontains("BR")) else if (sCode.contains("BR"))
{ {
phenomena = i18n("Mist"); phenomena = i18n("Mist");
// Mist has lower priority than say rain or snow // Mist has lower priority than say rain or snow
@ -306,7 +306,7 @@ bool MetarParser::parseCurrent(const TQString &s)
weatherInfo.theWeather = "mist"; weatherInfo.theWeather = "mist";
} }
} }
else if (sCode.tqcontains("FG")) else if (sCode.contains("FG"))
{ {
phenomena = i18n("Fog"); phenomena = i18n("Fog");
// Fog has lower priority than say rain or snow // Fog has lower priority than say rain or snow
@ -315,32 +315,32 @@ bool MetarParser::parseCurrent(const TQString &s)
weatherInfo.theWeather = "fog"; weatherInfo.theWeather = "fog";
} }
} }
else if (sCode.tqcontains("FU")) else if (sCode.contains("FU"))
phenomena = i18n("Smoke"); phenomena = i18n("Smoke");
else if (sCode.tqcontains("VA")) else if (sCode.contains("VA"))
phenomena = i18n("Volcanic Ash"); phenomena = i18n("Volcanic Ash");
else if (sCode.tqcontains("DU")) else if (sCode.contains("DU"))
phenomena = i18n("Widespread Dust"); phenomena = i18n("Widespread Dust");
else if (sCode.tqcontains("SA")) else if (sCode.contains("SA"))
phenomena = i18n("Sand"); phenomena = i18n("Sand");
else if (sCode.tqcontains("HZ")) else if (sCode.contains("HZ"))
phenomena = i18n("Haze"); phenomena = i18n("Haze");
else if (sCode.tqcontains("PY")) else if (sCode.contains("PY"))
phenomena = i18n("Spray"); phenomena = i18n("Spray");
else if (sCode.tqcontains("PO")) else if (sCode.contains("PO"))
phenomena = i18n("Dust/Sand Swirls"); phenomena = i18n("Dust/Sand Swirls");
else if (sCode.tqcontains("SQ")) else if (sCode.contains("SQ"))
phenomena = i18n("Sudden Winds"); phenomena = i18n("Sudden Winds");
else if (sCode.tqcontains("FC")) else if (sCode.contains("FC"))
{ {
if (sIntensity == "+") if (sIntensity == "+")
currentWeather = i18n("Tornado"); currentWeather = i18n("Tornado");
else else
phenomena = i18n("Funnel Cloud"); phenomena = i18n("Funnel Cloud");
} }
else if (sCode.tqcontains("SS")) else if (sCode.contains("SS"))
phenomena = i18n("Sand Storm"); phenomena = i18n("Sand Storm");
else if (sCode.tqcontains("DS")) else if (sCode.contains("DS"))
phenomena = i18n("Dust Storm"); 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); 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 // Midnight Sun & Polar Night - In summer, the Sun is always
// over the horizon line ... so use latitude & today date to // over the horizon line ... so use latitude & today date to
// set isNight() value. // 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"));
} }
} }
} }

@ -224,7 +224,7 @@ void parseStationEntry( const TQString &line, TQString &name, TQString &uid )
for ( uint i = 0; i < list.count(); ++i ) { for ( uint i = 0; i < list.count(); ++i ) {
if ( inName ) { if ( inName ) {
if ( list[ i ].endsWith( "\\" ) ) { if ( list[ i ].endsWith( "\\" ) ) {
name.append( list[ i ].tqreplace( "\\", " " ) ); name.append( list[ i ].replace( "\\", " " ) );
} else { } else {
name.append( list[ i ] ); name.append( list[ i ] );
inName = false; inName = false;

@ -76,7 +76,7 @@ TQString StationDatabase::stationNameFromID( const TQString & stationID )
{ {
TQString result; TQString result;
if ( theDB.tqfind( stationID ) == theDB.end() ) if ( theDB.find( stationID ) == theDB.end() )
{ {
if ( loadStation( stationID ) ) if ( loadStation( stationID ) )
result = theDB[ stationID ].cityName; result = theDB[ stationID ].cityName;
@ -98,7 +98,7 @@ TQString StationDatabase::stationLongitudeFromID( const TQString & stationID )
{ {
TQString result; TQString result;
if ( theDB.tqfind( stationID ) == theDB.end() ) if ( theDB.find( stationID ) == theDB.end() )
{ {
if ( loadStation( stationID ) ) if ( loadStation( stationID ) )
result = theDB[ stationID ].longitude; result = theDB[ stationID ].longitude;
@ -120,7 +120,7 @@ TQString StationDatabase::stationLatitudeFromID( const TQString & stationID )
{ {
TQString result; TQString result;
if ( theDB.tqfind( stationID ) == theDB.end() ) if ( theDB.find( stationID ) == theDB.end() )
{ {
if ( loadStation( stationID ) ) if ( loadStation( stationID ) )
result = theDB[ stationID ].latitude; result = theDB[ stationID ].latitude;
@ -142,7 +142,7 @@ TQString StationDatabase::stationCountryFromID( const TQString &stationID )
{ {
TQString result; TQString result;
if ( theDB.tqfind( stationID ) == theDB.end() ) if ( theDB.find( stationID ) == theDB.end() )
{ {
if ( loadStation( stationID ) ) if ( loadStation( stationID ) )
result = theDB[ stationID ].country; result = theDB[ stationID ].country;

@ -176,7 +176,7 @@ static double latitudeToDouble( const TQString &latitude )
result = dd + (mm / 60); result = dd + (mm / 60);
if (latitude.tqcontains("S")) if (latitude.contains("S"))
result *= -1; result *= -1;
return result; return result;
@ -192,7 +192,7 @@ static double longitudeToDouble( const TQString &longitude )
result = ddd + (mm / 60); result = ddd + (mm / 60);
if (longitude.tqcontains("W")) if (longitude.contains("W"))
result *= -1; result *= -1;
return result; return result;

@ -100,7 +100,7 @@ TQWidget* KonqSidebarWeather::getWidget()
void KonqSidebarWeather::refresh(TQString stationID) void KonqSidebarWeather::refresh(TQString stationID)
{ {
kdDebug() << "refresh " << stationID << endl; kdDebug() << "refresh " << stationID << endl;
if(m_widgets.tqfind(stationID)) if(m_widgets.find(stationID))
{ {
DCOPRef dcopCall( "KWeatherService", "WeatherService" ); DCOPRef dcopCall( "KWeatherService", "WeatherService" );
m_widgets[stationID]->setWeatherIcon(dcopCall.call("currentIcon(TQString)", stationID ,true )); m_widgets[stationID]->setWeatherIcon(dcopCall.call("currentIcon(TQString)", stationID ,true ));
@ -134,7 +134,7 @@ void KonqSidebarWeather::update()
TQStringList replyList = reply; TQStringList replyList = reply;
for(int i = 0; i < replyList.size(); i++) 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()); dockwidget *d = new dockwidget(m_container->viewport(), replyList[i].latin1());
m_container->addWidget(d, replyList[i].latin1()); m_container->addWidget(d, replyList[i].latin1());

@ -128,9 +128,9 @@ void CityList::readCityList(const TQString &fname)
if (!c.isEmpty() && !n.isEmpty()) if (!c.isEmpty() && !n.isEmpty())
{ {
double la, lo; double la, lo;
pos = c.tqfind("+", 1); pos = c.find("+", 1);
if (pos < 0) if (pos < 0)
pos = c.tqfind("-", 1); pos = c.find("-", 1);
if (pos > 0) if (pos > 0)
{ {
la = coordinate(c.left(pos)); la = coordinate(c.left(pos));

@ -75,10 +75,10 @@ void MapLoader::load(unsigned int width, const TQString &theme, unsigned int hei
for (uint i=0; i<files.count(); ++i) for (uint i=0; i<files.count(); ++i)
{ {
TQString f = files[i]; TQString f = files[i];
int pos = f.tqfindRev("/"); int pos = f.findRev("/");
if (pos >= 0) if (pos >= 0)
f = f.mid(pos+1); f = f.mid(pos+1);
pos = f.tqfindRev("."); pos = f.findRev(".");
if (pos >= 0) if (pos >= 0)
f = f.left(pos); f = f.left(pos);
sizes.append(f.toInt()); sizes.append(f.toInt());

@ -353,10 +353,10 @@ void MapWidget::timeout()
TQString MapWidget::cityTime(const TQString &city) TQString MapWidget::cityTime(const TQString &city)
{ {
TQString result = i18n(city.latin1()); // Time zone translation TQString result = i18n(city.latin1()); // Time zone translation
int pos = result.tqfind("/"); int pos = result.find("/");
if (pos >= 0) if (pos >= 0)
result = result.mid(pos+1); result = result.mid(pos+1);
result.tqreplace(TQRegExp("_"), " "); result.replace(TQRegExp("_"), " ");
result.append(": "); result.append(": ");
char *initial_TZ = getenv("TZ"); char *initial_TZ = getenv("TZ");

Loading…
Cancel
Save