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

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

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

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

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

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

@ -227,7 +227,7 @@ TQImage MoonWidget::loadMoon(int index)
TQString filename = TQString("kmoon/pics/moon%1.png").tqarg(index);
TQString path = locate("data", filename);
if (path.isNull())
kdFatal() << "cound't tqfind " << filename << ". Exiting.\n";
kdFatal() << "cound't find " << filename << ". Exiting.\n";
TQImage image(path);
KIconEffect iconeffect;
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
* tracking phase, we use the information stored here to determine how
* far the mouse moved on a given screen.

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

@ -44,7 +44,7 @@ void SpriteObject::setBounds( int x1, int y1, int x2, int y2 )
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;
}

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

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

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

@ -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"));
}
}
}

@ -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;

@ -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;

@ -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;

@ -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());

@ -128,9 +128,9 @@ void CityList::readCityList(const TQString &fname)
if (!c.isEmpty() && !n.isEmpty())
{
double la, lo;
pos = c.tqfind("+", 1);
pos = c.find("+", 1);
if (pos < 0)
pos = c.tqfind("-", 1);
pos = c.find("-", 1);
if (pos > 0)
{
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)
{
TQString f = files[i];
int pos = f.tqfindRev("/");
int pos = f.findRev("/");
if (pos >= 0)
f = f.mid(pos+1);
pos = f.tqfindRev(".");
pos = f.findRev(".");
if (pos >= 0)
f = f.left(pos);
sizes.append(f.toInt());

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

Loading…
Cancel
Save