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/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 +- 12 files changed, 26 insertions(+), 26 deletions(-) (limited to 'libkdegames/kgame') diff --git a/libkdegames/kgame/dialogs/kgamedebugdialog.h b/libkdegames/kgame/dialogs/kgamedebugdialog.h index 924037ff..8682ce69 100644 --- a/libkdegames/kgame/dialogs/kgamedebugdialog.h +++ b/libkdegames/kgame/dialogs/kgamedebugdialog.h @@ -78,7 +78,7 @@ public slots: signals: /** - * This signal is emitted when the "debug messages" page couldn't tqfind + * This signal is emitted when the "debug messages" page couldn't find * the name of a message id. This is usually the case for user-defined * messages. KGameDebugDialog asks you to give the msgid a name. * @param messageid The ID of the message. As given to @ref diff --git a/libkdegames/kgame/dialogs/kgamedialogconfig.cpp b/libkdegames/kgame/dialogs/kgamedialogconfig.cpp index af0172ef..eeaf50e1 100644 --- a/libkdegames/kgame/dialogs/kgamedialogconfig.cpp +++ b/libkdegames/kgame/dialogs/kgamedialogconfig.cpp @@ -714,7 +714,7 @@ void KGameDialogConnectionConfig::slotPlayerLeftGame(KPlayer* p) // disconnect first this->disconnect(p); if (!item(p)) { - kdError(11001) << k_funcinfo << ": cannot tqfind " << p->id() + kdError(11001) << k_funcinfo << ": cannot find " << p->id() << " in list" << endl; return; } diff --git a/libkdegames/kgame/kgame.cpp b/libkdegames/kgame/kgame.cpp index 42a21580..6965ebcf 100644 --- a/libkdegames/kgame/kgame.cpp +++ b/libkdegames/kgame/kgame.cpp @@ -1093,7 +1093,7 @@ void KGame::setupGameContinue(TQDataStream& stream, TQ_UINT32 sender) for ( player=newPlayerList.first(); player != 0; player=newPlayerList.next() ) { // Already in the list - if (inactivateIds.tqfind(player->id())!=inactivateIds.end()) + if (inactivateIds.find(player->id())!=inactivateIds.end()) { continue; } @@ -1109,7 +1109,7 @@ void KGame::setupGameContinue(TQDataStream& stream, TQ_UINT32 sender) for ( player=d->mPlayerList.first(); player != 0; player=d->mPlayerList.next() ) { // Already in the list - if (inactivateIds.tqfind(player->id())!=inactivateIds.end()) + if (inactivateIds.find(player->id())!=inactivateIds.end()) { continue; } @@ -1171,9 +1171,9 @@ void KGame::setupGameContinue(TQDataStream& stream, TQ_UINT32 sender) // Now send out the player list which the client can activate for ( player=newPlayerList.first(); player != 0; player=newPlayerList.next() ) { - kdDebug(11001) << " newplayerlist tqcontains " << player->id() << endl; + kdDebug(11001) << " newplayerlist contains " << player->id() << endl; // Only activate what is not in the list - if (inactivateIds.tqfind(player->id())!=inactivateIds.end()) + if (inactivateIds.find(player->id())!=inactivateIds.end()) { continue; } @@ -1443,7 +1443,7 @@ void KGame::emitSignal(KGamePropertyBase *me) } KGamePropertyBase* KGame::findProperty(int id) const -{ return d->mProperties->tqfind(id); } +{ return d->mProperties->find(id); } KGame::GamePolicy KGame::policy() const { diff --git a/libkdegames/kgame/kgamechat.cpp b/libkdegames/kgame/kgamechat.cpp index 29d80807..53714706 100644 --- a/libkdegames/kgame/kgamechat.cpp +++ b/libkdegames/kgame/kgamechat.cpp @@ -162,7 +162,7 @@ bool KGameChat::isToGroupMessage(int id) const bool KGameChat::isToPlayerMessage(int id) const { -return d->mSendId2PlayerId.tqcontains(id); } +return d->mSendId2PlayerId.contains(id); } TQString KGameChat::sendToPlayerEntry(const TQString& name) const { return i18n("Send to %1").tqarg(name); } diff --git a/libkdegames/kgame/kgamenetwork.h b/libkdegames/kgame/kgamenetwork.h index 1766ac90..e6c9fc5d 100644 --- a/libkdegames/kgame/kgamenetwork.h +++ b/libkdegames/kgame/kgamenetwork.h @@ -322,7 +322,7 @@ public: * experience some strange behaviour if you use the message server directly! * * @return a pointer to the message server if this is the MASTER KGame - * object. Note that it might be possible that no KGame object tqcontains + * object. Note that it might be possible that no KGame object contains * the KMessageServer at all! It might even run stand alone! **/ KMessageServer* messageServer() const; diff --git a/libkdegames/kgame/kgameproperty.h b/libkdegames/kgame/kgameproperty.h index 03fcae87..c5f35997 100644 --- a/libkdegames/kgame/kgameproperty.h +++ b/libkdegames/kgame/kgameproperty.h @@ -238,7 +238,7 @@ public: int id() const { return mId; } /** - * @return a type_info of the data this property tqcontains. This is used + * @return a type_info of the data this property contains. This is used * e.g. by KGameDebugDialog **/ virtual const type_info* typeinfo() { return &typeid(this); } @@ -403,7 +403,7 @@ private: *
  • A Mixture (very dirty) * * 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 -- cgit v1.2.1