summaryrefslogtreecommitdiffstats
path: root/kbackgammon/engines/fibs/kbgfibschat.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
commit24c5cdc2737fe0044b11a12359606973eb93fc0b (patch)
treea670701ebff60c73e9f32aab588e9b3d395d74f9 /kbackgammon/engines/fibs/kbgfibschat.cpp
parentf6000cffbc89072156cad7866d179fbd622df317 (diff)
downloadtdegames-24c5cdc2737fe0044b11a12359606973eb93fc0b.tar.gz
tdegames-24c5cdc2737fe0044b11a12359606973eb93fc0b.zip
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
Diffstat (limited to 'kbackgammon/engines/fibs/kbgfibschat.cpp')
-rw-r--r--kbackgammon/engines/fibs/kbgfibschat.cpp54
1 files changed, 27 insertions, 27 deletions
diff --git a/kbackgammon/engines/fibs/kbgfibschat.cpp b/kbackgammon/engines/fibs/kbgfibschat.cpp
index 7e4c9d7f..f4dce656 100644
--- a/kbackgammon/engines/fibs/kbgfibschat.cpp
+++ b/kbackgammon/engines/fibs/kbgfibschat.cpp
@@ -446,7 +446,7 @@ void KBgChat::hideEvent(TQHideEvent *e)
*/
void KBgChat::startGame(const TQString &name)
{
- int *id = d->mName2ID->tqfind(d->mName[1] = name);
+ int *id = d->mName2ID->find(d->mName[1] = name);
if (!id) {
id = new int(nextId());
d->mName2ID->insert(name, id);
@@ -460,7 +460,7 @@ void KBgChat::startGame(const TQString &name)
*/
void KBgChat::endGame()
{
- int *id = d->mName2ID->tqfind(d->mName[1]);
+ int *id = d->mName2ID->find(d->mName[1]);
if (id)
setSendingEntry(*id);
else
@@ -472,7 +472,7 @@ void KBgChat::endGame()
*/
void KBgChat::fibsTalk(const TQString &name)
{
- int *id = d->mName2ID->tqfind(name);
+ int *id = d->mName2ID->find(name);
if (!id) {
id = new int(nextId());
d->mName2ID->insert(name, id);
@@ -486,7 +486,7 @@ void KBgChat::fibsTalk(const TQString &name)
*/
void KBgChat::deletePlayer(const TQString &name)
{
- int *id = d->mName2ID->tqfind(name);
+ int *id = d->mName2ID->find(name);
if (id) {
removeSendingEntry(*id);
d->mName2ID->remove(name);
@@ -535,21 +535,21 @@ void KBgChat::handleCommand(int id, const TQString& msg)
*/
void KBgChat::handleData(const TQString &msg)
{
- TQString clip = msg.left(msg.tqfind(' ')), user, cMsg = msg;
+ TQString clip = msg.left(msg.find(' ')), user, cMsg = msg;
TQDateTime date;
bool flag = false;
int cmd = clip.toInt(&flag);
if (flag) {
- cMsg.tqreplace(0, cMsg.tqfind(' ')+1, "");
+ cMsg.replace(0, cMsg.find(' ')+1, "");
- user = cMsg.left(cMsg.tqfind(' '));
+ user = cMsg.left(cMsg.find(' '));
switch (cmd) {
case CLIP_SAYS:
- if (!d->mGag.tqcontains(user)) {
- cMsg = i18n("<u>%1 tells you:</u> %2").tqarg(user).tqarg(cMsg.tqreplace(TQRegExp("^" + user), ""));
+ if (!d->mGag.contains(user)) {
+ cMsg = i18n("<u>%1 tells you:</u> %2").tqarg(user).tqarg(cMsg.replace(TQRegExp("^" + user), ""));
cMsg = "<font color=\"red\">" + cMsg + "</font>";
emit personalMessage(cMsg);
} else
@@ -557,16 +557,16 @@ void KBgChat::handleData(const TQString &msg)
break;
case CLIP_SHOUTS:
- if ((!((KToggleAction *)d->mAct[KBgChatPrivate::Silent])->isChecked()) && (!d->mGag.tqcontains(user))) {
- cMsg = i18n("<u>%1 shouts:</u> %2").tqarg(user).tqarg(cMsg.tqreplace(TQRegExp("^" + user), ""));
+ if ((!((KToggleAction *)d->mAct[KBgChatPrivate::Silent])->isChecked()) && (!d->mGag.contains(user))) {
+ cMsg = i18n("<u>%1 shouts:</u> %2").tqarg(user).tqarg(cMsg.replace(TQRegExp("^" + user), ""));
cMsg = "<font color=\"black\">" + cMsg + "</font>";
} else
cMsg = "";
break;
case CLIP_WHISPERS:
- if (!d->mGag.tqcontains(user)) {
- cMsg = i18n("<u>%1 whispers:</u> %2").tqarg(user).tqarg(cMsg.tqreplace(TQRegExp("^" + user), ""));
+ if (!d->mGag.contains(user)) {
+ cMsg = i18n("<u>%1 whispers:</u> %2").tqarg(user).tqarg(cMsg.replace(TQRegExp("^" + user), ""));
cMsg = "<font color=\"red\">" + cMsg + "</font>";
emit personalMessage(cMsg);
} else
@@ -574,8 +574,8 @@ void KBgChat::handleData(const TQString &msg)
break;
case CLIP_KIBITZES:
- if (!d->mGag.tqcontains(user)) {
- cMsg = i18n("<u>%1 kibitzes:</u> %2").tqarg(user).tqarg(cMsg.tqreplace(TQRegExp("^" + user), ""));
+ if (!d->mGag.contains(user)) {
+ cMsg = i18n("<u>%1 kibitzes:</u> %2").tqarg(user).tqarg(cMsg.replace(TQRegExp("^" + user), ""));
cMsg = "<font color=\"red\">" + cMsg + "</font>";
emit personalMessage(cMsg);
} else
@@ -583,7 +583,7 @@ void KBgChat::handleData(const TQString &msg)
break;
case CLIP_YOU_SAY:
- cMsg = i18n("<u>You tell %1:</u> %2").tqarg(user).tqarg(cMsg.tqreplace(TQRegExp("^" + user), ""));
+ cMsg = i18n("<u>You tell %1:</u> %2").tqarg(user).tqarg(cMsg.replace(TQRegExp("^" + user), ""));
cMsg = "<font color=\"darkgreen\">" + cMsg + "</font>";
emit personalMessage(cMsg);
user = TQString();
@@ -611,10 +611,10 @@ void KBgChat::handleData(const TQString &msg)
break;
case CLIP_MESSAGE:
- user = cMsg.left(cMsg.tqfind(' ')+1);
- cMsg.remove(0, cMsg.tqfind(' ')+1);
- date.setTime_t(cMsg.left(cMsg.tqfind(' ')+1).toUInt());
- cMsg.remove(0, cMsg.tqfind(' '));
+ user = cMsg.left(cMsg.find(' ')+1);
+ cMsg.remove(0, cMsg.find(' ')+1);
+ date.setTime_t(cMsg.left(cMsg.find(' ')+1).toUInt());
+ cMsg.remove(0, cMsg.find(' '));
cMsg = i18n("<u>User %1 left a message at %2</u>: %3").tqarg(user).tqarg(date.toString()).tqarg(cMsg);
cMsg = "<font color=\"red\">" + cMsg + "</font>";
emit personalMessage(cMsg);
@@ -644,8 +644,8 @@ void KBgChat::handleData(const TQString &msg)
/*
* Special treatment for non-CLIP messages
*/
- if (cMsg.tqcontains(TQRegExp("^You say to yourself: "))) {
- cMsg.tqreplace(TQRegExp("^You say to yourself: "),
+ if (cMsg.contains(TQRegExp("^You say to yourself: "))) {
+ cMsg.replace(TQRegExp("^You say to yourself: "),
i18n("<u>You say to yourself:</u> "));
} else {
kdDebug(user.isNull(), 10500) << "KBgChat::handleData unhandled message: "
@@ -694,7 +694,7 @@ void KBgChat::contextMenu(TQListBoxItem *i, const TQPoint &p)
d->mChat->insertSeparator();
- if (d->mGag.tqcontains(d->mName[0]) <= 0) {
+ if (d->mGag.contains(d->mName[0]) <= 0) {
d->mAct[KBgChatPrivate::Gag]->setText(i18n("Gag %1").tqarg(d->mName[0]));
d->mAct[KBgChatPrivate::Gag]->plug(d->mChat);
} else {
@@ -797,10 +797,10 @@ void KBgChat::slotSilent()
*/
void KBgChat::slotCopy()
{
- d->mText.tqreplace(TQRegExp("<u>"), "");
- d->mText.tqreplace(TQRegExp("</u>"), "");
- d->mText.tqreplace(TQRegExp("</font>"), "");
- d->mText.tqreplace(TQRegExp("^.*\">"), "");
+ d->mText.replace(TQRegExp("<u>"), "");
+ d->mText.replace(TQRegExp("</u>"), "");
+ d->mText.replace(TQRegExp("</font>"), "");
+ d->mText.replace(TQRegExp("^.*\">"), "");
kapp->clipboard()->setText(d->mText);
}