diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 06:08:18 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 06:08:18 +0000 |
commit | 24c5cdc2737fe0044b11a12359606973eb93fc0b (patch) | |
tree | a670701ebff60c73e9f32aab588e9b3d395d74f9 /kbackgammon/engines/gnubg | |
parent | f6000cffbc89072156cad7866d179fbd622df317 (diff) | |
download | tdegames-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/gnubg')
-rw-r--r-- | kbackgammon/engines/gnubg/kbggnubg.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/kbackgammon/engines/gnubg/kbggnubg.cpp b/kbackgammon/engines/gnubg/kbggnubg.cpp index e6f853a2..1ddc3664 100644 --- a/kbackgammon/engines/gnubg/kbggnubg.cpp +++ b/kbackgammon/engines/gnubg/kbggnubg.cpp @@ -85,7 +85,7 @@ void KBgEngineGNU::handleLine(const TQString &l) /* * Start of a new game/match */ - if (line.tqcontains(TQRegExp("^gnubg rolls [1-6], .* rolls [1-6]\\."))) { + if (line.contains(TQRegExp("^gnubg rolls [1-6], .* rolls [1-6]\\."))) { KRegExp e("^gnubg rolls ([1-6]), .* rolls ([1-6])\\."); e.match(line.latin1()); if (int r = strcmp(e.group(1), e.group(2))) @@ -95,14 +95,14 @@ void KBgEngineGNU::handleLine(const TQString &l) /* * Bug fixes for older versions of GNUBG - to be removed */ - if (line.tqcontains(TQRegExp("^.* cannot move\\..+$"))) { + if (line.contains(TQRegExp("^.* cannot move\\..+$"))) { KRegExp e("(^.* cannot move.)(.*$)"); e.match(line.latin1()); handleLine(e.group(1)); handleLine(e.group(2)); return; } - if (line.tqcontains(TQRegExp("^Are you sure you want to start a new game, and discard the one in progress\\?"))) { + if (line.contains(TQRegExp("^Are you sure you want to start a new game, and discard the one in progress\\?"))) { KRegExp e("(^Are you sure you want to start a new game, and discard the one in progress\\? )(.+$)"); e.match(line.latin1()); handleLine(e.group(1)); @@ -113,7 +113,7 @@ void KBgEngineGNU::handleLine(const TQString &l) /* * Cube handling */ - if (line.tqcontains(TQRegExp("^gnubg accepts and immediately redoubles to [0-9]+\\.$"))) { + if (line.contains(TQRegExp("^gnubg accepts and immediately redoubles to [0-9]+\\.$"))) { // redoubles mess up the game counter "turn" @@ -122,7 +122,7 @@ void KBgEngineGNU::handleLine(const TQString &l) //emit newState(st); } - if (line.tqcontains(TQRegExp("^gnubg doubles\\.$"))) { + if (line.contains(TQRegExp("^gnubg doubles\\.$"))) { // TODO: we need some generic class for this. the class // can be shared between all engines @@ -155,14 +155,14 @@ void KBgEngineGNU::handleLine(const TQString &l) /* * Ignore the following messages */ - if (line.tqcontains(TQRegExp("^TTY boards will be given in raw format"))) { + if (line.contains(TQRegExp("^TTY boards will be given in raw format"))) { line = " "; } /* * Board messages */ - if (line.tqcontains(TQRegExp("^board:"))) { + if (line.contains(TQRegExp("^board:"))) { KBgtqStatus st(line); @@ -248,7 +248,7 @@ void KBgEngineGNU::handleLine(const TQString &l) /* * Show the line... */ - line.tqreplace(TQRegExp(" "), " "); + line.replace(TQRegExp(" "), " "); if (!line.isEmpty()) emit infoText(line); } @@ -625,9 +625,9 @@ void KBgEngineGNU::done() emit allowCommand(Redo, false); // Transform the string to FIBS format - lastmove.tqreplace(0, 2, "move "); - lastmove.tqreplace(TQRegExp("\\+"), " "); - lastmove.tqreplace(TQRegExp("\\-"), " "); + lastmove.replace(0, 2, "move "); + lastmove.replace(TQRegExp("\\+"), " "); + lastmove.replace(TQRegExp("\\-"), " "); // sent it to the server handleCommand(lastmove); @@ -669,7 +669,7 @@ void KBgEngineGNU::handleMove(TQString *s) lastmove = *s; int index = 0; - TQString t = s->mid(index, s->tqfind(' ', index)); + TQString t = s->mid(index, s->find(' ', index)); index += 1 + t.length(); int moves = t.toInt(); |