diff --git a/atlantik/COPYING.LIB b/atlantik/COPYING.LIB index c4b38a7e..ae23fcfd 100644 --- a/atlantik/COPYING.LIB +++ b/atlantik/COPYING.LIB @@ -135,7 +135,7 @@ included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means -all the source code for all modules it tqcontains, plus any associated +all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. diff --git a/atlantik/client/monopigator.cpp b/atlantik/client/monopigator.cpp index 22081de0..1fe68cef 100644 --- a/atlantik/client/monopigator.cpp +++ b/atlantik/client/monopigator.cpp @@ -110,7 +110,7 @@ void Monopigator::processData(const TQByteArray &data, bool okSoFar) MonopigatorEntry::MonopigatorEntry(TQListView *tqparent, TQString host, TQString latency, TQString version, TQString users, TQString port, TQString ip) : TQObject(), TQListViewItem(tqparent, host, latency, version, users, port) { - m_isDev = ( version.tqfind( TQRegExp("(CVS|-dev)") ) != -1 ) ? true : false; + m_isDev = ( version.find( TQRegExp("(CVS|-dev)") ) != -1 ) ? true : false; setEnabled(false); tqparent->sort(); diff --git a/atlantik/libatlantikui/estatedetails.cpp b/atlantik/libatlantikui/estatedetails.cpp index d2690a91..ca859eb6 100644 --- a/atlantik/libatlantikui/estatedetails.cpp +++ b/atlantik/libatlantikui/estatedetails.cpp @@ -298,7 +298,7 @@ void EstateDetails::appendText(TQString text) KWrappedListViewItem *infoText = new KWrappedListViewItem(m_infoListView, m_infoListView->lastItem(), text); - if ( text.tqfind( TQRegExp("rolls") ) != -1 ) + if ( text.find( TQRegExp("rolls") ) != -1 ) infoText->setPixmap(0, TQPixmap(SmallIcon("roll"))); else infoText->setPixmap(0, TQPixmap(SmallIcon("atlantik"))); diff --git a/atlantik/libatlantikui/kwrappedlistviewitem.cpp b/atlantik/libatlantikui/kwrappedlistviewitem.cpp index 81f06dd7..12801aab 100644 --- a/atlantik/libatlantikui/kwrappedlistviewitem.cpp +++ b/atlantik/libatlantikui/kwrappedlistviewitem.cpp @@ -83,7 +83,7 @@ void KWrappedListViewItem::wrapColumn( int c ) KWordWrap *wrap = KWordWrap::formatText( fm, rect, 0, m_origText ); setText( c, wrap->wrappedString() ); - int lc = text(c).tqcontains( TQChar( '\n' ) ) + 1; + int lc = text(c).contains( TQChar( '\n' ) ) + 1; setHeight( wrap->boundingRect().height() + lc*lv->itemMargin() ); widthChanged( c ); diff --git a/katomic/molek.cpp b/katomic/molek.cpp index 7555736b..7e6484ea 100644 --- a/katomic/molek.cpp +++ b/katomic/molek.cpp @@ -68,7 +68,7 @@ void Molek::load (const KSimpleConfig& config) value = ""; strlcpy(current.conn, value.ascii(), sizeof(current.conn)); - kdWarning( atoms.tqfind(current) != atoms.end() ) + kdWarning( atoms.find(current) != atoms.end() ) << "OOOPS, duplicate atom definition in " << key << endl; atoms.append(current); atom_index++; diff --git a/kbackgammon/engines/fibs/kbgfibs.cpp b/kbackgammon/engines/fibs/kbgfibs.cpp index 1492ad2c..c99b19f0 100644 --- a/kbackgammon/engines/fibs/kbgfibs.cpp +++ b/kbackgammon/engines/fibs/kbgfibs.cpp @@ -380,7 +380,7 @@ void KBgEngineFIBS::cancelJoin(const TQString &info) TQRegExp patt = TQRegExp("^" + info + " "); for (int i = 0; i <= numJoin; i++) { - if (actJoin[i]->text().tqcontains(patt)) { + if (actJoin[i]->text().contains(patt)) { // move all entries starting at i+1 up by one... for (int j = i; j < numJoin; j++) actJoin[j]->setText(actJoin[j+1]->text()); @@ -426,18 +426,18 @@ void KBgEngineFIBS::changeJoin(const TQString &info) for (TQStringList::Iterator it = invitations.begin(); it != invitations.end(); ++it) { - if ((*it).tqcontains(patt)) { + if ((*it).contains(patt)) { TQString text, menu; - if ((*it).tqcontains(TQRegExp(" r$"))) { + if ((*it).contains(TQRegExp(" r$"))) { menu = i18n("R means resume", "%1 (R)").tqarg(name); text = i18n("%1 (experience %2, rating %3) wants to resume a saved match with you. " "If you want to play, use the corresponding menu entry to join (or type " "'join %4').").tqarg(name).tqarg(expi_s).tqarg(rate_s).tqarg(name); KNotifyClient::event("invitation", i18n("%1 wants to resume a saved match with you"). arg(name)); - } else if ((*it).tqcontains(TQRegExp(" u$"))) { + } else if ((*it).contains(TQRegExp(" u$"))) { menu = i18n("U means unlimited", "%1 (U)").tqarg(name); text = i18n("%1 (experience %2, rating %3) wants to play an unlimited match with you. " "If you want to play, use the corresponding menu entry to join (or type " @@ -578,8 +578,8 @@ void KBgEngineFIBS::done() emit allowCommand(Roll, false); // Transform the string to FIBS cormat - lastMove.tqreplace(0, 2, "move "); - lastMove.tqreplace(pat[PlsChar], "-"); + lastMove.replace(0, 2, "move "); + lastMove.replace(pat[PlsChar], "-"); // sent it to the server emit serverString(lastMove); @@ -809,7 +809,7 @@ void KBgEngineFIBS::load() */ void KBgEngineFIBS::join(const TQString &msg) { - emit serverString("join " + msg.left(msg.tqfind('('))); + emit serverString("join " + msg.left(msg.find('('))); } void KBgEngineFIBS::join_0() { join(actJoin[0]->text()); } void KBgEngineFIBS::join_1() { join(actJoin[1]->text()); } @@ -1094,7 +1094,7 @@ bool KBgEngineFIBS::queryConnection(const bool newlogin) first = false; } - } while (ret && (msg.isEmpty() || msg.tqcontains(' ') || msg.tqcontains(':'))); + } while (ret && (msg.isEmpty() || msg.contains(' ') || msg.contains(':'))); if (ret) infoFIBS[FIBSUser] = msg; @@ -1130,7 +1130,7 @@ bool KBgEngineFIBS::queryConnection(const bool newlogin) first = false; } - } while (ret && (msg.isEmpty() || msg.tqcontains(' ') || msg.tqcontains(':'))); + } while (ret && (msg.isEmpty() || msg.contains(' ') || msg.contains(':'))); if (ret) infoFIBS[FIBSPswd] = msg; @@ -1281,13 +1281,13 @@ void KBgEngineFIBS::handleServerData(TQString &line) /* * Fix-up any HTML-like tags in the line */ - line.tqreplace(pat[HTML_lt], "<"); - line.tqreplace(pat[HTML_gt], ">"); + line.replace(pat[HTML_lt], "<"); + line.replace(pat[HTML_gt], ">"); /* * FIBS sometimes sends tabs, where it should send 8 spaces... */ - line.tqreplace(pat[TabChar], " "); + line.replace(pat[TabChar], " "); switch (rxtqStatus) { @@ -1344,7 +1344,7 @@ void KBgEngineFIBS::handleServerData(TQString &line) void KBgEngineFIBS::handleMessageWhois(const TQString &line) { rxCollect += "
    " + line; - if (line.tqcontains(pat[WhoisE1]) || line.tqcontains(pat[WhoisE2])) { + if (line.contains(pat[WhoisE1]) || line.contains(pat[WhoisE2])) { rxtqStatus = RxNormal; emit infoText("" + rxCollect + "
"); } @@ -1356,7 +1356,7 @@ void KBgEngineFIBS::handleMessageWhois(const TQString &line) void KBgEngineFIBS::handleMessageRating(const TQString &line) { rxCollect += "
" + line; - if (line.tqcontains(pat[EndRate]) && ++rxCount == 2) { + if (line.contains(pat[EndRate]) && ++rxCount == 2) { emit infoText("" + rxCollect + "
"); rxtqStatus = RxNormal; } @@ -1367,7 +1367,7 @@ void KBgEngineFIBS::handleMessageRating(const TQString &line) */ void KBgEngineFIBS::handleMessageMotd(const TQString &line) { - if (line.tqcontains(pat[MotdEnd])) { + if (line.contains(pat[MotdEnd])) { rxtqStatus = RxNormal; emit infoText("
" + rxCollect + "
"); /* @@ -1378,9 +1378,9 @@ void KBgEngineFIBS::handleMessageMotd(const TQString &line) emit serverString("set boardstyle 3"); } else { TQString tline = line; - tline.tqreplace(pat[BoxHori], "

"); - tline.tqreplace(pat[BoxVer1], ""); - tline.tqreplace(pat[BoxVer2], ""); + tline.replace(pat[BoxHori], "

"); + tline.replace(pat[BoxVer1], ""); + tline.replace(pat[BoxVer2], ""); rxCollect += "
" + tline; } } @@ -1393,7 +1393,7 @@ void KBgEngineFIBS::handleMessageConnect(const TQString &line, const TQString &r /* * Two possibilities: either we are logged in or we sent bad password/login */ - if (line.tqcontains("login:")) { + if (line.contains("login:")) { /* * This can only happen if the password/login is wrong. */ @@ -1428,7 +1428,7 @@ void KBgEngineFIBS::handleMessageConnect(const TQString &line, const TQString &r * Ok, we are logged in! Now receive personal information. These * are completely useless but what the heck. */ - if (line.tqcontains(pat[Welcome])) { + if (line.contains(pat[Welcome])) { char p[3][256]; time_t tmp; // Using latin1() is okay, since the string comes from FIBS. @@ -1471,7 +1471,7 @@ void KBgEngineFIBS::handleMessageConnect(const TQString &line, const TQString &r * p[3] - timezone * */ - if (line.tqcontains(pat[OwnInfo])) { + if (line.contains(pat[OwnInfo])) { rxtqStatus = RxNormal; @@ -1537,7 +1537,7 @@ void KBgEngineFIBS::handleMessageConnect(const TQString &line, const TQString &r /* * The beginning of a new login procedure starts starts here */ - if (line.tqcontains(pat[OneName])) { + if (line.contains(pat[OneName])) { rxtqStatus = RxNewLogin; emit infoText(TQString("") + rxCollect + ""); rxCollect = ""; @@ -1560,14 +1560,14 @@ void KBgEngineFIBS::handleMessageNewLogin(const TQString &line) /* * Request the new login */ - if (line.tqcontains(pat[OneName])) { + if (line.contains(pat[OneName])) { emit serverString(TQString("name ") + infoFIBS[FIBSUser]); return; } /* * Ooops, user name already exists */ - if (line.tqcontains(pat[OthrNam])) { + if (line.contains(pat[OthrNam])) { TQString text = i18n("The selected login is alreay in use! Please select another one."); bool ret, first = true; TQString msg; @@ -1579,7 +1579,7 @@ void KBgEngineFIBS::handleMessageNewLogin(const TQString &line) text += i18n("\n\nThe login may not contain spaces or colons!"); first = false; } - } while (msg.tqcontains(' ') || msg.tqcontains(':')); + } while (msg.contains(' ') || msg.contains(':')); if (ret) { infoFIBS[FIBSUser] = msg; @@ -1592,21 +1592,21 @@ void KBgEngineFIBS::handleMessageNewLogin(const TQString &line) /* * first time we send the password */ - if (line.tqcontains(pat[YourNam])) { + if (line.contains(pat[YourNam])) { emit serverString(infoFIBS[FIBSPswd]); return; } /* * second time we send the password */ - if (line.tqcontains(pat[GivePwd])) { + if (line.contains(pat[GivePwd])) { emit serverString(infoFIBS[FIBSPswd]); return; } /* * at this point we are done creating the account */ - if (line.tqcontains(pat[RetypeP])) { + if (line.contains(pat[RetypeP])) { TQString text = i18n("Your account has been created. Your new login is %1. To fully activate " "this account, I will now close the connection. Once you reconnect, you can start " @@ -1632,7 +1632,7 @@ void KBgEngineFIBS::handleMessageNormal(TQString &line, TQString &rawline) * For now, the waves are ignored. They should probably go into * the chat window -- but only optional */ - if (line.tqcontains(pat[OneWave]) || line.tqcontains(pat[TwoWave]) || line.tqcontains(pat[YouWave])) { + if (line.contains(pat[OneWave]) || line.contains(pat[TwoWave]) || line.contains(pat[YouWave])) { return; } @@ -1642,8 +1642,8 @@ void KBgEngineFIBS::handleMessageNormal(TQString &line, TQString &rawline) * ever gets a games window, they should be in there. For now, they * are ignored. */ - else if (line.tqcontains(pat[GameBG1]) || line.tqcontains(pat[GameBG2]) || line.tqcontains(pat[GameRE1]) || - line.tqcontains(pat[GameRE2]) || line.tqcontains(pat[GameEnd])) { + else if (line.contains(pat[GameBG1]) || line.contains(pat[GameBG2]) || line.contains(pat[GameRE1]) || + line.contains(pat[GameRE2]) || line.contains(pat[GameEnd])) { return; } @@ -1651,7 +1651,7 @@ void KBgEngineFIBS::handleMessageNormal(TQString &line, TQString &rawline) /* * Artefact caused by the login test procedure utilized. */ - else if (line.tqcontains(pat[NoLogin])) { + else if (line.contains(pat[NoLogin])) { return; } @@ -1659,7 +1659,7 @@ void KBgEngineFIBS::handleMessageNormal(TQString &line, TQString &rawline) /* * Connection keep-alive response */ - else if (line.tqcontains(pat[KeepAlv])) { + else if (line.contains(pat[KeepAlv])) { return; } @@ -1670,10 +1670,10 @@ void KBgEngineFIBS::handleMessageNormal(TQString &line, TQString &rawline) * Chat and personal messages - note that the chat window sends these messages * back to us so we can display them if the user wants that. */ - else if (line.tqcontains(pat[ChatSay]) || line.tqcontains(pat[ChatSht]) || line.tqcontains(pat[ChatWis]) || - line.tqcontains(pat[ChatKib]) || line.tqcontains(pat[SelfSay]) || line.tqcontains(pat[SelfSht]) || - line.tqcontains(pat[SelfWis]) || line.tqcontains(pat[SelfKib]) || line.tqcontains(pat[SelfSlf]) || - line.tqcontains(pat[MsgPers]) || line.tqcontains(pat[MsgDeli]) || line.tqcontains(pat[MsgSave])) { + else if (line.contains(pat[ChatSay]) || line.contains(pat[ChatSht]) || line.contains(pat[ChatWis]) || + line.contains(pat[ChatKib]) || line.contains(pat[SelfSay]) || line.contains(pat[SelfSht]) || + line.contains(pat[SelfWis]) || line.contains(pat[SelfKib]) || line.contains(pat[SelfSlf]) || + line.contains(pat[MsgPers]) || line.contains(pat[MsgDeli]) || line.contains(pat[MsgSave])) { emit chatMessage(line); return; @@ -1684,12 +1684,12 @@ void KBgEngineFIBS::handleMessageNormal(TQString &line, TQString &rawline) /* * Beginning of games. In all these cases we are playing and not watching. */ - else if (line.tqcontains(pat[MatchB1]) || line.tqcontains(pat[MatchB2])) { + else if (line.contains(pat[MatchB1]) || line.contains(pat[MatchB2])) { if (useAutoMsg[MsgBeg] && !autoMsg[MsgBeg].stripWhiteSpace().isEmpty()) emit serverString("kibitz " + autoMsg[MsgBeg]); } - else if (line.tqcontains(pat[MatchB3]) || line.tqcontains(pat[MatchB4])) { + else if (line.contains(pat[MatchB3]) || line.contains(pat[MatchB4])) { if (useAutoMsg[MsgBeg] && !autoMsg[MsgBeg].stripWhiteSpace().isEmpty()) emit serverString("kibitz " + autoMsg[MsgBeg]); @@ -1702,7 +1702,7 @@ void KBgEngineFIBS::handleMessageNormal(TQString &line, TQString &rawline) * The help should be handled separately. A fairly complete implementation of a * help parsing can be found in KFibs. */ - else if (line.tqcontains(pat[HelpTxt])) { + else if (line.contains(pat[HelpTxt])) { // do nothing } @@ -1712,7 +1712,7 @@ void KBgEngineFIBS::handleMessageNormal(TQString &line, TQString &rawline) /* * Simple cases without the need for many comments... */ - else if (line.tqcontains(pat[RawBord])) { + else if (line.contains(pat[RawBord])) { /* * Save the board string and create a new game state @@ -1766,7 +1766,7 @@ void KBgEngineFIBS::handleMessageNormal(TQString &line, TQString &rawline) return; } - else if (line.tqcontains(pat[PlsMove]) || line.tqcontains(pat[YouMove])) { + else if (line.contains(pat[PlsMove]) || line.contains(pat[YouMove])) { KNotifyClient::event("move", i18n("Please make your move")); @@ -1777,13 +1777,13 @@ void KBgEngineFIBS::handleMessageNormal(TQString &line, TQString &rawline) /* * Being away and coming back */ - else if (line.tqcontains(pat[YouAway])) { + else if (line.contains(pat[YouAway])) { emit changePlayertqStatus(infoFIBS[FIBSUser], KFibsPlayerList::Away, true); actBack->setEnabled(true); line += "
  
" + i18n("(or use the corresponding menu entry to join the match)"); } - else if (line.tqcontains(pat[YouBack])) { + else if (line.contains(pat[YouBack])) { emit changePlayertqStatus(infoFIBS[FIBSUser], KFibsPlayerList::Away, false); actBack->setEnabled(false); @@ -1795,7 +1795,7 @@ void KBgEngineFIBS::handleMessageNormal(TQString &line, TQString &rawline) /* * Catch the response of the user responding to double or resign */ - else if (line.tqcontains(pat[YouGive]) || line.tqcontains(pat[RejCont]) || line.tqcontains(pat[AcptWin])) { + else if (line.contains(pat[YouGive]) || line.contains(pat[RejCont]) || line.contains(pat[AcptWin])) { actAccept->setEnabled(false); actReject->setEnabled(false); @@ -1806,20 +1806,20 @@ void KBgEngineFIBS::handleMessageNormal(TQString &line, TQString &rawline) /* * Catch the responses to newly set toggles */ - else if (line.tqcontains(pat[GreedyY]) || line.tqcontains(pat[GreedyN])) { + else if (line.contains(pat[GreedyY]) || line.contains(pat[GreedyN])) { - fibsOpt[OptGreedy]->setChecked(line.tqcontains(pat[GreedyY])); + fibsOpt[OptGreedy]->setChecked(line.contains(pat[GreedyY])); line = "" + line + ""; } - else if (line.tqcontains(pat[DoubleY]) || line.tqcontains(pat[DoubleN])) { + else if (line.contains(pat[DoubleY]) || line.contains(pat[DoubleN])) { - fibsOpt[OptDouble]->setChecked(line.tqcontains(pat[DoubleY])); + fibsOpt[OptDouble]->setChecked(line.contains(pat[DoubleY])); line = "" + line + ""; } - else if (line.tqcontains(pat[RatingY]) || line.tqcontains(pat[RatingN])) { + else if (line.contains(pat[RatingY]) || line.contains(pat[RatingN])) { - fibsOpt[OptRatings]->setChecked(line.tqcontains(pat[RatingY])); + fibsOpt[OptRatings]->setChecked(line.contains(pat[RatingY])); line = "" + line + ""; } @@ -1828,7 +1828,7 @@ void KBgEngineFIBS::handleMessageNormal(TQString &line, TQString &rawline) /* * It's our turn to roll or double */ - else if (line.tqcontains(pat[YouTurn]) || line.tqcontains(pat[YouRoll])) { + else if (line.contains(pat[YouTurn]) || line.contains(pat[YouRoll])) { emit allowCommand(Cube, playing); emit allowCommand(Roll, playing); @@ -1843,17 +1843,17 @@ void KBgEngineFIBS::handleMessageNormal(TQString &line, TQString &rawline) /* * Got an invitation for a match */ - else if (line.tqcontains(pat[Invite0]) || line.tqcontains(pat[Invite2]) || line.tqcontains(pat[Invite3])) { + else if (line.contains(pat[Invite0]) || line.contains(pat[Invite2]) || line.contains(pat[Invite3])) { - rxCollect = rawline.left(rawline.tqfind(' ')); + rxCollect = rawline.left(rawline.find(' ')); emit serverString("rawwho " + rxCollect); - if (line.tqcontains(pat[Invite0])) { - rawline.tqreplace(pat[Invite1], ""); - rawline = rxCollect + " "+ rawline.left(rawline.tqfind(' ')); - } else if (line.tqcontains(pat[Invite2])) { + if (line.contains(pat[Invite0])) { + rawline.replace(pat[Invite1], ""); + rawline = rxCollect + " "+ rawline.left(rawline.find(' ')); + } else if (line.contains(pat[Invite2])) { rawline = rxCollect + " r"; - } else if (line.tqcontains(pat[Invite3])) { + } else if (line.contains(pat[Invite3])) { invitations += rxCollect + " u"; } invitations += rawline; @@ -1862,23 +1862,23 @@ void KBgEngineFIBS::handleMessageNormal(TQString &line, TQString &rawline) // - rx status changes ------------------------------------------------------------ - else if (line.tqcontains(pat[WhoisBG])) { + else if (line.contains(pat[WhoisBG])) { rxtqStatus = RxWhois; rxCollect = TQString("
") + line + ""; return; } - else if (line.tqcontains(pat[MotdBeg])) { + else if (line.contains(pat[MotdBeg])) { rxtqStatus = RxMotd; rxCollect = ""; return; } - else if (line.tqcontains(pat[BegRate])) { + else if (line.contains(pat[BegRate])) { rxtqStatus = RxRating; rxCount = 0; rxCollect = "
" + line; return; } - else if (line.tqcontains(pat[Goodbye])) { + else if (line.contains(pat[Goodbye])) { rxtqStatus = RxGoodbye; rxCollect = "


"; handleServerData(rawline); // danger: recursion! @@ -1893,7 +1893,7 @@ void KBgEngineFIBS::handleMessageNormal(TQString &line, TQString &rawline) /* * Continue a mutli game match? We have to either leave or continue */ - else if (line.tqcontains(pat[ConLeav])) { + else if (line.contains(pat[ConLeav])) { actConti->setEnabled(true); actLeave->setEnabled(true); line.append("
  
" + i18n("(or use the corresponding menu " @@ -1902,9 +1902,9 @@ void KBgEngineFIBS::handleMessageNormal(TQString &line, TQString &rawline) /* * Beginning and end of user updates */ - else if (line.tqcontains(pat[WhoInfo])) { - rawline.tqreplace(pat[WhoInfo], ""); - if (rawline.tqcontains(TQRegExp("^" + infoFIBS[FIBSUser] + " "))) { + else if (line.contains(pat[WhoInfo])) { + rawline.replace(pat[WhoInfo], ""); + if (rawline.contains(TQRegExp("^" + infoFIBS[FIBSUser] + " "))) { int ready; // Using latin1() is fine, since the string is coming from FIBS. sscanf(rawline.latin1(), "%*s %*s %*s %i %*s %*s %*s %*s %*s %*s %*s %*s", &ready); @@ -1913,7 +1913,7 @@ void KBgEngineFIBS::handleMessageNormal(TQString &line, TQString &rawline) emit fibsWhoInfo(rawline); return; } - else if (line.tqcontains(pat[WhoEnde])) { + else if (line.contains(pat[WhoEnde])) { emit fibsWhoEnd(); return; } @@ -1921,34 +1921,34 @@ void KBgEngineFIBS::handleMessageNormal(TQString &line, TQString &rawline) * This message is ignored. The instruction is given elsewhere (and slightly * delayed in the flow of time). */ - if (line.tqcontains(pat[TypJoin])) { + if (line.contains(pat[TypJoin])) { return; } /* * Watching other players */ - else if (line.tqcontains(pat[BegWtch])) { + else if (line.contains(pat[BegWtch])) { emit allowCommand(Load, true); - rawline.tqreplace(pat[BegWtch], ""); + rawline.replace(pat[BegWtch], ""); rawline.truncate(rawline.length()-1); emit fibsStartNewGame(rawline); load(); } - else if (line.tqcontains(pat[EndWtch])) { + else if (line.contains(pat[EndWtch])) { emit gameOver(); } /* * Blinding of players, the actual blind is handled by * the player list */ - else if (line.tqcontains(pat[BegBlnd])) { - rawline.tqreplace(pat[BegBlnd], ""); + else if (line.contains(pat[BegBlnd])) { + rawline.replace(pat[BegBlnd], ""); rawline.truncate(rawline.length()-1); emit changePlayertqStatus(rawline, KFibsPlayerList::Blind, true); line = "" + line + ""; } - else if (line.tqcontains(pat[EndBlnd])) { - rawline.tqreplace(pat[EndBlnd], ""); + else if (line.contains(pat[EndBlnd])) { + rawline.replace(pat[EndBlnd], ""); rawline.truncate(rawline.length()-1); emit changePlayertqStatus(rawline, KFibsPlayerList::Blind, false); line = "" + line + ""; @@ -1956,8 +1956,8 @@ void KBgEngineFIBS::handleMessageNormal(TQString &line, TQString &rawline) /* * Starting or reloading games or matches */ - else if (line.tqcontains(pat[BegGame])) { - rawline.tqreplace(pat[BegGame], ""); + else if (line.contains(pat[BegGame])) { + rawline.replace(pat[BegGame], ""); rawline.truncate(rawline.length()-1); emit fibsStartNewGame(rawline); fibsOpt[OptDouble]->setChecked(true); @@ -1965,9 +1965,9 @@ void KBgEngineFIBS::handleMessageNormal(TQString &line, TQString &rawline) actConti->setEnabled(false); actLeave->setEnabled(false); } - else if (line.tqcontains(pat[Reload1])) { - rawline.tqreplace(pat[Reload1], ""); - rawline = rawline.left(rawline.tqfind(' ')); + else if (line.contains(pat[Reload1])) { + rawline.replace(pat[Reload1], ""); + rawline = rawline.left(rawline.find(' ')); rawline.truncate(rawline.length()-1); emit fibsStartNewGame(rawline); fibsOpt[OptDouble]->setChecked(true); @@ -1976,8 +1976,8 @@ void KBgEngineFIBS::handleMessageNormal(TQString &line, TQString &rawline) actLeave->setEnabled(false); load(); } - else if (line.tqcontains(pat[Reload2])) { - rawline.tqreplace(pat[Reload2], ""); + else if (line.contains(pat[Reload2])) { + rawline.replace(pat[Reload2], ""); emit fibsStartNewGame(rawline); fibsOpt[OptDouble]->setChecked(true); fibsOpt[OptGreedy]->setChecked(false); @@ -1989,7 +1989,7 @@ void KBgEngineFIBS::handleMessageNormal(TQString &line, TQString &rawline) * Opponent offered resignation or the cube. We have to accept * or reject the offer. */ - else if (line.tqcontains(pat[RejAcpt])) { + else if (line.contains(pat[RejAcpt])) { actAccept->setEnabled(true); actReject->setEnabled(true); line += "
  
" + i18n("(or use the corresponding menu " @@ -1999,10 +1999,10 @@ void KBgEngineFIBS::handleMessageNormal(TQString &line, TQString &rawline) * This is strange: FIBS seems to not send a newline at the * end of this pattern. So we work around that. */ - else if (line.tqcontains(pat[YouAcpt])) { + else if (line.contains(pat[YouAcpt])) { actAccept->setEnabled(false); actReject->setEnabled(false); - rawline.tqreplace(pat[YouAcpt], ""); + rawline.replace(pat[YouAcpt], ""); line.truncate(line.length()-rawline.length()); if (!rawline.stripWhiteSpace().isEmpty()) { handleServerData(rawline); @@ -2011,7 +2011,7 @@ void KBgEngineFIBS::handleMessageNormal(TQString &line, TQString &rawline) /* * Ending of games */ - else if (line.tqcontains(pat[EndLose])) { + else if (line.contains(pat[EndLose])) { if (playing) { KNotifyClient::event("game over l", i18n("Sorry, you lost the game.")); if (useAutoMsg[MsgLos] && !autoMsg[MsgLos].stripWhiteSpace().isEmpty()) @@ -2019,7 +2019,7 @@ void KBgEngineFIBS::handleMessageNormal(TQString &line, TQString &rawline) } emit gameOver(); } - else if (line.tqcontains(pat[EndVict])) { + else if (line.contains(pat[EndVict])) { if (playing) { KNotifyClient::event("game over w", i18n("Congratulations, you won the game!")); if (useAutoMsg[MsgWin] && !autoMsg[MsgWin].stripWhiteSpace().isEmpty()) @@ -2027,24 +2027,24 @@ void KBgEngineFIBS::handleMessageNormal(TQString &line, TQString &rawline) } emit gameOver(); } - else if (line.tqcontains(pat[GameSav])) { + else if (line.contains(pat[GameSav])) { emit gameOver(); } /* * User logs out. This has to be signalled to the player * list. Get the true user names by working on the rawline. */ - else if (line.tqcontains(pat[UserLot])) { - rawline.tqreplace(pat[UserLot], ""); - emit fibsLogout(rawline.left(rawline.tqfind(' '))); + else if (line.contains(pat[UserLot])) { + rawline.replace(pat[UserLot], ""); + emit fibsLogout(rawline.left(rawline.find(' '))); return; } /* * Emit the name of the newly logged in user. */ - else if (line.tqcontains(pat[UserLin])) { - rawline.tqreplace(pat[UserLin], ""); - emit fibsLogin(rawline.left(rawline.tqfind(' '))); + else if (line.contains(pat[UserLin])) { + rawline.replace(pat[UserLin], ""); + emit fibsLogin(rawline.left(rawline.find(' '))); return; } /* @@ -2052,11 +2052,11 @@ void KBgEngineFIBS::handleMessageNormal(TQString &line, TQString &rawline) * the 'boardstyle' variable, since we will not be able to display * the board properly without it. */ - else if (line.tqcontains(pat[BoardSY])) { + else if (line.contains(pat[BoardSY])) { // ignored return; } - else if (line.tqcontains(pat[BoardSN])) { + else if (line.contains(pat[BoardSN])) { emit serverString("set boardstyle 3"); emit infoText(TQString("
") + i18n("You should never set the 'boardstyle' variable " @@ -2071,7 +2071,7 @@ void KBgEngineFIBS::handleMessageNormal(TQString &line, TQString &rawline) * hasn't been processed, make it red, since it is a server resp. * to something we just did. */ - else if (line.tqcontains(pat[TwoStar])) { + else if (line.contains(pat[TwoStar])) { line = "" + line + ""; } 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("%1 tells you: %2").tqarg(user).tqarg(cMsg.tqreplace(TQRegExp("^" + user), "")); + if (!d->mGag.contains(user)) { + cMsg = i18n("%1 tells you: %2").tqarg(user).tqarg(cMsg.replace(TQRegExp("^" + user), "")); cMsg = "" + cMsg + ""; 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("%1 shouts: %2").tqarg(user).tqarg(cMsg.tqreplace(TQRegExp("^" + user), "")); + if ((!((KToggleAction *)d->mAct[KBgChatPrivate::Silent])->isChecked()) && (!d->mGag.contains(user))) { + cMsg = i18n("%1 shouts: %2").tqarg(user).tqarg(cMsg.replace(TQRegExp("^" + user), "")); cMsg = "" + cMsg + ""; } else cMsg = ""; break; case CLIP_WHISPERS: - if (!d->mGag.tqcontains(user)) { - cMsg = i18n("%1 whispers: %2").tqarg(user).tqarg(cMsg.tqreplace(TQRegExp("^" + user), "")); + if (!d->mGag.contains(user)) { + cMsg = i18n("%1 whispers: %2").tqarg(user).tqarg(cMsg.replace(TQRegExp("^" + user), "")); cMsg = "" + cMsg + ""; 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("%1 kibitzes: %2").tqarg(user).tqarg(cMsg.tqreplace(TQRegExp("^" + user), "")); + if (!d->mGag.contains(user)) { + cMsg = i18n("%1 kibitzes: %2").tqarg(user).tqarg(cMsg.replace(TQRegExp("^" + user), "")); cMsg = "" + cMsg + ""; emit personalMessage(cMsg); } else @@ -583,7 +583,7 @@ void KBgChat::handleData(const TQString &msg) break; case CLIP_YOU_SAY: - cMsg = i18n("You tell %1: %2").tqarg(user).tqarg(cMsg.tqreplace(TQRegExp("^" + user), "")); + cMsg = i18n("You tell %1: %2").tqarg(user).tqarg(cMsg.replace(TQRegExp("^" + user), "")); cMsg = "" + cMsg + ""; 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("User %1 left a message at %2: %3").tqarg(user).tqarg(date.toString()).tqarg(cMsg); cMsg = "" + cMsg + ""; 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("You say to yourself: ")); } 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(""), ""); - d->mText.tqreplace(TQRegExp(""), ""); - d->mText.tqreplace(TQRegExp("
"), ""); - d->mText.tqreplace(TQRegExp("^.*\">"), ""); + d->mText.replace(TQRegExp(""), ""); + d->mText.replace(TQRegExp(""), ""); + d->mText.replace(TQRegExp(""), ""); + d->mText.replace(TQRegExp("^.*\">"), ""); kapp->clipboard()->setText(d->mText); } diff --git a/kbackgammon/engines/fibs/kplayerlist.cpp b/kbackgammon/engines/fibs/kplayerlist.cpp index a928de7e..72714f4c 100644 --- a/kbackgammon/engines/fibs/kplayerlist.cpp +++ b/kbackgammon/engines/fibs/kplayerlist.cpp @@ -594,7 +594,7 @@ void KFibsPlayerList::showContextMenu(KListView *, TQListViewItem *i, const TQPo if (i && d->mCol[tqStatus]->show) d->mAct[KFibsPlayerListPrivate::BlindAct]->setText - ((i->text(d->mCol[tqStatus]->index).tqcontains(d->mAbrv[Blind])) ? + ((i->text(d->mCol[tqStatus]->index).contains(d->mAbrv[Blind])) ? i18n("Unblind %1").tqarg(d->mUser) : i18n("Blind %1").tqarg(d->mUser)); else d->mAct[KFibsPlayerListPrivate::BlindAct]->setText(i18n("Blind")); @@ -738,9 +738,9 @@ void KFibsPlayerList::changePlayer(const TQString &line) if ((str_entry[j] = entry[j]) == "-") str_entry[j] = ""; } - str_entry[tqStatus].tqreplace(Ready, 1, ready[0] == '0' ? "-" : d->mAbrv[Ready]); - str_entry[tqStatus].tqreplace(Away, 1, away [0] == '0' ? "-" : d->mAbrv[Away ]); - str_entry[tqStatus].tqreplace(Blind, 1, "-"); + str_entry[tqStatus].replace(Ready, 1, ready[0] == '0' ? "-" : d->mAbrv[Ready]); + str_entry[tqStatus].replace(Away, 1, away [0] == '0' ? "-" : d->mAbrv[Away ]); + str_entry[tqStatus].replace(Blind, 1, "-"); // disable drawing until the end of update setUpdatesEnabled(false); @@ -758,9 +758,9 @@ void KFibsPlayerList::changePlayer(const TQString &line) i = new KFibsPlayerListLVI(this); // count the KFibs and KBackgammon clients - if (str_entry[Client].tqcontains("KFibs")) + if (str_entry[Client].contains("KFibs")) d->mCount[0]++; - else if (str_entry[Client].tqcontains(PROG_NAME)) + else if (str_entry[Client].contains(PROG_NAME)) d->mCount[1]++; // new entry requires an update to the player count @@ -771,7 +771,7 @@ void KFibsPlayerList::changePlayer(const TQString &line) found: // getting here means the player is in the list - update private status - str_entry[tqStatus].tqreplace(Blind,1,i->text(tqStatus).tqcontains + str_entry[tqStatus].replace(Blind,1,i->text(tqStatus).contains (d->mAbrv[Blind]) ? d->mAbrv[Blind] : "-"); update: @@ -794,9 +794,9 @@ void KFibsPlayerList::deletePlayer(const TQString &player) TQListViewItemIterator it(this); for ( ; it.current(); ++it) { if (it.current()->text(0) == player) { - if (it.current()->text(Client).tqcontains(PROG_NAME)) + if (it.current()->text(Client).contains(PROG_NAME)) --d->mCount[1]; - else if (it.current()->text(Client).tqcontains("KFibs")) + else if (it.current()->text(Client).contains("KFibs")) --d->mCount[0]; delete it.current(); updateCaption(); @@ -827,7 +827,7 @@ void KFibsPlayerList::changePlayertqStatus(const TQString &player, int stat, boo /* * Update the status flag */ - i->setText(tqStatus, i->text(tqStatus).tqreplace(stat, 1, (flag) ? d->mAbrv[stat] : "-")); + i->setText(tqStatus, i->text(tqStatus).replace(stat, 1, (flag) ? d->mAbrv[stat] : "-")); } 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(); diff --git a/kbackgammon/engines/offline/kbgoffline.cpp b/kbackgammon/engines/offline/kbgoffline.cpp index 14197f54..8dd93a7c 100644 --- a/kbackgammon/engines/offline/kbgoffline.cpp +++ b/kbackgammon/engines/offline/kbgoffline.cpp @@ -484,7 +484,7 @@ void KBgEngineOffline::redo() void KBgEngineOffline::handleMove(TQString *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(); @@ -510,22 +510,22 @@ void KBgEngineOffline::handleMove(TQString *s) */ for (int i = 0; i < moves; i++) { bool kick = false; - t = s->mid(index, s->tqfind(' ', index) - index); + t = s->mid(index, s->find(' ', index) - index); index += 1 + t.length(); char c = '-'; - if (t.tqcontains('+')) { + if (t.contains('+')) { c = '+'; kick = true; } - TQString r = t.left(t.tqfind(c)); - if (r.tqcontains("bar")) { + TQString r = t.left(t.find(c)); + if (r.contains("bar")) { d->mGame[0].setBar(d->mRoll, abs(d->mGame[0].bar(d->mRoll)) - 1); } else { int from = r.toInt(); d->mGame[0].setBoard(from, d->mRoll, abs(d->mGame[0].board(from)) - 1); } t.remove(0, 1 + r.length()); - if (t.tqcontains("off")) { + if (t.contains("off")) { d->mGame[0].setHome(d->mRoll, abs(d->mGame[0].home(d->mRoll)) + 1); } else { int to = t.toInt(); diff --git a/kbackgammon/kbgboard.cpp b/kbackgammon/kbgboard.cpp index 85c0a3a9..a065ec40 100644 --- a/kbackgammon/kbgboard.cpp +++ b/kbackgammon/kbgboard.cpp @@ -1166,7 +1166,7 @@ void KBgBoardBar::mouseDoubleClickEvent(TQMouseEvent *e) { TQRect r = cubeRect(cellID == BAR_THEM ? CUBE_UPPER : CUBE_LOWER, true); if (board->canDouble(US) && - board->canDouble(THEM) && r.tqcontains(e->pos())) { + board->canDouble(THEM) && r.contains(e->pos())) { if (board->getEditMode()) board->queryCube(); else @@ -1332,7 +1332,7 @@ void KBgBoardHome::mouseDoubleClickEvent(TQMouseEvent * e) US : THEM); for (int i = 0; i < 2; ++i) { TQRect r = diceRect(i, true); - if (r.tqcontains(e->pos())) { + if (r.contains(e->pos())) { if (board->getEditMode()) { KBgBoardQDice *dlg = new KBgBoardQDice(); @@ -1356,7 +1356,7 @@ void KBgBoardHome::mouseDoubleClickEvent(TQMouseEvent * e) if (board->canDouble(w) && !(board->canDouble(US) && board->canDouble(THEM))) { TQRect r = cubeRect(w, true); - if (r.tqcontains(e->pos())) + if (r.contains(e->pos())) if (board->getEditMode()) board->queryCube(); else @@ -1367,7 +1367,7 @@ void KBgBoardHome::mouseDoubleClickEvent(TQMouseEvent * e) /* * This function determines if a checker can be dropped on this field. - * It checks whether the field is already owned, empty or tqcontains + * It checks whether the field is already owned, empty or contains * only one opponents piece. Then the dice are checked. */ bool KBgBoardField::dropPossible(int fromCellID, int newColor) @@ -1435,7 +1435,7 @@ bool KBgBoard::moveOffPossible() const KBgBoardCell* KBgBoard::getCellByPos(const TQPoint& p) const { for (int i = 0; i < 30; ++i) { - if (TQT_TQRECT_OBJECT(cells[i]->rect()).tqcontains(cells[i]->mapFromParent(p))) + if (TQT_TQRECT_OBJECT(cells[i]->rect()).contains(cells[i]->mapFromParent(p))) return cells[i]; } return NULL; diff --git a/kbattleship/kbattleship/kbattleshipclient.cpp b/kbattleship/kbattleship/kbattleshipclient.cpp index 550323b1..d895e934 100644 --- a/kbattleship/kbattleship/kbattleshipclient.cpp +++ b/kbattleship/kbattleship/kbattleshipclient.cpp @@ -73,7 +73,7 @@ void KBattleshipClient::slotReadData() m_readBuffer += TQString::fromUtf8(buf); delete []buf; int pos; - while ((pos = m_readBuffer.tqfind("")) >= 0) + while ((pos = m_readBuffer.find("")) >= 0) { pos += 11; // Length of "" KMessage *msg = new KMessage(); diff --git a/kbattleship/kbattleship/kbattleshipserver.cpp b/kbattleship/kbattleship/kbattleshipserver.cpp index 34be153d..7b10d4fd 100644 --- a/kbattleship/kbattleship/kbattleshipserver.cpp +++ b/kbattleship/kbattleship/kbattleshipserver.cpp @@ -85,7 +85,7 @@ void KBattleshipServer::slotReadClient() m_readBuffer += TQString::fromUtf8(buf); delete []buf; int pos; - while ((pos = m_readBuffer.tqfind("")) >= 0) + while ((pos = m_readBuffer.find("")) >= 0) { pos += 11; // Length of "" KMessage *msg = new KMessage(); diff --git a/kbattleship/kbattleship/kbattleshipview.cpp b/kbattleship/kbattleship/kbattleshipview.cpp index 35e1a06a..2c4bb1ca 100644 --- a/kbattleship/kbattleship/kbattleshipview.cpp +++ b/kbattleship/kbattleship/kbattleshipview.cpp @@ -190,9 +190,9 @@ bool KBattleshipView::eventFilter(TQObject *object, TQEvent *event) int fieldx = 0; int fieldy = 0; - if(ownRect.tqcontains(point)) + if(ownRect.contains(point)) newRect = ownRect; - else if(enemyRect.tqcontains(point)) + else if(enemyRect.contains(point)) newRect = enemyRect; else return false; @@ -204,7 +204,7 @@ bool KBattleshipView::eventFilter(TQObject *object, TQEvent *event) j++; TQRect tempRect(i, newRect.top(), m_battlefield->gridSize(), newRect.bottom() - newRect.top()); - if(tempRect.tqcontains(point)) + if(tempRect.contains(point)) { fieldx = j; break; @@ -218,7 +218,7 @@ bool KBattleshipView::eventFilter(TQObject *object, TQEvent *event) j++; TQRect tempRect(newRect.left(), i, newRect.right() - newRect.left(), m_battlefield->gridSize()); - if(tempRect.tqcontains(point)) + if(tempRect.contains(point)) { fieldy = j; break; @@ -245,7 +245,7 @@ bool KBattleshipView::eventFilter(TQObject *object, TQEvent *event) int fieldx = 0; int fieldy = 0; - if(ownRect.tqcontains(point)) + if(ownRect.contains(point)) { int j = -1; @@ -254,7 +254,7 @@ bool KBattleshipView::eventFilter(TQObject *object, TQEvent *event) j++; TQRect tempRect(i, ownRect.top(), m_battlefield->gridSize(), ownRect.bottom() - ownRect.top()); - if(tempRect.tqcontains(point)) + if(tempRect.contains(point)) { fieldx = j; break; @@ -268,7 +268,7 @@ bool KBattleshipView::eventFilter(TQObject *object, TQEvent *event) j++; TQRect tempRect(ownRect.left(), i, ownRect.right() - ownRect.left(), m_battlefield->gridSize()); - if(tempRect.tqcontains(point)) + if(tempRect.contains(point)) { fieldy = j; break; diff --git a/kbattleship/kbattleship/kbdestroyshipstrategy.cpp b/kbattleship/kbattleship/kbdestroyshipstrategy.cpp index 05095311..528d18b2 100644 --- a/kbattleship/kbattleship/kbdestroyshipstrategy.cpp +++ b/kbattleship/kbattleship/kbdestroyshipstrategy.cpp @@ -320,7 +320,7 @@ void KBDestroyShipStrategy::markBorderingFields() if (m_direction == VERTICAL) { - while (m_fieldRect.tqcontains(col, row) && + while (m_fieldRect.contains(col, row) && m_battleField->ownState(col, row) == KBattleField::HIT) { row--; @@ -332,24 +332,24 @@ void KBDestroyShipStrategy::markBorderingFields() row++; i = col+1; // right of the ship j = col-1; // left of the ship - while (m_fieldRect.tqcontains(col, row) && + while (m_fieldRect.contains(col, row) && m_battleField->ownState(col, row) == KBattleField::HIT) { - if (m_fieldRect.tqcontains(i, row)) + if (m_fieldRect.contains(i, row)) setViablePos(i, row, false); - if (m_fieldRect.tqcontains(j, row)) + if (m_fieldRect.contains(j, row)) setViablePos(j, row, false); setViablePos(col, row, false); row++; } - if (m_fieldRect.tqcontains(col, row)) + if (m_fieldRect.contains(col, row)) { // below the ship setViablePos(col, row, false); } } else if (m_direction == HORIZONTAL) { - while (m_fieldRect.tqcontains(col, row) && + while (m_fieldRect.contains(col, row) && m_battleField->ownState(col, row) == KBattleField::HIT) { col--; @@ -361,17 +361,17 @@ void KBDestroyShipStrategy::markBorderingFields() col++; i = row+1; // below the ship j = row-1; // above the ship - while (m_fieldRect.tqcontains(col, row) && + while (m_fieldRect.contains(col, row) && m_battleField->ownState(col, row) == KBattleField::HIT) { - if (m_fieldRect.tqcontains(col, i)) + if (m_fieldRect.contains(col, i)) setViablePos(col, i, false); - if (m_fieldRect.tqcontains(col, j)) + if (m_fieldRect.contains(col, j)) setViablePos(col, j, false); setViablePos(col, row, false); col++; } - if (m_fieldRect.tqcontains(col, row)) + if (m_fieldRect.contains(col, row)) { // right of the ship setViablePos(col, row, false); } diff --git a/kbattleship/kbattleship/kbdiagonalshotstrategy.cpp b/kbattleship/kbattleship/kbdiagonalshotstrategy.cpp index 57dc317d..0f5e6284 100644 --- a/kbattleship/kbattleship/kbdiagonalshotstrategy.cpp +++ b/kbattleship/kbattleship/kbdiagonalshotstrategy.cpp @@ -34,7 +34,7 @@ const TQPoint KBDiagonalShotStrategy::nextShot() bool KBDiagonalShotStrategy::advance() { - while (m_fieldRect.tqcontains(m_column, m_row)) + while (m_fieldRect.contains(m_column, m_row)) { if(enemyFieldStateAt(m_column, m_row) != KBStrategy::SHOT) return true; @@ -97,7 +97,7 @@ TQPoint KBDiagonalShotStrategy::endPoint() if(m_vertical == 0 || m_horizontal == 0) return TQPoint(col, row); - while(m_fieldRect.tqcontains(col, row)) + while(m_fieldRect.contains(col, row)) { row += m_vertical; col += m_horizontal; diff --git a/kbattleship/kbattleship/kship.cpp b/kbattleship/kbattleship/kship.cpp index 05e893b3..a9fbb558 100644 --- a/kbattleship/kbattleship/kship.cpp +++ b/kbattleship/kbattleship/kship.cpp @@ -60,7 +60,7 @@ bool KShip::placedLeft() return m_placedLeft; } -bool KShip::tqcontains(int x, int y) +bool KShip::contains(int x, int y) { return (x >= m_shipxstart && x <= m_shipxstop) && (y >= m_shipystart && y <= m_shipystop); } @@ -69,7 +69,7 @@ int KShip::shipTypeEnum(int x, int y) { int ret; ret = KBattleField::WATER; - if (tqcontains(x, y)) + if (contains(x, y)) { switch(m_shiptype) { diff --git a/kbattleship/kbattleship/kship.h b/kbattleship/kbattleship/kship.h index 6d60ac62..df436c7a 100644 --- a/kbattleship/kbattleship/kship.h +++ b/kbattleship/kbattleship/kship.h @@ -32,7 +32,7 @@ public: int shipTypeEnum(int x, int y); bool placedLeft(); - bool tqcontains(int x, int y); + bool contains(int x, int y); private: int m_shipxstart; diff --git a/kbattleship/kbattleship/kshiplist.cpp b/kbattleship/kbattleship/kshiplist.cpp index b28f95f4..e490fd0a 100644 --- a/kbattleship/kbattleship/kshiplist.cpp +++ b/kbattleship/kbattleship/kshiplist.cpp @@ -126,20 +126,20 @@ bool KShipList::addNewShip(bool vertical, int fieldx, int fieldy) { TQRect ship = vertical ? TQRect(fieldx, fieldy, 1, m_shipsadded) : TQRect(fieldx, fieldy, m_shipsadded, 1); TQRect field = TQRect(0, 0, m_fieldx, m_fieldy); - if(!field.tqcontains(ship)) + if(!field.contains(ship)) return false; for(KShip *placedShip = m_shiplist.first(); placedShip != 0; placedShip = m_shiplist.next()) { for(int i = fieldx-1; i < (fieldx + ship.width()+1); i++) { - if(placedShip->tqcontains(i, fieldy - 1) || placedShip->tqcontains(i, fieldy + ship.height())) + if(placedShip->contains(i, fieldy - 1) || placedShip->contains(i, fieldy + ship.height())) return false; } for(int i = fieldy-1; i < (fieldy + ship.height()+1); i++) { - if(placedShip->tqcontains(fieldx - 1, i) || placedShip->tqcontains(fieldx + ship.width(), i)) + if(placedShip->contains(fieldx - 1, i) || placedShip->contains(fieldx + ship.width(), i)) return false; } } diff --git a/kenolaba/Board.cpp b/kenolaba/Board.cpp index 119557d2..d939ad09 100644 --- a/kenolaba/Board.cpp +++ b/kenolaba/Board.cpp @@ -1386,13 +1386,13 @@ int Board::setASCIIState(const TQString& state) int color2Count = 0; /* get moveNo if supplied */ - if ((index = state.tqfind("#"))>=0) + if ((index = state.find("#"))>=0) moveNo = state.mid(index+1,3).toInt(); int f=12, row=0, rowEnd = 17; char c = ' '; - index=state.tqfind("/"); + index=state.find("/"); while(index>=0) { @@ -1420,17 +1420,17 @@ int Board::setASCIIState(const TQString& state) if (f == rowEnd) { row++; if (row <4) { - index = state.tqfind("/",index); + index = state.find("/",index); f = 12 + row*11; rowEnd = row*12+17; } else if (row==4) { - index = state.tqfind("|",index); + index = state.find("|",index); f = 56; rowEnd = 65; } else if (row <9) { - index = state.tqfind("\\",index); + index = state.find("\\",index); f = 8 + row*12; rowEnd = 21 + row*11; } diff --git a/kenolaba/EvalDlgImpl.cpp b/kenolaba/EvalDlgImpl.cpp index e0ab3006..14d0d0ac 100644 --- a/kenolaba/EvalDlgImpl.cpp +++ b/kenolaba/EvalDlgImpl.cpp @@ -254,10 +254,10 @@ void EvalDlgImpl::saveas() KConfig* config = kapp->config(); config->setGroup("General"); TQStringList list = config->readListEntry("EvalSchemes"); - TQListBoxItem *it = evalList->tqfindItem(name); + TQListBoxItem *it = evalList->findItem(name); if (!it) { evalList->insertItem(name); - it = evalList->tqfindItem(name); + it = evalList->findItem(name); list << name; config->writeEntry("EvalSchemes", list); } diff --git a/kenolaba/EvalScheme.cpp b/kenolaba/EvalScheme.cpp index 063ca5f2..0d179a85 100644 --- a/kenolaba/EvalScheme.cpp +++ b/kenolaba/EvalScheme.cpp @@ -184,7 +184,7 @@ void EvalScheme::setInARowValue(int stones, int value) EvalScheme* EvalScheme::create(TQString scheme) { - int pos = scheme.tqfind('='); + int pos = scheme.find('='); if (pos<0) return 0; EvalScheme* evalScheme = new EvalScheme( scheme.left(pos) ); diff --git a/kgoldrunner/src/kgoldrunner.cpp b/kgoldrunner/src/kgoldrunner.cpp index 7d5676c5..64dc6269 100644 --- a/kgoldrunner/src/kgoldrunner.cpp +++ b/kgoldrunner/src/kgoldrunner.cpp @@ -522,7 +522,7 @@ void KGoldrunner::initStatusBar() // Set the PAUSE/RESUME key-names into the status bar message. pauseKeys = myPause->shortcut().toString(); - pauseKeys = pauseKeys.tqreplace (';', "\" " + i18n("or") + " \""); + pauseKeys = pauseKeys.replace (';', "\" " + i18n("or") + " \""); gameFreeze (FALSE); statusBar()->setItemFixed (ID_LIVES, -1); // Fix current sizes. @@ -760,7 +760,7 @@ void KGoldrunner::optionsConfigureKeys() // Update the PAUSE/RESUME message in the status bar. pauseKeys = myPause->shortcut().toString(); - pauseKeys = pauseKeys.tqreplace (';', "\" " + i18n("or") + " \""); + pauseKeys = pauseKeys.replace (';', "\" " + i18n("or") + " \""); gameFreeze (KGrObject::frozen); // Refresh the status bar text. } diff --git a/kgoldrunner/src/kgrdialog.cpp b/kgoldrunner/src/kgrdialog.cpp index 011f56dc..ac6c5ce4 100644 --- a/kgoldrunner/src/kgrdialog.cpp +++ b/kgoldrunner/src/kgrdialog.cpp @@ -825,7 +825,7 @@ KGrLGDialog::KGrLGDialog (TQFile * savedGames, // Read the saved games into the list box. while (! gameText.endData()) { s = gameText.readLine(); // Read in one saved game. - pr = s.left (s.tqfind (" ", 0, FALSE)); // Get the collection prefix. + pr = s.left (s.find (" ", 0, FALSE)); // Get the collection prefix. for (i = 0; i < imax; i++) { // Get the collection name. if (collections.at(i)->prefix == pr) { s = s.insert (0, diff --git a/kgoldrunner/src/kgrgame.cpp b/kgoldrunner/src/kgrgame.cpp index b83b35ed..930bd83f 100644 --- a/kgoldrunner/src/kgrgame.cpp +++ b/kgoldrunner/src/kgrgame.cpp @@ -876,7 +876,7 @@ void KGrGame::loadGame() // Re-load game, score and level. if (! s.isNull()) { pr = s.mid (21, 7); // Get the collection prefix. - pr = pr.left (pr.tqfind (" ", 0, FALSE)); + pr = pr.left (pr.find (" ", 0, FALSE)); for (i = 0; i < imax; i++) { // Find the collection. if (collections.at(i)->prefix == pr) { @@ -1061,7 +1061,7 @@ void KGrGame::checkHighScore() s1 >> prevDate; if ((! scoreRecorded) && (score > prevScore)) { highCount++; - // Recode the user's name as UTF-8, in case it tqcontains + // Recode the user's name as UTF-8, in case it contains // non-ASCII chars (e.g. "Kr�ger" is encoded as "Krüger"). s2 << (const char *) thisUser.utf8(); s2 << (TQ_INT16) level; @@ -1080,7 +1080,7 @@ void KGrGame::checkHighScore() delete prevDate; } if ((! scoreRecorded) && (highCount < 10)) { - // Recode the user's name as UTF-8, in case it tqcontains + // Recode the user's name as UTF-8, in case it contains // non-ASCII chars (e.g. "Kr�ger" is encoded as "Krüger"). s2 << (const char *) thisUser.utf8(); s2 << (TQ_INT16) level; @@ -1090,7 +1090,7 @@ void KGrGame::checkHighScore() high1.close(); } else { - // Recode the user's name as UTF-8, in case it tqcontains + // Recode the user's name as UTF-8, in case it contains // non-ASCII chars (e.g. "Kr�ger" is encoded as "Krüger"). s2 << (const char *) thisUser.utf8(); s2 << (TQ_INT16) level; @@ -2496,9 +2496,9 @@ bool KGrGame::loadCollections (Owner o) line = line.simplifyWhiteSpace(); int i, j, len; len = line.length(); - i = 0; j = line.tqfind(' ',i); nLevels = line.left(j).toInt(); - i = j+1; j = line.tqfind(' ',i); settings = line[i]; - i = j+1; j = line.tqfind(' ',i); prefix = line.mid(i,j-i); + i = 0; j = line.find(' ',i); nLevels = line.left(j).toInt(); + i = j+1; j = line.find(' ',i); settings = line[i]; + i = j+1; j = line.find(' ',i); prefix = line.mid(i,j-i); i = j+1; name = line.right(len-i); } // If first character is not a digit, the line should be an "about". diff --git a/klines/klines.cpp b/klines/klines.cpp index 848f6ffa..bebc14fe 100644 --- a/klines/klines.cpp +++ b/klines/klines.cpp @@ -380,7 +380,7 @@ void KLines::slotDemo() if (!msg.isEmpty()) { lsb->showDemoText(msg); - demoTimer.start(3500 + msg.tqcontains("\n")*1500, true); + demoTimer.start(3500 + msg.contains("\n")*1500, true); return; } if (newBalls) diff --git a/kmahjongg/Preview.cpp b/kmahjongg/Preview.cpp index b99b3fd3..0904c750 100644 --- a/kmahjongg/Preview.cpp +++ b/kmahjongg/Preview.cpp @@ -216,29 +216,29 @@ void Preview::drawPreview() in.close(); tile = tilesetRaw; - tile.tqreplace(":", "/kmahjongg/pics/"); + tile.replace(":", "/kmahjongg/pics/"); if (!TQFile::exists(tile)) { tile = tilesetRaw; - tile = "pics/" + tile.right(tile.length() - tile.tqfind(":") - 1 ); + tile = "pics/" + tile.right(tile.length() - tile.find(":") - 1 ); tile = locate("appdata", tile); } back = backRaw; - back.tqreplace(":", "/kmahjongg/pics/"); + back.replace(":", "/kmahjongg/pics/"); if (!TQFile::exists(back)) { back = backRaw; - back = "pics/" + back.right(back.length() - back.tqfind(":") - 1); + back = "pics/" + back.right(back.length() - back.find(":") - 1); back = locate("appdata", back); } tqlayout = layoutRaw; - tqlayout.tqreplace(":", "/kmahjongg/pics/"); + tqlayout.replace(":", "/kmahjongg/pics/"); if (!TQFile::exists(tqlayout)) { tqlayout = layoutRaw; - tqlayout = "pics/" + tqlayout.right(tqlayout.length() - tqlayout.tqfind(":") - 1); + tqlayout = "pics/" + tqlayout.right(tqlayout.length() - tqlayout.find(":") - 1); tqlayout = locate("appdata", tqlayout); } @@ -373,9 +373,9 @@ void Preview::saveTheme() { // with a + TQRegExp p(locate("data_dir", "/kmahjongg/pics/")); - back.tqreplace(p,with); - tile.tqreplace(p,with); - tqlayout.tqreplace(p,with); + back.replace(p,with); + tile.replace(p,with); + tqlayout.replace(p,with); // Get the name of the file to save diff --git a/kolf/ball.cpp b/kolf/ball.cpp index 0e25422b..7235edf3 100644 --- a/kolf/ball.cpp +++ b/kolf/ball.cpp @@ -249,7 +249,7 @@ void Ball::collisionDetect(double oldx, double oldy) m_collisionLock = true; // move this ball to where it was barely touching double ballAngle = m_vector.direction(); - while (collisions(true).tqcontains(item) > 0) + while (collisions(true).contains(item) > 0) move(x() - cos(ballAngle) / 2.0, y() + sin(ballAngle) / 2.0); // make a 2 pixel separation diff --git a/kolf/game.cpp b/kolf/game.cpp index a6f02a79..32ebb9be 100644 --- a/kolf/game.cpp +++ b/kolf/game.cpp @@ -838,7 +838,7 @@ Puddle::Puddle(TQCanvas *canvas) TQBrush brush; TQPixmap pic; - if (!TQPixmapCache::tqfind("puddle", pic)) + if (!TQPixmapCache::find("puddle", pic)) { pic.load(locate("appdata", "pics/puddle.png")); TQPixmapCache::insert("puddle", pic); @@ -891,7 +891,7 @@ Sand::Sand(TQCanvas *canvas) TQBrush brush; TQPixmap pic; - if (!TQPixmapCache::tqfind("sand", pic)) + if (!TQPixmapCache::find("sand", pic)) { pic.load(locate("appdata", "pics/sand.png")); TQPixmapCache::insert("sand", pic); @@ -990,7 +990,7 @@ void Putter::setOrigin(int _x, int _y) void Putter::setAngle(Ball *ball) { - angle = angleMap.tqcontains(ball)? angleMap[ball] : 0; + angle = angleMap.contains(ball)? angleMap[ball] : 0; finishMe(); } @@ -1182,7 +1182,7 @@ HoleResult Hole::result(TQPoint p, double s, bool * /*wasCenter*/) Cup::Cup(TQCanvas *canvas) : Hole(TQColor("#808080"), canvas) { - if (!TQPixmapCache::tqfind("cup", pixmap)) + if (!TQPixmapCache::find("cup", pixmap)) { pixmap.load(locate("appdata", "pics/cup.png")); TQPixmapCache::insert("cup", pixmap); @@ -2207,7 +2207,7 @@ KolfGame::KolfGame(ObjectList *obj, PlayerList *players, TQString filename, TQWi course->resize(width, height); TQPixmap pic; - if (!TQPixmapCache::tqfind("grass", pic)) + if (!TQPixmapCache::find("grass", pic)) { pic.load(locate("appdata", "pics/grass.png")); TQPixmapCache::insert("grass", pic); @@ -2430,7 +2430,7 @@ void KolfGame::handleMousePressEvent(TQMouseEvent *e) return; } // only items we keep track of - if ((!(items.tqcontainsRef(list.first()) || list.first() == whiteBall || extraMoveable.tqcontainsRef(list.first())))) + if ((!(items.containsRef(list.first()) || list.first() == whiteBall || extraMoveable.containsRef(list.first())))) { emit newSelectedItem(&holeInfo); return; @@ -2785,7 +2785,7 @@ void KolfGame::timeout() // later undo the shot for (PlayerList::Iterator it = players->begin(); it != players->end(); ++it) { - if (!course->rect().tqcontains(TQPoint((*it).ball()->x(), (*it).ball()->y()))) + if (!course->rect().contains(TQPoint((*it).ball()->x(), (*it).ball()->y()))) { (*it).ball()->setState(Stopped); @@ -3533,12 +3533,12 @@ void KolfGame::openFile() cfg->setGroup(*it); const int len = (*it).length(); - const int dashIndex = (*it).tqfind("-"); + const int dashIndex = (*it).find("-"); const int holeNum = (*it).left(dashIndex).toInt(); if (holeNum > _highestHole) _highestHole = holeNum; - const int atIndex = (*it).tqfind("@"); + const int atIndex = (*it).find("@"); const TQString name = (*it).mid(dashIndex + 1, atIndex - (dashIndex + 1)); if (holeNum != curHole) @@ -3552,8 +3552,8 @@ void KolfGame::openFile() numItems++; - const int commaIndex = (*it).tqfind(","); - const int pipeIndex = (*it).tqfind("|"); + const int commaIndex = (*it).find(","); + const int pipeIndex = (*it).find("|"); const int x = (*it).mid(atIndex + 1, commaIndex - (atIndex + 1)).toInt(); const int y = (*it).mid(commaIndex + 1, pipeIndex - (commaIndex + 1)).toInt(); @@ -3610,7 +3610,7 @@ void KolfGame::openFile() break; } - if (!loaded && name != "hole" && missingPlugins.tqcontains(name) <= 0) + if (!loaded && name != "hole" && missingPlugins.contains(name) <= 0) missingPlugins.append(name); } @@ -3978,7 +3978,7 @@ void KolfGame::save() // wipe out all groups from this hole for (TQStringList::Iterator it = groups.begin(); it != groups.end(); ++it) { - int holeNum = (*it).left((*it).tqfind("-")).toInt(); + int holeNum = (*it).left((*it).find("-")).toInt(); if (holeNum == curHole) cfg->deleteGroup(*it); } diff --git a/kolf/kcomboboxdialog.cpp b/kolf/kcomboboxdialog.cpp index 133edb01..1dfe8a79 100644 --- a/kolf/kcomboboxdialog.cpp +++ b/kolf/kcomboboxdialog.cpp @@ -90,7 +90,7 @@ TQString KComboBoxDialog::getItem( const TQString &_text, const TQString &_capti config->setGroup( "Notification Messages" ); prevAnswer = config->readEntry( dontAskAgainName ); if ( !prevAnswer.isEmpty() ) - if ( _items.tqcontains( prevAnswer ) > 0 ) + if ( _items.contains( prevAnswer ) > 0 ) return prevAnswer; } diff --git a/kolf/newgame.cpp b/kolf/newgame.cpp index 2fd048c1..5badc856 100644 --- a/kolf/newgame.cpp +++ b/kolf/newgame.cpp @@ -57,7 +57,7 @@ NewGameDialog::NewGameDialog(bool enableCourses, TQWidget *tqparent, const char scroller = new TQScrollView(playerPage); bigLayout->addWidget(scroller); tqlayout = new TQVBox(scroller->viewport()); - if (!TQPixmapCache::tqfind("grass", grass)) + if (!TQPixmapCache::find("grass", grass)) { grass.load(locate("appdata", "pics/grass.png")); TQPixmapCache::insert("grass", grass); @@ -235,7 +235,7 @@ void NewGameDialog::removeCourse() return; TQString file = *names.at(curItem); - if (externCourses.tqcontains(file) < 1) + if (externCourses.contains(file) < 1) return; names.remove(file); @@ -248,7 +248,7 @@ void NewGameDialog::removeCourse() void NewGameDialog::selectionChanged() { const int curItem = courseList->currentItem(); - remove->setEnabled(!(curItem < 0 || externCourses.tqcontains(*names.at(curItem)) < 1)); + remove->setEnabled(!(curItem < 0 || externCourses.contains(*names.at(curItem)) < 1)); } void NewGameDialog::addCourse() @@ -259,7 +259,7 @@ void NewGameDialog::addCourse() for (TQStringList::Iterator fileIt = files.begin(); fileIt != files.end(); ++fileIt) { - if (names.tqcontains(*fileIt) > 0) + if (names.contains(*fileIt) > 0) { hasDuplicates = true; continue; @@ -316,7 +316,7 @@ PlayerEditor::PlayerEditor(TQString startName, TQColor startColor, TQWidget *tqp { TQHBoxLayout *tqlayout = new TQHBoxLayout(this, KDialogBase::spacingHint()); - if (!TQPixmapCache::tqfind("grass", grass)) + if (!TQPixmapCache::find("grass", grass)) { grass.load(locate("appdata", "pics/grass.png")); TQPixmapCache::insert("grass", grass); diff --git a/kolf/slope.cpp b/kolf/slope.cpp index dd40cc49..7d9db148 100644 --- a/kolf/slope.cpp +++ b/kolf/slope.cpp @@ -34,7 +34,7 @@ Slope::Slope(TQRect rect, TQCanvas *canvas) setZ(-50); - if (!TQPixmapCache::tqfind("grass", grass)) + if (!TQPixmapCache::find("grass", grass)) { grass.load(locate("appdata", "pics/grass.png")); TQPixmapCache::insert("grass", grass); diff --git a/kpat/dealer.cpp b/kpat/dealer.cpp index d53b7d3a..c1ae25e7 100644 --- a/kpat/dealer.cpp +++ b/kpat/dealer.cpp @@ -249,7 +249,7 @@ void Dealer::newHint(MoveHint *mh) bool Dealer::isMoving(Card *c) const { - return movingCards.tqfind(c) != movingCards.end(); + return movingCards.find(c) != movingCards.end(); } void Dealer::contentsMouseMoveEvent(TQMouseEvent* e) @@ -277,13 +277,13 @@ void Dealer::contentsMouseMoveEvent(TQMouseEvent* e) continue; if (c->source() == movingCards.first()->source()) continue; - if (sources.tqfindIndex(c->source()) != -1) + if (sources.findIndex(c->source()) != -1) continue; sources.append(c->source()); } else { if ((*it)->rtti() == Pile::RTTI) { Pile *p = static_cast(*it); - if (p->isEmpty() && !sources.tqcontains(p)) + if (p->isEmpty() && !sources.contains(p)) sources.append(p); } else { kdDebug(11111) << "unknown object " << *it << " " << (*it)->rtti() << endl; @@ -314,7 +314,7 @@ void Dealer::contentsMouseMoveEvent(TQMouseEvent* e) void Dealer::mark(Card *c) { c->setSelected(true); - if (!marked.tqcontains(c)) + if (!marked.contains(c)) marked.append(c); } diff --git a/kpat/gamestatsimpl.cpp b/kpat/gamestatsimpl.cpp index 59e37b79..2850da01 100644 --- a/kpat/gamestatsimpl.cpp +++ b/kpat/gamestatsimpl.cpp @@ -24,7 +24,7 @@ GameStatsImpl::GameStatsImpl(TQWidget* aParent, const char* aname) if (list.count() <= i) list.append("unknown"); list[index] = i18n((*it)->name); - list[index].tqreplace('&',""); + list[index].replace('&',""); } GameType->insertStringList(list); showGameType(0); diff --git a/kpat/klondike.cpp b/kpat/klondike.cpp index 1e0d0b79..93514d2f 100644 --- a/kpat/klondike.cpp +++ b/kpat/klondike.cpp @@ -42,7 +42,7 @@ public: } virtual TQSize cardOffset( bool _spread, bool, const Card *c) const { kdDebug(11111) << "cardOffset " << _spread << " " << (c? c->name() : "(null)") << endl; - if (cardlist.tqcontains(const_cast(c))) + if (cardlist.contains(const_cast(c))) return TQSize(+dspread(), 0); return TQSize(0, 0); } diff --git a/kpat/pile.cpp b/kpat/pile.cpp index 8d34325e..fab94efa 100644 --- a/kpat/pile.cpp +++ b/kpat/pile.cpp @@ -218,7 +218,7 @@ void Pile::moveBy(double dx, double dy) int Pile::indexOf(const Card *c) const { assert(c->source() == this); - return m_cards.tqfindIndex(const_cast(c)); // the list is of non-const cards + return m_cards.findIndex(const_cast(c)); // the list is of non-const cards } Card *Pile::at(int index) const @@ -338,7 +338,7 @@ void Pile::add( Card* _card, bool _facedown, bool _spread ) void Pile::remove(Card *c) { - assert(m_cards.tqcontains(c)); + assert(m_cards.contains(c)); m_cards.remove(c); } diff --git a/kpat/pwidget.cpp b/kpat/pwidget.cpp index e8353dee..4fc36295 100644 --- a/kpat/pwidget.cpp +++ b/kpat/pwidget.cpp @@ -114,7 +114,7 @@ pWidget::pWidget() TQStringList list2; for (TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it) { TQString file = *it; - int rindex = file.tqfindRev('.'); + int rindex = file.findRev('.'); if (rindex != -1) { TQString ext = file.mid(rindex + 1).lower(); if (ext == "jpeg" || ext == "png" || ext == "jpg") { @@ -125,7 +125,7 @@ pWidget::pWidget() } wallpapers->setItems(list2); - wallpapers->setCurrentItem(list2.tqfindIndex("No-Ones-Laughing-3")); + wallpapers->setCurrentItem(list2.findIndex("No-Ones-Laughing-3")); changeWallpaper(); @@ -344,8 +344,8 @@ void pWidget::newGameType() if ((*it)->gameindex == id) { dill = (*it)->createGame(this); TQString name = (*it)->name; - name = name.tqreplace(TQRegExp("[&']"), ""); - name = name.tqreplace(TQRegExp("[ ]"), "_").lower(); + name = name.replace(TQRegExp("[&']"), ""); + name = name.replace(TQRegExp("[ ]"), "_").lower(); dill->setAnchorName("game_" + name); connect(dill, TQT_SIGNAL(saveGame()), TQT_SLOT(saveGame())); connect(dill, TQT_SIGNAL(gameInfo(const TQString&)), diff --git a/kpoker/kpoker.cpp b/kpoker/kpoker.cpp index bb0a9fe3..295a3c06 100644 --- a/kpoker/kpoker.cpp +++ b/kpoker/kpoker.cpp @@ -88,7 +88,7 @@ PokerGame::dealCards(PokerPlayer *player, bool skip[]) void PokerGame::activatePlayer(PokerPlayer *player) { - if (!m_activePlayers.tqcontains(player)) { + if (!m_activePlayers.contains(player)) { m_activePlayers.append(player); m_removedPlayers.remove(player); } @@ -98,7 +98,7 @@ PokerGame::activatePlayer(PokerPlayer *player) void PokerGame::inactivatePlayer(PokerPlayer *player) { - if (m_activePlayers.tqcontains(player)) { + if (m_activePlayers.contains(player)) { m_activePlayers.remove(player); m_removedPlayers.append(player); } @@ -554,7 +554,7 @@ void kpok::bet() // Check if player 1 is out -> for players > 2 - // TODO: maybe if (!m_activePlayers.tqcontains(humanPlayer)) + // TODO: maybe if (!m_activePlayers.contains(humanPlayer)) // {exchangeCards(); bet(); displayerWinner_computer();return;} diff --git a/kpoker/kpoker.h b/kpoker/kpoker.h index 379ac26c..94b82db2 100644 --- a/kpoker/kpoker.h +++ b/kpoker/kpoker.h @@ -116,7 +116,7 @@ public: PokerPlayer * getActivePlayer(unsigned int nr) { return m_activePlayers.at(nr); } void activatePlayer(PokerPlayer *player); void inactivatePlayer(PokerPlayer *player); - bool isActivePlayer(PokerPlayer *player) const { return m_activePlayers.tqcontains(player); } + bool isActivePlayer(PokerPlayer *player) const { return m_activePlayers.contains(player); } // Misc // FIXME: clearDirty should only be called by a save method diff --git a/kreversi/Move.cpp b/kreversi/Move.cpp index 14a03577..f1f50872 100644 --- a/kreversi/Move.cpp +++ b/kreversi/Move.cpp @@ -114,5 +114,5 @@ bool Move::wasTurned(uint x, uint y) const { // findIndex returns the first index where the item is found, or -1 // if not found. - return (m_turnedPieces.tqfindIndex(10 * x + y) != -1); + return (m_turnedPieces.findIndex(10 * x + y) != -1); } diff --git a/ksnake/game.cpp b/ksnake/game.cpp index 9a9e978f..600bbd55 100644 --- a/ksnake/game.cpp +++ b/ksnake/game.cpp @@ -163,7 +163,7 @@ void Game::showSettings(){ // since the filename may contain underscore, they // are replaced with spaces in the menu entry TQString s = TQFileInfo( *it ).baseName(); - s = s.tqreplace(TQRegExp("_"), " "); + s = s.replace(TQRegExp("_"), " "); list.append(s); } } diff --git a/ksnake/pixServer.cpp b/ksnake/pixServer.cpp index c27e554f..ed9a2113 100644 --- a/ksnake/pixServer.cpp +++ b/ksnake/pixServer.cpp @@ -216,7 +216,7 @@ void PixServer::drawBrick(TQPainter *p ,int i) TQColor light(180,180,180); TQColor dark(100,100,100); - int topSq = board->getNext(N, i); //tqfind 'address' of neighbouring squares + int topSq = board->getNext(N, i); //find 'address' of neighbouring squares int botSq = board->getNext(S, i); int rightSq = board->getNext(E ,i); int leftSq = board->getNext(W, i); diff --git a/ksokoban/MainWindow.cpp b/ksokoban/MainWindow.cpp index 0c28579c..349e9d01 100644 --- a/ksokoban/MainWindow.cpp +++ b/ksokoban/MainWindow.cpp @@ -311,7 +311,7 @@ void MainWindow::openURL(KURL _url) { KConfig *cfg=(KApplication::kApplication())->config(); -// int namepos = _url.path().tqfindRev('/') + 1; // NOTE: tqfindRev can return -1 +// int namepos = _url.path().findRev('/') + 1; // NOTE: findRev can return -1 // TQString levelName = _url.path().mid(namepos); TQString levelName = _url.fileName(); diff --git a/ksokoban/ModalLabel.cpp b/ksokoban/ModalLabel.cpp index cf813779..47d4c49b 100644 --- a/ksokoban/ModalLabel.cpp +++ b/ksokoban/ModalLabel.cpp @@ -40,7 +40,7 @@ ModalLabel::ModalLabel(const TQString &text, TQWidget *tqparent, for (int linePos=0; linePos < (int) text.length(); linePos += lineLen+1) { - lineLen = text.tqfind('\n', linePos); + lineLen = text.find('\n', linePos); if (lineLen < 0) lineLen = text.length() - linePos; else lineLen -= linePos; diff --git a/kspaceduel/mainview.cpp b/kspaceduel/mainview.cpp index 8204ffd0..39ab33b9 100644 --- a/kspaceduel/mainview.cpp +++ b/kspaceduel/mainview.cpp @@ -815,7 +815,7 @@ void MyMainView::collisions() if((sprite->rtti()!=S_EXPLOSION) && !((sprite->rtti()!=S_SUN)&&(ship[pl]->getHitPoints()==0))) if(ship[pl]->collidesWith(sprite)) - if(!hitlist.tqcontains(sprite)) + if(!hitlist.contains(sprite)) hitlist.append(sprite); } @@ -906,7 +906,7 @@ void MyMainView::collisions() sprite = (*it); if(sprite->rtti()==S_BULLET) if(mine->collidesWith(sprite)) - if(!hitlist.tqcontains(sprite)) + if(!hitlist.contains(sprite)) hitlist.append(sprite); } if(hitlist.count()>0) @@ -932,13 +932,13 @@ void MyMainView::collisions() { case S_BULLET: if(sun->collidesWith(sprite)) - if(!hitlist.tqcontains(sprite)) + if(!hitlist.contains(sprite)) hitlist.append(sprite); break; case S_MINE: if(!((MobileSprite*)sprite)->isStopped()) if(sun->collidesWith(sprite)) - if(!hitlist.tqcontains(sprite)) + if(!hitlist.contains(sprite)) hitlist.append(sprite); break; } diff --git a/ktuberling/playground.cpp b/ktuberling/playground.cpp index c2da26bf..c84f9d38 100644 --- a/ktuberling/playground.cpp +++ b/ktuberling/playground.cpp @@ -293,7 +293,7 @@ void PlayGround::mouseReleaseEvent( TQMouseEvent *event ) setCursor(arrow); // If we are not moving the object to the editable area - if (!dirtyArea.tqcontains(event->pos())) + if (!dirtyArea.contains(event->pos())) { // ... then register its deletion (if coming from the editable area), and return if (draggedZOrder == -1) return; @@ -524,7 +524,7 @@ bool PlayGround::zone(TQPoint &position) int draggedNumber; for (draggedNumber = 0; draggedNumber < decorations; - draggedNumber++) if (objectsLayout[draggedNumber].tqcontains(position)) + draggedNumber++) if (objectsLayout[draggedNumber].contains(position)) { position.setX(position.x() - objectsLayout[draggedNumber].x()); position.setY(position.y() - objectsLayout[draggedNumber].y()); @@ -541,7 +541,7 @@ bool PlayGround::zone(TQPoint &position) for (draggedZOrder = toDraw.count()-1; draggedZOrder >= 0; draggedZOrder--) { currentObject = toDraw.at(draggedZOrder); - if (!currentObject->getPosition().tqcontains(position)) continue; + if (!currentObject->getPosition().contains(position)) continue; TQRect toUpdate(currentObject->getPosition()); draggedObject = *currentObject; @@ -563,7 +563,7 @@ bool PlayGround::zone(TQPoint &position) } // If we are on the gameboard itself, then play "tuberling" sound - if (editableArea.tqcontains(position)) + if (editableArea.contains(position)) topLevel->playSound(editableSound); return false; diff --git a/ktuberling/toplevel.cpp b/ktuberling/toplevel.cpp index 0563d856..fc0939f0 100644 --- a/ktuberling/toplevel.cpp +++ b/ktuberling/toplevel.cpp @@ -219,7 +219,7 @@ void TopLevel::readOptions() config->setGroup("General"); option = config->readEntry("Sound", "on"); - soundEnabled = option.tqfind("on") == 0; + soundEnabled = option.find("on") == 0; option = config->readEntry("GameboardNumber", "0"); selectedGameboard = option.toInt(); @@ -290,7 +290,7 @@ void TopLevel::fileNew() void TopLevel::fileOpen() { TQString dir = locate("data", "ktuberling/museum/miss.tuberling"); - dir.truncate(dir.tqfindRev('/') + 1); + dir.truncate(dir.findRev('/') + 1); KURL url = KFileDialog::getOpenURL(dir, "*.tuberling"); @@ -340,7 +340,7 @@ void TopLevel::fileSave() TQString name = url.path(); int suffix; - suffix = name.tqfindRev('.'); + suffix = name.findRev('.'); if (suffix == -1) { name += ".tuberling"; @@ -379,7 +379,7 @@ void TopLevel::filePicture() int suffix; TQString end; - suffix = name.tqfindRev('.'); + suffix = name.findRev('.'); if (suffix == -1) { name += ".xpm"; diff --git a/kwin4/install-sh b/kwin4/install-sh index a3789027..67c94290 100755 --- a/kwin4/install-sh +++ b/kwin4/install-sh @@ -113,7 +113,7 @@ else # Waiting for this to be detected by the "$instcmd $src $dsttmp" command # might cause directories to be created, which would be especially bad -# if $src (and thus $dsttmp) tqcontains '*'. +# if $src (and thus $dsttmp) contains '*'. if [ -f "$src" -o -d "$src" ] then diff --git a/kwin4/kwin4/kwin4doc.cpp b/kwin4/kwin4/kwin4doc.cpp index a4c2c622..8c52985b 100644 --- a/kwin4/kwin4/kwin4doc.cpp +++ b/kwin4/kwin4/kwin4doc.cpp @@ -42,10 +42,10 @@ Kwin4Doc::Kwin4Doc(TQWidget *tqparent, const char *) : KGame(1234,TQT_TQOBJECT(t this,TQT_SLOT(slotPropertyChanged(KGamePropertyBase *,KGame *))); dataHandler()->Debug(); - //kdDebug(12010) << "Property 7 policy=" << dataHandler()->tqfind(7)->policy() << endl; + //kdDebug(12010) << "Property 7 policy=" << dataHandler()->find(7)->policy() << endl; setPolicy(KGame::PolicyDirty,true); - //kdDebug(12010) << "Property 7 policy=" << dataHandler()->tqfind(7)->policy() << endl; + //kdDebug(12010) << "Property 7 policy=" << dataHandler()->find(7)->policy() << endl; // Game design setMaxPlayers(2); 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 : *
    *
  • the player name (as defined by the user in the configuration * dialog)
  • diff --git a/libkdegames/highscore/kexthighscore_internal.cpp b/libkdegames/highscore/kexthighscore_internal.cpp index a1dfd747..1bd0ddbc 100644 --- a/libkdegames/highscore/kexthighscore_internal.cpp +++ b/libkdegames/highscore/kexthighscore_internal.cpp @@ -320,7 +320,7 @@ PlayerInfos::PlayerInfos() TQMap::const_iterator it; for (it=entries.begin(); it!=entries.end(); ++it) { TQString key = it.key(); - if ( key.tqfind(prefix)==0 ) { + if ( key.find(prefix)==0 ) { TQString name = key.right(key.length()-prefix.length()); if ( name!="name" || !isNameUsed(it.data()) ) internal->hsConfig().writeEntry(_id+1, name, it.data()); diff --git a/libkdegames/highscore/kexthighscore_item.cpp b/libkdegames/highscore/kexthighscore_item.cpp index 44fe64fa..faf7ffdf 100644 --- a/libkdegames/highscore/kexthighscore_item.cpp +++ b/libkdegames/highscore/kexthighscore_item.cpp @@ -154,13 +154,13 @@ Score::~Score() const TQVariant &Score::data(const TQString &name) const { - Q_ASSERT( _data.tqcontains(name) ); + Q_ASSERT( _data.contains(name) ); return _data[name]; } void Score::setData(const TQString &name, const TQVariant &value) { - Q_ASSERT( _data.tqcontains(name) ); + Q_ASSERT( _data.contains(name) ); Q_ASSERT( _data[name].type()==value.type() ); _data[name] = value; } diff --git a/libkdegames/kcarddialog.cpp b/libkdegames/kcarddialog.cpp index 89e48e42..34657c41 100644 --- a/libkdegames/kcarddialog.cpp +++ b/libkdegames/kcarddialog.cpp @@ -466,7 +466,7 @@ void KCardDialog::insertCardIcons() { KSimpleConfig cfg(*it); cfg.setGroup(TQString::tqfromLatin1("KDE Backdeck")); - TQString path = (*it).left((*it).tqfindRev('/') + 1); + TQString path = (*it).left((*it).findRev('/') + 1); assert(path[path.length() - 1] == '/'); TQPixmap pixmap(path + cfg.readEntry("Preview", "12c.png")); diff --git a/libkdegames/kchatbase.cpp b/libkdegames/kchatbase.cpp index 00827e6d..4f0c9931 100644 --- a/libkdegames/kchatbase.cpp +++ b/libkdegames/kchatbase.cpp @@ -262,7 +262,7 @@ bool KChatBase::insertSendingEntry(const TQString& text, int id, int index) kdWarning(11000) << "KChatBase: Cannot add an entry to the combo box" << endl; return false; } - if (d->mIndex2Id.tqfindIndex(id) != -1) { + if (d->mIndex2Id.findIndex(id) != -1) { kdError(11000) << "KChatBase: Cannot add more than one entry with the same ID! " << endl; kdError(11000) << "KChatBase: Text="<mIndex2Id.tqfindIndex(id); + return d->mIndex2Id.findIndex(id); } int KChatBase::nextId() const { int i = SendToAll + 1; - while (d->mIndex2Id.tqfindIndex(i) != -1) { + while (d->mIndex2Id.findIndex(i) != -1) { i++; } return i; @@ -362,7 +362,7 @@ TQListBoxItem* KChatBase::layoutMessage(const TQString& fromName, const TQString //TODO: KChatBaseConfigure? - e.g. color TQListBoxItem* message; if (text.startsWith("/me ")) { - // tqreplace "/me" by a nice star. leave one space after the star + // replace "/me" by a nice star. leave one space after the star TQPixmap pix; pix.load(locate("data", TQString::tqfromLatin1("kdegames/pics/star.png"))); 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 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); } diff --git a/libksirtet/base/gtetris.h b/libksirtet/base/gtetris.h index 1546741d..b0f990b9 100644 --- a/libksirtet/base/gtetris.h +++ b/libksirtet/base/gtetris.h @@ -81,7 +81,7 @@ ** ** Do whatever you want with this code (i.e. the files gtetris.h, ** gtetris.cpp, tpiece.h and tpiece.cpp). It is basically a weekend hack -** and it would bring joy to my heart if anyone in any way would tqfind +** and it would bring joy to my heart if anyone in any way would find ** it useful. ** ** Nostalgia, comments and/or praise can be sent to: Eirik.Eng@troll.no diff --git a/libksirtet/lib/keys.cpp b/libksirtet/lib/keys.cpp index fadb8e5f..48dbb025 100644 --- a/libksirtet/lib/keys.cpp +++ b/libksirtet/lib/keys.cpp @@ -68,7 +68,7 @@ void KeyData::setEnabled(uint index, bool enabled) { for (uint k=0; k<_cols[index]->count(); k++) { TQMap::Iterator it = - _specActions.tqfind(_cols[index]->action(k)); + _specActions.find(_cols[index]->action(k)); if ( it==_specActions.end() ) _cols[index]->action(k)->setEnabled(enabled); else (*it).enabled = enabled; diff --git a/libksirtet/lib/meeting.cpp b/libksirtet/lib/meeting.cpp index 8730fb96..d9b3028a 100644 --- a/libksirtet/lib/meeting.cpp +++ b/libksirtet/lib/meeting.cpp @@ -136,7 +136,7 @@ void NetMeeting::cleanReject(const TQString &str) // Read incoming data void NetMeeting::readNotifier(int fd) { - int i = sm.tqfind(fd); + int i = sm.find(fd); Q_ASSERT( i!=-1 ); switch ( sm[i]->read() ) { case -1: readError(i); break; diff --git a/libksirtet/lib/smanager.cpp b/libksirtet/lib/smanager.cpp index ba2afd89..03137e32 100644 --- a/libksirtet/lib/smanager.cpp +++ b/libksirtet/lib/smanager.cpp @@ -31,7 +31,7 @@ void SocketManager::clean() sockets.resize(0); } -int SocketManager::tqfind(int fd) +int SocketManager::find(int fd) { for(uint i=0; ifd()==fd ) return i; diff --git a/libksirtet/lib/smanager.h b/libksirtet/lib/smanager.h index 8541934e..59dd0edb 100644 --- a/libksirtet/lib/smanager.h +++ b/libksirtet/lib/smanager.h @@ -40,7 +40,7 @@ class SocketManager Socket *operator [](uint i) { return sockets[i]; } /** @return the index of the socket (-1 if not present). */ - int tqfind(int fd); + int find(int fd); /** * Append a socket at the end of the array of sockets. diff --git a/lskat/lskat/KChildConnect.cpp b/lskat/lskat/KChildConnect.cpp index f74fd10b..679b3f65 100644 --- a/lskat/lskat/KChildConnect.cpp +++ b/lskat/lskat/KChildConnect.cpp @@ -75,7 +75,7 @@ void KChildConnect::Receive(TQString input) // Call us recursive until there are no CR left len=KEMESSAGE_CR.length(); - pos=input.tqfind(KEMESSAGE_CR); + pos=input.find(KEMESSAGE_CR); if (pos>0) { tmp=input.left(pos); diff --git a/lskat/lskat/KEMessage.cpp b/lskat/lskat/KEMessage.cpp index 43ae9312..b11a70a5 100644 --- a/lskat/lskat/KEMessage.cpp +++ b/lskat/lskat/KEMessage.cpp @@ -61,7 +61,7 @@ void KEMessage::AddData(TQString key, const char *data,int size) KGM_TYPE KEMessage::QueryType(TQString key) { KMessageEntry *entry; - entry=dict.tqfind(key); + entry=dict.find(key); if (!entry) return (KGM_TYPE)0; return entry->QueryType(); } @@ -69,7 +69,7 @@ KGM_TYPE KEMessage::QueryType(TQString key) bool KEMessage::HasKey(TQString key) { KMessageEntry *entry; - entry=dict.tqfind(key); + entry=dict.find(key); if (!entry) return false; return true; } @@ -78,7 +78,7 @@ bool KEMessage::GetData(TQString key,short &s) { short *result; KMessageEntry *entry; - entry=dict.tqfind(key); + entry=dict.find(key); if (!entry) return false; if (entry->QueryType()!=KGM_TYPE_SHORT) return false; // printf("GetShortData: %p for %s\n",entry->QueryData(),(char *)key); @@ -91,7 +91,7 @@ bool KEMessage::GetData(TQString key,long &l) { long *result; KMessageEntry *entry; - entry=dict.tqfind(key); + entry=dict.find(key); if (!entry) return false; if (entry->QueryType()!=KGM_TYPE_LONG) return false; result=(long *)entry->QueryData(); @@ -103,7 +103,7 @@ bool KEMessage::GetData(TQString key,float &f) { float *result; KMessageEntry *entry; - entry=dict.tqfind(key); + entry=dict.find(key); if (!entry) return false; if (entry->QueryType()!=KGM_TYPE_FLOAT) return false; // printf("GetFloatData: %p for %s\n",entry->QueryData(),(char *)key); @@ -115,7 +115,7 @@ bool KEMessage::GetData(TQString key,float &f) bool KEMessage::GetData(TQString key,char * &c,int &size) { KMessageEntry *entry; - entry=dict.tqfind(key); + entry=dict.find(key); if (!entry) return false; if (entry->QueryType()!=KGM_TYPE_DATA) return false; c=entry->QueryData(); @@ -179,19 +179,19 @@ TQString KEMessage::StringToEntry(TQString str,KMessageEntry *entry) len=KEMESSAGE_SEP.length(); if (!entry) return TQString(); - pos=str.tqfind(KEMESSAGE_SEP,0); + pos=str.find(KEMESSAGE_SEP,0); if (pos<0) return TQString(); // wrong format key=str.left(pos); oldpos=pos; - pos=str.tqfind(KEMESSAGE_SEP,oldpos+len); + pos=str.find(KEMESSAGE_SEP,oldpos+len); if (pos<0) return TQString(); // wrong format size=str.mid(oldpos+len,pos-oldpos-len); oldpos=pos; - pos=str.tqfind(KEMESSAGE_SEP,oldpos+len); + pos=str.find(KEMESSAGE_SEP,oldpos+len); if (pos<0) return TQString(); // wrong format type=str.mid(oldpos+len,pos-oldpos-len); @@ -226,7 +226,7 @@ TQString KEMessage::ToString() s=KEMESSAGE_HEAD+KEMESSAGE_CR; for (it=keys.first();it!=0;it=keys.next()) { - entry=dict.tqfind(TQCString(it)); + entry=dict.find(TQCString(it)); s+=EntryToString(it,entry); } s+=KEMESSAGE_TAIL+KEMESSAGE_CR; @@ -251,14 +251,14 @@ bool KEMessage::AddStringMsg(TQString str) len=KEMESSAGE_CR.length(); - pos=str.tqfind(KEMESSAGE_CR); + pos=str.find(KEMESSAGE_CR); if (pos<0) return false; // wrong format if (str.left(pos)!=(KEMESSAGE_HEAD)) return false; // wrong message do { oldpos=pos; - pos=str.tqfind(KEMESSAGE_CR,oldpos+len); + pos=str.find(KEMESSAGE_CR,oldpos+len); if (pos<0) return false; // wrong format data=str.mid(oldpos+len,pos-oldpos-len); if (data!=(KEMESSAGE_TAIL)) @@ -315,7 +315,7 @@ KEMessage &KEMessage::operator=(KEMessage &msg) // printf("Assigning = KEMessage from %p to %p\n",&msg,this); for (it=msg.keys.first();it!=0;it=msg.keys.next()) { - entry=msg.dict.tqfind(TQCString(it)); + entry=msg.dict.find(TQCString(it)); newentry=new KMessageEntry; *newentry=*entry; AddEntry(TQCString(it),newentry); diff --git a/lskat/lskat/KInputChildProcess.cpp b/lskat/lskat/KInputChildProcess.cpp index 5ba87e96..bd78235c 100644 --- a/lskat/lskat/KInputChildProcess.cpp +++ b/lskat/lskat/KInputChildProcess.cpp @@ -55,7 +55,7 @@ bool KInputChildProcess::exec() s=inputbuffer+s; // printf("ChildABC '%s'\n",(const char *)s); // fflush(stdout); - pos=s.tqfindRev(KEMESSAGE_CR); + pos=s.findRev(KEMESSAGE_CR); if (pos<0) { inputbuffer=s; diff --git a/lskat/lskat/KProcessConnect.cpp b/lskat/lskat/KProcessConnect.cpp index b3117c18..97cd9221 100644 --- a/lskat/lskat/KProcessConnect.cpp +++ b/lskat/lskat/KProcessConnect.cpp @@ -115,7 +115,7 @@ void KProcessConnect::slotReceivedStdout(KProcess *, char *buffer, int buflen) } // Append old unresolved input s=inputbuffer+s; - pos=s.tqfindRev(KEMESSAGE_CR); + pos=s.findRev(KEMESSAGE_CR); // printf("String '%s' pos=%d len=%d\n",(const char *)s,pos,s.length()); if (pos<0) { diff --git a/lskat/lskat/KRemoteConnect.cpp b/lskat/lskat/KRemoteConnect.cpp index a84ab9dc..fd5effc5 100644 --- a/lskat/lskat/KRemoteConnect.cpp +++ b/lskat/lskat/KRemoteConnect.cpp @@ -267,7 +267,7 @@ void KRemoteConnect::socketRead(KSocket *sock) // Append old unresolved input s=inputbuffer+s; - pos=s.tqfindRev(KEMESSAGE_CR); + pos=s.findRev(KEMESSAGE_CR); // printf("String '%s' pos=%d len=%d\n",(const char *)s,pos,s.length()); if (pos<0) { diff --git a/lskat/lskat/lskatview.cpp b/lskat/lskat/lskatview.cpp index 1ead3427..a71f1b24 100644 --- a/lskat/lskat/lskatview.cpp +++ b/lskat/lskat/lskatview.cpp @@ -593,7 +593,7 @@ void LSkatView::drawTabText(TQPainter *p,TQRect rect,TQString s,int *ts) // p->drawRect(rect); while(s.length()>0 && (lcnt==0 || ts[lcnt-1]) ) { - int lpos=s.tqfind("\t"); + int lpos=s.find("\t"); int rpos=s.length()-lpos-1; if (lpos<0) { diff --git a/lskat/lskatproc/KChildConnect.cpp b/lskat/lskatproc/KChildConnect.cpp index a504018d..448eb206 100644 --- a/lskat/lskatproc/KChildConnect.cpp +++ b/lskat/lskatproc/KChildConnect.cpp @@ -75,7 +75,7 @@ void KChildConnect::Receive(TQString input) // Call us recursive until there are no CR left len=KEMESSAGE_CR.length(); - pos=input.tqfind(KEMESSAGE_CR); + pos=input.find(KEMESSAGE_CR); if (pos>0) { tmp=input.left(pos); diff --git a/lskat/lskatproc/KEMessage.cpp b/lskat/lskatproc/KEMessage.cpp index 96c33797..aa88298a 100644 --- a/lskat/lskatproc/KEMessage.cpp +++ b/lskat/lskatproc/KEMessage.cpp @@ -61,7 +61,7 @@ void KEMessage::AddData(TQString key,const char *data,int size) KGM_TYPE KEMessage::QueryType(TQString key) { KMessageEntry *entry; - entry=dict.tqfind(key); + entry=dict.find(key); if (!entry) return (KGM_TYPE)0; return entry->QueryType(); } @@ -69,7 +69,7 @@ KGM_TYPE KEMessage::QueryType(TQString key) bool KEMessage::HasKey(TQString key) { KMessageEntry *entry; - entry=dict.tqfind(key); + entry=dict.find(key); if (!entry) return false; return true; } @@ -78,7 +78,7 @@ bool KEMessage::GetData(TQString key,short &s) { short *result; KMessageEntry *entry; - entry=dict.tqfind(key); + entry=dict.find(key); if (!entry) return false; if (entry->QueryType()!=KGM_TYPE_SHORT) return false; // printf("GetShortData: %p for %s\n",entry->QueryData(),(char *)key); @@ -91,7 +91,7 @@ bool KEMessage::GetData(TQString key,long &l) { long *result; KMessageEntry *entry; - entry=dict.tqfind(key); + entry=dict.find(key); if (!entry) return false; if (entry->QueryType()!=KGM_TYPE_LONG) return false; result=(long *)entry->QueryData(); @@ -103,7 +103,7 @@ bool KEMessage::GetData(TQString key,float &f) { float *result; KMessageEntry *entry; - entry=dict.tqfind(key); + entry=dict.find(key); if (!entry) return false; if (entry->QueryType()!=KGM_TYPE_FLOAT) return false; // printf("GetFloatData: %p for %s\n",entry->QueryData(),(char *)key); @@ -115,7 +115,7 @@ bool KEMessage::GetData(TQString key,float &f) bool KEMessage::GetData(TQString key,char * &c,int &size) { KMessageEntry *entry; - entry=dict.tqfind(key); + entry=dict.find(key); if (!entry) return false; if (entry->QueryType()!=KGM_TYPE_DATA) return false; c=entry->QueryData(); @@ -179,19 +179,19 @@ TQString KEMessage::StringToEntry(TQString str,KMessageEntry *entry) len=KEMESSAGE_SEP.length(); if (!entry) return TQString(); - pos=str.tqfind(KEMESSAGE_SEP,0); + pos=str.find(KEMESSAGE_SEP,0); if (pos<0) return TQString(); // wrong format key=str.left(pos); oldpos=pos; - pos=str.tqfind(KEMESSAGE_SEP,oldpos+len); + pos=str.find(KEMESSAGE_SEP,oldpos+len); if (pos<0) return TQString(); // wrong format size=str.mid(oldpos+len,pos-oldpos-len); oldpos=pos; - pos=str.tqfind(KEMESSAGE_SEP,oldpos+len); + pos=str.find(KEMESSAGE_SEP,oldpos+len); if (pos<0) return TQString(); // wrong format type=str.mid(oldpos+len,pos-oldpos-len); @@ -226,7 +226,7 @@ TQString KEMessage::ToString() s=KEMESSAGE_HEAD+KEMESSAGE_CR; for (it=keys.first();it!=0;it=keys.next()) { - entry=dict.tqfind(TQCString(it)); + entry=dict.find(TQCString(it)); s+=EntryToString(it,entry); } s+=KEMESSAGE_TAIL+KEMESSAGE_CR; @@ -251,14 +251,14 @@ bool KEMessage::AddStringMsg(TQString str) len=KEMESSAGE_CR.length(); - pos=str.tqfind(KEMESSAGE_CR); + pos=str.find(KEMESSAGE_CR); if (pos<0) return false; // wrong format if (str.left(pos)!=(KEMESSAGE_HEAD)) return false; // wrong message do { oldpos=pos; - pos=str.tqfind(KEMESSAGE_CR,oldpos+len); + pos=str.find(KEMESSAGE_CR,oldpos+len); if (pos<0) return false; // wrong format data=str.mid(oldpos+len,pos-oldpos-len); if (data!=(KEMESSAGE_TAIL)) @@ -315,7 +315,7 @@ KEMessage &KEMessage::operator=(KEMessage &msg) // printf("Assigning = KEMessage from %p to %p\n",&msg,this); for (it=msg.keys.first();it!=0;it=msg.keys.next()) { - entry=msg.dict.tqfind(TQCString(it)); + entry=msg.dict.find(TQCString(it)); newentry=new KMessageEntry; *newentry=*entry; AddEntry(TQCString(it),newentry); diff --git a/lskat/lskatproc/KInputChildProcess.cpp b/lskat/lskatproc/KInputChildProcess.cpp index c06f42e5..13e00b93 100644 --- a/lskat/lskatproc/KInputChildProcess.cpp +++ b/lskat/lskatproc/KInputChildProcess.cpp @@ -55,7 +55,7 @@ bool KInputChildProcess::exec() s=inputbuffer+s; // printf("ChildABC '%s'\n",(const char *)s); // fflush(stdout); - pos=s.tqfindRev(KEMESSAGE_CR); + pos=s.findRev(KEMESSAGE_CR); if (pos<0) { inputbuffer=s;