From 24c5cdc2737fe0044b11a12359606973eb93fc0b Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 10 Aug 2011 06:08:18 +0000 Subject: rename the following methods: tqfind find tqreplace replace tqcontains contains git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegames@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- libkdegames/highscore/kexthighscore.h | 2 +- libkdegames/highscore/kexthighscore_internal.cpp | 2 +- libkdegames/highscore/kexthighscore_item.cpp | 4 ++-- libkdegames/kcarddialog.cpp | 2 +- libkdegames/kchatbase.cpp | 8 ++++---- libkdegames/kgame/dialogs/kgamedebugdialog.h | 2 +- libkdegames/kgame/dialogs/kgamedialogconfig.cpp | 2 +- libkdegames/kgame/kgame.cpp | 10 +++++----- libkdegames/kgame/kgamechat.cpp | 2 +- libkdegames/kgame/kgamenetwork.h | 2 +- libkdegames/kgame/kgameproperty.h | 6 +++--- libkdegames/kgame/kgamepropertyhandler.cpp | 16 ++++++++-------- libkdegames/kgame/kgamepropertyhandler.h | 2 +- libkdegames/kgame/kgamepropertylist.h | 2 +- libkdegames/kgame/kmessageclient.cpp | 4 ++-- libkdegames/kgame/kplayer.cpp | 2 +- libkdegames/kgame/kplayer.h | 2 +- libkdegames/kgameprogress.cpp | 6 +++--- libkdegames/kgrid2d.h | 6 +++--- 19 files changed, 41 insertions(+), 41 deletions(-) (limited to 'libkdegames') diff --git a/libkdegames/highscore/kexthighscore.h b/libkdegames/highscore/kexthighscore.h index 575ab592..7f16eac6 100644 --- a/libkdegames/highscore/kexthighscore.h +++ b/libkdegames/highscore/kexthighscore.h @@ -111,7 +111,7 @@ KDE_EXPORT Score firstScore(); * You can replace the score item (for e.g. displaying it differently) with * setScoreItem or add an item with addScoreItem. * - * The players list tqcontains : + * The players list contains : * * I repeat: we do not recommend the third option ("a mixture"). Unless - * you have a good reason for this you will probably introduce some hard to tqfind + * you have a good reason for this you will probably introduce some hard to find * (and to fix) bugs. * * @section Always consistent (clean): @@ -488,7 +488,7 @@ private: * which result in inconsistent properties (like "game running" on client A but * "game ended/paused" on client B). But note that there is a very good reason * for the existence of these different concepts of KGameProperty. I have - * myself experienced such a "strange error" and it took me several days to tqfind + * myself experienced such a "strange error" and it took me several days to find * the reason until I could fix it. So I personally recommend the "clean" way. * On the other hand if you want to port a non-network game to a network game * you will probably start with "dirty" properties as it is you will not have to diff --git a/libkdegames/kgame/kgamepropertyhandler.cpp b/libkdegames/kgame/kgamepropertyhandler.cpp index 32e831d8..26588de3 100644 --- a/libkdegames/kgame/kgamepropertyhandler.cpp +++ b/libkdegames/kgame/kgamepropertyhandler.cpp @@ -117,7 +117,7 @@ bool KGamePropertyHandler::processMessage(TQDataStream &stream, int id, bool isS int cmd; KGameMessage::extractPropertyCommand(stream, propertyId, cmd); //kdDebug(11001) << k_funcinfo << ": Got COMMAND for id= "<mIdDict.tqfind(propertyId); + p = d->mIdDict.find(propertyId); if (p) { if (!isSender || p->policy()==KGamePropertyBase::PolicyClean) { p->command(stream, cmd, isSender); @@ -127,7 +127,7 @@ bool KGamePropertyHandler::processMessage(TQDataStream &stream, int id, bool isS } return true; } - p = d->mIdDict.tqfind(propertyId); + p = d->mIdDict.find(propertyId); if (p) { //kdDebug(11001) << k_funcinfo << ": Loading " << propertyId << endl; if (!isSender || p->policy()==KGamePropertyBase::PolicyClean) { @@ -151,7 +151,7 @@ bool KGamePropertyHandler::removeProperty(KGamePropertyBase* data) bool KGamePropertyHandler::addProperty(KGamePropertyBase* data, TQString name) { //kdDebug(11001) << k_funcinfo << ": " << data->id() << endl; - if (d->mIdDict.tqfind(data->id())) { + if (d->mIdDict.find(data->id())) { // this id already exists kdError(11001) << " -> cannot add property " << data->id() << endl; return false; @@ -172,8 +172,8 @@ bool KGamePropertyHandler::addProperty(KGamePropertyBase* data, TQString name) TQString KGamePropertyHandler::propertyName(int id) const { TQString s; - if (d->mIdDict.tqfind(id)) { - if (d->mNameMap.tqcontains(id)) { + if (d->mIdDict.find(id)) { + if (d->mNameMap.contains(id)) { s = i18n("%1 (%2)").tqarg(d->mNameMap[id]).tqarg(id); } else { s = i18n("Unnamed - ID: %1").tqarg(id); @@ -326,9 +326,9 @@ bool KGamePropertyHandler::sendProperty(TQDataStream &s) return sent; } -KGamePropertyBase *KGamePropertyHandler::tqfind(int id) +KGamePropertyBase *KGamePropertyHandler::find(int id) { - return d->mIdDict.tqfind(id); + return d->mIdDict.find(id); } void KGamePropertyHandler::clear() @@ -338,7 +338,7 @@ void KGamePropertyHandler::clear() while (it.toFirst()) { KGamePropertyBase* p = it.toFirst(); p->unregisterData(); - if (d->mIdDict.tqfind(p->id())) { + if (d->mIdDict.find(p->id())) { // shouldn't happen - but if mOwner in KGamePropertyBase is NULL // this might be possible removeProperty(p); diff --git a/libkdegames/kgame/kgamepropertyhandler.h b/libkdegames/kgame/kgamepropertyhandler.h index 7388b510..df9a66cb 100644 --- a/libkdegames/kgame/kgamepropertyhandler.h +++ b/libkdegames/kgame/kgamepropertyhandler.h @@ -195,7 +195,7 @@ public: * @param id The ID of the property. See KGamePropertyBase::id * @return The KGameProperty this ID is assigned to **/ - KGamePropertyBase *tqfind(int id); + KGamePropertyBase *find(int id); /** * Clear the KGamePropertyHandler. Note that the properties are diff --git a/libkdegames/kgame/kgamepropertylist.h b/libkdegames/kgame/kgamepropertylist.h index af380b0a..df8eb604 100644 --- a/libkdegames/kgame/kgamepropertylist.h +++ b/libkdegames/kgame/kgamepropertylist.h @@ -139,7 +139,7 @@ public: void remove( const type& d ) { - Iterator it=tqfind(d); + Iterator it=find(d); remove(it); } diff --git a/libkdegames/kgame/kmessageclient.cpp b/libkdegames/kgame/kmessageclient.cpp index 03a39df9..3fa330ba 100644 --- a/libkdegames/kgame/kmessageclient.cpp +++ b/libkdegames/kgame/kmessageclient.cpp @@ -265,7 +265,7 @@ void KMessageClient::processMessage (const TQByteArray &msg) TQ_UINT32 id; in_stream >> id; - if (d->clientList.tqcontains (id)) + if (d->clientList.contains (id)) kdWarning (11001) << k_funcinfo << ": Adding a client that already existed!" << endl; else d->clientList.append (id); @@ -280,7 +280,7 @@ void KMessageClient::processMessage (const TQByteArray &msg) TQ_INT8 broken; in_stream >> id >> broken; - if (!d->clientList.tqcontains (id)) + if (!d->clientList.contains (id)) kdWarning (11001) << k_funcinfo << ": Removing a client that doesn't exist!" << endl; else d->clientList.remove (id); diff --git a/libkdegames/kgame/kplayer.cpp b/libkdegames/kgame/kplayer.cpp index adc893ff..965f5e83 100644 --- a/libkdegames/kgame/kplayer.cpp +++ b/libkdegames/kgame/kplayer.cpp @@ -388,7 +388,7 @@ void KPlayer::networkTransmission(TQDataStream &stream,int msgid,TQ_UINT32 sende KGamePropertyBase* KPlayer::findProperty(int id) const { - return d->mProperties.tqfind(id); + return d->mProperties.find(id); } bool KPlayer::addProperty(KGamePropertyBase* data) diff --git a/libkdegames/kgame/kplayer.h b/libkdegames/kgame/kplayer.h index 7ad23abc..910781f3 100644 --- a/libkdegames/kgame/kplayer.h +++ b/libkdegames/kgame/kplayer.h @@ -58,7 +58,7 @@ class KPlayerPrivate; * you gain a *very* big advantage: you can exchange a KGameIO whenever you * want! You can e.g. remove the KGameIO of a local (human) player and just * replace it by a computerIO on the fly! So from that point on all playerInputs - * are done by the computerIO instead of the human player. You also can tqreplace + * are done by the computerIO instead of the human player. You also can replace * all network players by computer players when the network connection is broken * or a player wants to quit. * So remember: use KGameIO whenever possible! A KPlayer should just diff --git a/libkdegames/kgameprogress.cpp b/libkdegames/kgameprogress.cpp index 7ed1728f..b814b48f 100644 --- a/libkdegames/kgameprogress.cpp +++ b/libkdegames/kgameprogress.cpp @@ -242,9 +242,9 @@ void KGameProgress::drawText(TQPainter *p) // the current value and the maximum value respectively. TQString s(format_); - s.tqreplace(TQRegExp(TQString::tqfromLatin1("%p")), TQString::number(recalcValue(100))); - s.tqreplace(TQRegExp(TQString::tqfromLatin1("%v")), TQString::number(value())); - s.tqreplace(TQRegExp(TQString::tqfromLatin1("%m")), TQString::number(maxValue())); + s.replace(TQRegExp(TQString::tqfromLatin1("%p")), TQString::number(recalcValue(100))); + s.replace(TQRegExp(TQString::tqfromLatin1("%v")), TQString::number(value())); + s.replace(TQRegExp(TQString::tqfromLatin1("%m")), TQString::number(maxValue())); p->setPen(text_color); TQFont font = p->font(); diff --git a/libkdegames/kgrid2d.h b/libkdegames/kgrid2d.h index 833db8ec..9443b0c7 100644 --- a/libkdegames/kgrid2d.h +++ b/libkdegames/kgrid2d.h @@ -498,9 +498,9 @@ class Hexagonal : public Generic, public HexagonalBase CoordList n = neighbours(*it, insideOnly); CoordList::const_iterator it2; for (it2=n.begin(); it2!=n.end(); ++it2) - if ( center.tqfind(*it2)==center.end() - && ring.tqfind(*it2)==ring.end() - && newRing.tqfind(*it2)==newRing.end() ) + if ( center.find(*it2)==center.end() + && ring.find(*it2)==ring.end() + && newRing.find(*it2)==newRing.end() ) newRing.append(*it2); center.append(*it); } -- cgit v1.2.1