summaryrefslogtreecommitdiffstats
path: root/ksirc/toplevel.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
commit937b2991d8e78166eea904c80ad04d34607017a4 (patch)
tree2accb8161eab09df5d7a5484ea9ea080ad123168 /ksirc/toplevel.cpp
parentdba26cb985af370c33d1767037851705cc561726 (diff)
downloadtdenetwork-937b2991d8e78166eea904c80ad04d34607017a4.tar.gz
tdenetwork-937b2991d8e78166eea904c80ad04d34607017a4.zip
rename the following methods:
tqfind find tqreplace replace tqcontains contains git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ksirc/toplevel.cpp')
-rw-r--r--ksirc/toplevel.cpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/ksirc/toplevel.cpp b/ksirc/toplevel.cpp
index 43b2201e..bdc14b1d 100644
--- a/ksirc/toplevel.cpp
+++ b/ksirc/toplevel.cpp
@@ -189,8 +189,8 @@ KSircTopLevel::KSircTopLevel(KSircProcess *_proc, const KSircChannel &channelInf
// remove utf16/ucs2 as it just doesn't work for IRC
TQStringList::Iterator encodingIt = encodings.begin();
while ( encodingIt != encodings.end() ) {
- if ( ( *encodingIt ).tqfind( "utf16" ) != -1 ||
- ( *encodingIt ).tqfind( "iso-10646" ) != -1 )
+ if ( ( *encodingIt ).find( "utf16" ) != -1 ||
+ ( *encodingIt ).find( "iso-10646" ) != -1 )
encodingIt = encodings.remove( encodingIt );
else
++encodingIt;
@@ -200,7 +200,7 @@ KSircTopLevel::KSircTopLevel(KSircProcess *_proc, const KSircChannel &channelInf
encodingAction->setItems( encodings );
encodingAction->plug( file );
- int eindex = encodings.tqfindIndex(ksopts->chan(m_channelInfo).encoding);
+ int eindex = encodings.findIndex(ksopts->chan(m_channelInfo).encoding);
if(eindex == -1)
encodingAction->setCurrentItem( 0 );
else
@@ -553,7 +553,7 @@ KSircTopLevel::~KSircTopLevel()
ksit.atEnd() == 0;
++ksit) {
TQString rt = ksit.richText();
- if(rt.tqcontains("<img src=\"user|servinfo\">"))
+ if(rt.contains("<img src=\"user|servinfo\">"))
continue;
kdDebug(5008) << rt << endl;
@@ -719,7 +719,7 @@ void KSircTopLevel::TabNickCompletion(int dir)
s = linee->text();
tab_saved = s;
end = linee->cursorPosition() - 1;
- start = s.tqfindRev(" ", end, FALSE);
+ start = s.findRev(" ", end, FALSE);
tab_start = start;
tab_end = end;
first = true;
@@ -765,9 +765,9 @@ void KSircTopLevel::TabNickCompletion(int dir)
tab_pressed -= 1;
tab_nick = findNick(s.mid(0, end+1), tab_pressed);
}
- s.tqreplace(0, end + 1, "");
+ s.replace(0, end + 1, "");
if(s[0] == ':')
- s.tqreplace(0, 2, "");
+ s.replace(0, 2, "");
s.prepend(tab_nick + ": ");
extra = 2;
}
@@ -784,11 +784,11 @@ void KSircTopLevel::TabNickCompletion(int dir)
}
if((uint) end == s.length() - 1){ /* if we're at the end add a space */
- s.tqreplace(start + 1, end - start, tab_nick + " ");
+ s.replace(start + 1, end - start, tab_nick + " ");
extra = 1;
}
else {
- s.tqreplace(start + 1, end - start, tab_nick);
+ s.replace(start + 1, end - start, tab_nick);
extra = 0;
}
}
@@ -845,12 +845,12 @@ void KSircTopLevel::sirc_receive(TQString str, bool broadcast)
bool addressedLine = false;
- if(line.message.tqcontains( ">~o")){ /* highlighted with our nick */
+ if(line.message.contains( ">~o")){ /* highlighted with our nick */
addressedLine = true;
}
// detect /msg's -- needed when auto-create-window is off
- if ( line.message.tqfind( TQRegExp( "^\\[~b.+~b\\].+$" ) ) == 0 )
+ if ( line.message.find( TQRegExp( "^\\[~b.+~b\\].+$" ) ) == 0 )
addressedLine = true;
if ( addressedLine == true && line.message.startsWith("* " + ksircProcess()->getNick()))
@@ -911,7 +911,7 @@ void KSircTopLevel::sirc_write(const TQString &str)
plain.startsWith("/j ") ||
plain.startsWith("/query ")) {
- TQString s = plain.mid(plain.tqfind(' ')+1);
+ TQString s = plain.mid(plain.find(' ')+1);
TQStringList channels = TQStringList::split(",", s);
TQStringList::ConstIterator it = channels.begin();
@@ -949,7 +949,7 @@ void KSircTopLevel::sirc_write(const TQString &str)
bool ssl = false;
if(server.startsWith("+")){
- server.tqreplace(0, 1, "");
+ server.replace(0, 1, "");
ssl = true;
}
@@ -1075,7 +1075,7 @@ bool KSircTopLevel::parse_input(const TQString &string, TQString &plainText)
}
// If it contains our nick, move the speaker to the top
// of the nick completion list
- if(string.tqcontains("~o")){
+ if(string.contains("~o")){
TQRegExp rx("<(\\S+)>");
if ( (rx.search(logString) >= 0) &&
(rx.cap(1) != ksircProcess()->getNick()) ) {
@@ -1121,7 +1121,7 @@ void KSircTopLevel::returnPressed()
}
while(s.length() > IRC_SAFE_MAX_LINE){
- int wrap = s.tqfindRev(' ', IRC_SAFE_MAX_LINE);
+ int wrap = s.findRev(' ', IRC_SAFE_MAX_LINE);
if(wrap == -1)
wrap = IRC_SAFE_MAX_LINE;
sirc_line_return(s.left(wrap));
@@ -1156,7 +1156,7 @@ void KSircTopLevel::UserParseMenu(int id)
if (action.length() && action[0] == '/')
action.remove(0, 1);
s = TQString("/eval &docommand(eval{\"%1\"});\n").tqarg(action);
- s.tqreplace(TQRegExp("\\$\\$"), "$");
+ s.replace(TQRegExp("\\$\\$"), "$");
sirc_write(s);
}
@@ -1342,7 +1342,7 @@ void KSircTopLevel::control_message(int command, TQString str)
file->setItemChecked(beepitem, ksopts->chan(m_channelInfo).beepOnMsg);
file->setItemChecked(tsitem, ksopts->chan(m_channelInfo).timeStamp);
file->setItemChecked(fjpitem, ksopts->chan(m_channelInfo).filterJoinPart);
- int eindex = encodingAction->items().tqfindIndex(ksopts->chan(m_channelInfo).encoding);
+ int eindex = encodingAction->items().findIndex(ksopts->chan(m_channelInfo).encoding);
//kdDebug(5008) << "in change channel we want: " << ksopts->chan(m_channelInfo).encoding << " eindex: " << eindex << endl;
encodingAction->setCurrentItem(eindex < 0 ? 0 : eindex);
setEncoding();
@@ -1373,7 +1373,7 @@ void KSircTopLevel::control_message(int command, TQString str)
file->setItemChecked(beepitem, ksopts->channel[m_channelInfo.server()][m_channelInfo.channel()].beepOnMsg);
file->setItemChecked(tsitem, ksopts->channel[m_channelInfo.server()][m_channelInfo.channel()].timeStamp);
{
- int eindex = encodingAction->items().tqfindIndex(ksopts->channel[m_channelInfo.server()][m_channelInfo.channel()].encoding);
+ int eindex = encodingAction->items().findIndex(ksopts->channel[m_channelInfo.server()][m_channelInfo.channel()].encoding);
//kdDebug(5008) << "in re-readconfig we want: " << ksopts->channel[m_channelInfo.server()][m_channelInfo.channel()].encoding << " eindex: " << eindex << endl;
encodingAction->setCurrentItem(eindex < 0 ? 0 : eindex);
setEncoding();
@@ -1448,7 +1448,7 @@ TQString KSircTopLevel::findNick(TQString part, uint which)
}
for(uint i=0; i < nicks->count(); i++){
- if (matches.tqcontains(nicks->text(i)))
+ if (matches.contains(nicks->text(i)))
continue;
if(nicks->text(i).length() >= part.length()){
if(nicks->text(i).lower().startsWith( part.lower())){
@@ -1470,7 +1470,7 @@ TQString KSircTopLevel::findNick(TQString part, uint which)
void KSircTopLevel::removeCompleteNick(const TQString &nick)
{
- TQStringList::Iterator it = completeNicks.tqfind(nick);
+ TQStringList::Iterator it = completeNicks.find(nick);
if (it != completeNicks.end())
completeNicks.remove(it);
}
@@ -1483,7 +1483,7 @@ void KSircTopLevel::addCompleteNick(const TQString &nick)
void KSircTopLevel::changeCompleteNick(const TQString &oldNick, const TQString &newNick)
{
- TQStringList::Iterator it = completeNicks.tqfind(oldNick);
+ TQStringList::Iterator it = completeNicks.find(oldNick);
if (it != completeNicks.end())
*it = newNick;
}
@@ -1568,7 +1568,7 @@ void KSircTopLevel::slotTextDropped( const TQString& _text )
if (text[text.length()-1] != '\n')
text += "\n";
- int lines = text.tqcontains("\n");
+ int lines = text.contains("\n");
int approx_lines = text.length() / 75;
if ( lines > approx_lines )
approx_lines = lines;
@@ -1622,7 +1622,7 @@ void KSircTopLevel::slotTextDropped( const TQString& _text )
linee->update();
}
else{
- text.tqreplace(TQRegExp("\n"), "");
+ text.replace(TQRegExp("\n"), "");
linee->setText(text);
linee->setCursorPosition( curPos + _text.length() );
}
@@ -1834,7 +1834,7 @@ void KSircTopLevel::cmd_process(int id)
void KSircTopLevel::showDCCMgr()
{
- KSircMessageReceiver *kmr = ksircProcess()->mrList().tqfind("!dcc");
+ KSircMessageReceiver *kmr = ksircProcess()->mrList().find("!dcc");
if(kmr){
KSircIODCC *dcc = static_cast<KSircIODCC *>(kmr);
if(dcc){