summaryrefslogtreecommitdiffstats
path: root/ksirc
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
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')
-rw-r--r--ksirc/FilterRuleEditor.cpp4
-rw-r--r--ksirc/KSOpenkSirc/open_ksirc.cpp6
-rw-r--r--ksirc/KSPrefs/page_colors.cpp14
-rw-r--r--ksirc/KSPrefs/page_general.cpp6
-rw-r--r--ksirc/KSPrefs/page_startup.cpp6
-rw-r--r--ksirc/KSTicker/ksticker.cpp6
-rw-r--r--ksirc/KSTicker/ksttest.cpp2
-rw-r--r--ksirc/ahistlineedit.cpp4
-rw-r--r--ksirc/alistbox.cpp2
-rw-r--r--ksirc/chanparser.cpp34
-rw-r--r--ksirc/colorpicker.cpp2
-rw-r--r--ksirc/dccNew.cpp4
-rw-r--r--ksirc/displayMgrMDI.cpp10
-rw-r--r--ksirc/dockservercontroller.cpp8
-rwxr-xr-xksirc/dsirc4
-rw-r--r--ksirc/ioDCC.cpp58
-rw-r--r--ksirc/ioLAG.cpp4
-rw-r--r--ksirc/ioNotify.cpp12
-rw-r--r--ksirc/iocontroller.cpp6
-rw-r--r--ksirc/ksirc.cpp2
-rw-r--r--ksirc/ksircprocess.cpp10
-rw-r--r--ksirc/ksopts.cpp10
-rw-r--r--ksirc/ksparser.cpp8
-rw-r--r--ksirc/kstextview.cpp24
-rw-r--r--ksirc/kstextview.h4
-rw-r--r--ksirc/ksview.cpp8
-rw-r--r--ksirc/mditoplevel.cpp10
-rw-r--r--ksirc/objFinder.cpp2
-rw-r--r--ksirc/objFinder.h2
-rw-r--r--ksirc/puke/controller.cpp18
-rw-r--r--ksirc/servercontroller.cpp4
-rw-r--r--ksirc/stringparserstate.h2
-rw-r--r--ksirc/topic.cpp18
-rw-r--r--ksirc/toplevel.cpp48
34 files changed, 181 insertions, 181 deletions
diff --git a/ksirc/FilterRuleEditor.cpp b/ksirc/FilterRuleEditor.cpp
index df1e9509..c9459864 100644
--- a/ksirc/FilterRuleEditor.cpp
+++ b/ksirc/FilterRuleEditor.cpp
@@ -228,13 +228,13 @@ void FilterRuleEditor::lowerRule()
TQString FilterRuleEditor::convertSpecial(TQString str)
{
- str.tqreplace(TQRegExp("\\$"), "$$");
+ str.replace(TQRegExp("\\$"), "$$");
return str;
}
TQString FilterRuleEditor::convertSpecialBack(TQString str)
{
- str.tqreplace(TQRegExp("\\$\\$"), "$");
+ str.replace(TQRegExp("\\$\\$"), "$");
return str;
}
diff --git a/ksirc/KSOpenkSirc/open_ksirc.cpp b/ksirc/KSOpenkSirc/open_ksirc.cpp
index f005394b..9f9bebf8 100644
--- a/ksirc/KSOpenkSirc/open_ksirc.cpp
+++ b/ksirc/KSOpenkSirc/open_ksirc.cpp
@@ -137,7 +137,7 @@ void open_ksirc::insertGroupList()
Server *serv;
for ( serv=Groups.first(); serv != 0; serv=Groups.next() ) {
- if (tempgroups.tqfind(serv->group()) == -1)
+ if (tempgroups.find(serv->group()) == -1)
tempgroups.inSort( serv->group() );
}
@@ -307,8 +307,8 @@ void open_ksirc::clickConnect()
conf->setGroup("ServerList");
conf->writeEntry("StorePasswords", CheckB_StorePassword->isChecked());
TQStringList recent = conf->readListEntry("RecentServers");
- if(recent.tqcontains(server)){
- TQStringList::Iterator it = recent.tqfind(server);
+ if(recent.contains(server)){
+ TQStringList::Iterator it = recent.find(server);
recent.remove(it);
}
diff --git a/ksirc/KSPrefs/page_colors.cpp b/ksirc/KSPrefs/page_colors.cpp
index a31acb64..0aca72ed 100644
--- a/ksirc/KSPrefs/page_colors.cpp
+++ b/ksirc/KSPrefs/page_colors.cpp
@@ -162,13 +162,13 @@ void PageColors::readConfig( const KSOColors *opts )
conf->setGroup("ColourSchemes");
themeLB->clear();
TQStringList names = conf->readListEntry("Names");
- if(names.tqcontains("Custom")){
- names.remove(names.tqfind("Custom"));
+ if(names.contains("Custom")){
+ names.remove(names.find("Custom"));
}
names.prepend("Custom");
themeLB->insertStringList(names);
- if(themeLB->tqfindItem(ksopts->colourTheme, TQt::ExactMatch))
- themeLB->setCurrentItem(themeLB->tqfindItem(ksopts->colourTheme, TQt::ExactMatch));
+ if(themeLB->findItem(ksopts->colourTheme, TQt::ExactMatch))
+ themeLB->setCurrentItem(themeLB->findItem(ksopts->colourTheme, TQt::ExactMatch));
else
themeLB->setCurrentItem(0);
themeLE->setText(themeLB->currentText());
@@ -243,7 +243,7 @@ void PageColors::themeAddPB_clicked()
kdDebug(5008) << "Got add: " << themeLB->currentText() << endl;
- m_dcol.tqreplace(name, new KSOColors());
+ m_dcol.replace(name, new KSOColors());
m_dcol[name]->backgroundColor = backCBtn->color();
m_dcol[name]->selBackgroundColor = selBackCBtn->color();
@@ -257,11 +257,11 @@ void PageColors::themeAddPB_clicked()
m_dcol[name]->nickForeground = nickFGCBtn->color();
m_dcol[name]->nickBackground = nickBGCBtn->color();
- if(themeLB->tqfindItem(name, TQt::ExactMatch) == 0){
+ if(themeLB->findItem(name, TQt::ExactMatch) == 0){
themeLB->insertItem(name);
}
- themeLB->setCurrentItem(themeLB->tqfindItem(name, TQt::ExactMatch));
+ themeLB->setCurrentItem(themeLB->findItem(name, TQt::ExactMatch));
}
diff --git a/ksirc/KSPrefs/page_general.cpp b/ksirc/KSPrefs/page_general.cpp
index 119201e1..f90016a5 100644
--- a/ksirc/KSPrefs/page_general.cpp
+++ b/ksirc/KSPrefs/page_general.cpp
@@ -87,15 +87,15 @@ void PageGeneral::readConfig( const KSOGeneral *opts )
// 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;
}
encodings.prepend( i18n( "Default" ) );
encodingsCB->insertStringList(encodings);
- int eindex = encodings.tqfindIndex(ksopts->channel["global"]["global"].encoding);
+ int eindex = encodings.findIndex(ksopts->channel["global"]["global"].encoding);
if(eindex == -1)
encodingsCB->setCurrentItem(0);
else
diff --git a/ksirc/KSPrefs/page_startup.cpp b/ksirc/KSPrefs/page_startup.cpp
index 37b3f875..60e3402f 100644
--- a/ksirc/KSPrefs/page_startup.cpp
+++ b/ksirc/KSPrefs/page_startup.cpp
@@ -49,7 +49,7 @@ void PageStartup::saveConfig()
for( ; it != items.end(); ++it){
ksopts->server[*it] = server[*it];
}
- if(!ksopts->server.tqcontains("global")){
+ if(!ksopts->server.contains("global")){
ksopts->server["global"] = glb;
}
@@ -65,7 +65,7 @@ void PageStartup::readConfig( const KSOptions *opts )
if(it.data().globalCopy == false)
serverLB->insertItem(it.key());
}
- TQListBoxItem *item = serverLB->listBox()->tqfindItem("global");
+ TQListBoxItem *item = serverLB->listBox()->findItem("global");
serverLB->listBox()->setSelected(item, true);
changing = false;
clickedLB(serverLB->listBox()->index(item));
@@ -107,7 +107,7 @@ void PageStartup::clickedLB(int index)
{
TQString text = serverLB->text(index);
- if(!server.tqcontains(text)){
+ if(!server.contains(text)){
server[text] = server["global"];
server[text].globalCopy = true;
}
diff --git a/ksirc/KSTicker/ksticker.cpp b/ksirc/KSTicker/ksticker.cpp
index bedc0328..d2f5d228 100644
--- a/ksirc/KSTicker/ksticker.cpp
+++ b/ksirc/KSTicker/ksticker.cpp
@@ -151,7 +151,7 @@ void KSTicker::mergeString(TQString str)
int value = nickColourMaker::colourMaker()->findIdx(rx.cap(1));
if(value >= 0){
TQString newText = TQString("~%1\\1~c").tqarg(value);
- str.tqreplace(rx, newText);
+ str.replace(rx, newText);
}
}
@@ -162,8 +162,8 @@ void KSTicker::mergeString(TQString str)
int found = 0;
TQStringList::Iterator it = strlist.begin();
for(; it != strlist.end(); it++){
- if(((*it).tqfind(ksopts->server["global"].nick, 0, FALSE) == -1) &&
- ((*it).tqfind(ksopts->server["global"].altNick, 0, FALSE) == -1)){
+ if(((*it).find(ksopts->server["global"].nick, 0, FALSE) == -1) &&
+ ((*it).find(ksopts->server["global"].altNick, 0, FALSE) == -1)){
strlist.remove(it);
found = 1;
break;
diff --git a/ksirc/KSTicker/ksttest.cpp b/ksirc/KSTicker/ksttest.cpp
index 904aedf1..581bd2dc 100644
--- a/ksirc/KSTicker/ksttest.cpp
+++ b/ksirc/KSTicker/ksttest.cpp
@@ -46,7 +46,7 @@ void StdInTicker::readsocket(int socket)
int bytes = read(socket, buf, 1024);
if(bytes){
TQCString str(buf, bytes);
- str.tqreplace(TQRegExp("\n"), " // ");
+ str.replace(TQRegExp("\n"), " // ");
mergeString(str);
}
}
diff --git a/ksirc/ahistlineedit.cpp b/ksirc/ahistlineedit.cpp
index 80eb2eec..2baa2381 100644
--- a/ksirc/ahistlineedit.cpp
+++ b/ksirc/ahistlineedit.cpp
@@ -93,7 +93,7 @@ int aHistLineEdit::cursorPosition() const
void aHistLineEdit::slotMaybeResize()
{
/*
- if(TQTextEdit::text().tqcontains("\n")){
+ if(TQTextEdit::text().contains("\n")){
setText(text());
setCursorPosition(text().length());
}
@@ -385,7 +385,7 @@ void aHistLineEdit::paste()
}
else {
TQString paste = TQApplication::tqclipboard()->text(TQClipboard::Selection);
- paste.tqreplace("\n", " ~ ");
+ paste.replace("\n", " ~ ");
insert(paste);
}
}
diff --git a/ksirc/alistbox.cpp b/ksirc/alistbox.cpp
index 9702cd5e..ca0609e8 100644
--- a/ksirc/alistbox.cpp
+++ b/ksirc/alistbox.cpp
@@ -208,7 +208,7 @@ int aListBox::findNick(const TQString &str)
index = searchFor(str, found, FALSE);
if(found == TRUE)
return index;
-// debug("Did not tqfind: %s", str.data());
+// debug("Did not find: %s", str.data());
return -1;
}
diff --git a/ksirc/chanparser.cpp b/ksirc/chanparser.cpp
index 9c65c3bb..ece0864e 100644
--- a/ksirc/chanparser.cpp
+++ b/ksirc/chanparser.cpp
@@ -143,12 +143,12 @@ parseResult * ChannelParser::parseSSFEtqStatus(TQString string)
/*
* fix up modes which may have gotten the (away) part
*/
- if(modes.tqcontains("away")){
+ if(modes.contains("away")){
modes = "";
}
bool away = false;
- if(string.tqcontains("(away)"))
+ if(string.contains("(away)"))
away = true;
if(away){
@@ -165,29 +165,29 @@ parseResult * ChannelParser::parseSSFEtqStatus(TQString string)
}
top->ksircProcess()->setNick(nick);
- if (chanmode.tqfindRev("t") != -1)
+ if (chanmode.findRev("t") != -1)
top->channelButtons->setProtectMode(true);
else top->channelButtons->setProtectMode(false);
- if (chanmode.tqfindRev("m") != -1)
+ if (chanmode.findRev("m") != -1)
top->channelButtons->setModerateMode(true);
else top->channelButtons->setModerateMode(false);
- if (chanmode.tqfindRev("n") != -1)
+ if (chanmode.findRev("n") != -1)
top->channelButtons->setNooutsideMode(true);
else top->channelButtons->setNooutsideMode(false);
- if (chanmode.tqfindRev("i") != -1)
+ if (chanmode.findRev("i") != -1)
top->channelButtons->setMenuItemMode(0, true);
else top->channelButtons->setMenuItemMode(0, false);
- if (chanmode.tqfindRev("s") != -1)
+ if (chanmode.findRev("s") != -1)
top->channelButtons->setMenuItemMode(3, true);
else top->channelButtons->setMenuItemMode(3, false);
- if (modes.tqfindRev("i") != -1)
+ if (modes.findRev("i") != -1)
top->channelButtons->setMenuItemMode(4, true);
else top->channelButtons->setMenuItemMode(4, false);
- if (modes.tqfindRev("w") != -1)
+ if (modes.findRev("w") != -1)
top->channelButtons->setMenuItemMode(5, true);
else top->channelButtons->setMenuItemMode(5, false);
- if (modes.tqfindRev("s") != -1)
+ if (modes.findRev("s") != -1)
top->channelButtons->setMenuItemMode(6, true);
else top->channelButtons->setMenuItemMode(6, false);
@@ -300,7 +300,7 @@ parseResult * ChannelParser::parseSSFEPrompt(TQString string)
}
if(last[0] == '['){ /* strip time stamp */
- prompt = last.mid(last.tqfind(' '));
+ prompt = last.mid(last.find(' '));
}
else {
prompt = last;
@@ -399,7 +399,7 @@ parseResult * ChannelParser::parseINFONicks(TQString in_string)
top->nicks->clear();
}
- //int start = string.tqfind(": ", 0, FALSE); // Find start of nicks
+ //int start = string.find(": ", 0, FALSE); // Find start of nicks
//if (start < 0)
// return new parseError(string, i18n("Could not find start of nicks"));
//
@@ -638,7 +638,7 @@ parseResult * ChannelParser::parseINFOChangeNick(TQString string)
//kdDebug(5008) << "Nick change: " << string << endl;
TQRegExp rx("(\\S+) is now known as (\\S+)");
if(rx.search(string) == -1){
- if(string.tqcontains("already taken")){
+ if(string.contains("already taken")){
return new parseSucc(" " + string, ksopts->errorColor, "user|error");
}
@@ -747,7 +747,7 @@ parseResult * ChannelParser::parseINFOMode(TQString string)
TQString modes, args, channel;
int found = 0;
- if(string.tqfind("for user") >= 0)
+ if(string.find("for user") >= 0)
return new parseSucc(" " + string, ksopts->infoColor, "user|mode");
/*
@@ -993,7 +993,7 @@ parseResult * ChannelParser::parseINFOTopic(TQString string)
if(rx.search( string ) != -1){
TQString channel = rx.cap(1);
TQString topic = rx.cap(2);
- topic.tqreplace( TQRegExp( "~~" ), "~" );
+ topic.replace( TQRegExp( "~~" ), "~" );
/*
* check where it's going.
@@ -1025,7 +1025,7 @@ parseResult * ChannelParser::parseINFOTopic(TQString string)
if(top->channelInfo().channel().lower() == channel.lower()){
TQString topic = rx.cap(3);
//kdDebug(5008) << "Topic: " << topic << endl;
- topic.tqreplace(TQRegExp("~~"), "~");
+ topic.replace(TQRegExp("~~"), "~");
/*
* topic is in double quotes, so remove them
*/
@@ -1042,6 +1042,6 @@ parseResult * ChannelParser::parseINFOTopic(TQString string)
void ChannelParser::highlightNick(TQString &string, TQString &nick)
{
TQRegExp rx(TQString("(^|\\s+)%1(\\s+|$)").tqarg(TQRegExp::escape(nick)));
- string.tqreplace(rx, "\\1~n" + nick + "~n\\2");
+ string.replace(rx, "\\1~n" + nick + "~n\\2");
}
diff --git a/ksirc/colorpicker.cpp b/ksirc/colorpicker.cpp
index ebdc9eed..c16c8048 100644
--- a/ksirc/colorpicker.cpp
+++ b/ksirc/colorpicker.cpp
@@ -249,7 +249,7 @@ bool ColorBar::focusNextPrevChild( bool next )
void ColorBar::mousePressEvent( TQMouseEvent *ev )
{
const TQPoint &p = ev->pos();
- if ( contentsRect().tqcontains( p ) )
+ if ( contentsRect().contains( p ) )
{
m_focusedCell = p.x() / m_cellSize;
update();
diff --git a/ksirc/dccNew.cpp b/ksirc/dccNew.cpp
index 961d01d4..74fdd56e 100644
--- a/ksirc/dccNew.cpp
+++ b/ksirc/dccNew.cpp
@@ -47,7 +47,7 @@ dccNew::dccNew( TQWidget *tqparent, const char *name, int type, TQString nick )
TQString name = (*it).section("::", 1);
kdDebug(5008) << "Looking at: " << *it << "/" << name << endl;
- aListBox *a = static_cast<aListBox *>(TQT_TQWIDGET(objFinder::tqfind(name.latin1(), "aListBox")));
+ aListBox *a = static_cast<aListBox *>(TQT_TQWIDGET(objFinder::find(name.latin1(), "aListBox")));
if(a){
TQListBoxItem *i;
for(i = a->firstItem(); i != 0x0; i = i->next()){
@@ -56,7 +56,7 @@ dccNew::dccNew( TQWidget *tqparent, const char *name, int type, TQString nick )
}
}
else {
- kdDebug(5008) << "Didn't tqfind: " << name << endl;
+ kdDebug(5008) << "Didn't find: " << name << endl;
}
}
diff --git a/ksirc/displayMgrMDI.cpp b/ksirc/displayMgrMDI.cpp
index 4e6020e9..f2805426 100644
--- a/ksirc/displayMgrMDI.cpp
+++ b/ksirc/displayMgrMDI.cpp
@@ -152,7 +152,7 @@ void DisplayMgrMDI::setCaption(TQWidget *w, const TQString& cap)
w->setCaption(cap);
TQString esc = cap;
- esc.tqreplace("&", "&&");
+ esc.replace("&", "&&");
kdDebug(5008) << "Set caption: " << esc << endl;
m_topLevel->tabWidget()->setTabLabel( w, esc );
@@ -213,10 +213,10 @@ void DisplayMgrMDI::reparentReq()
TQMenuData *tmenu = kst->menuBar();
if(tmenu){
- TQMenuItem *menui = tmenu->tqfindItem(DMM_MDI_ID);
+ TQMenuItem *menui = tmenu->findItem(DMM_MDI_ID);
if(menui){
TQMenuData *cmenu = menui->popup();
- if(cmenu->tqfindItem(DMM_DEATCH_ID) && cmenu->isItemChecked(DMM_DEATCH_ID)){
+ if(cmenu->findItem(DMM_DEATCH_ID) && cmenu->isItemChecked(DMM_DEATCH_ID)){
kst->reparent( topLevel()->tabWidget(), 0, TQPoint( 0, 0 ), true );
show(kst);
cmenu->setItemChecked(DMM_DEATCH_ID, false);
@@ -293,9 +293,9 @@ void DisplayMgrMDI::moveWindow(int step)
m_topLevel->setUpdatesEnabled(false);
m_topLevel->hideWidget(w);
- int space = w->caption().tqfind(" ");
+ int space = w->caption().find(" ");
TQString esc = space < 1 ? w->caption():w->caption().left(space);
- esc.tqreplace("&", "&&");
+ esc.replace("&", "&&");
kdDebug(5008) << "Insert tab: " << esc << endl;
m_topLevel->tabWidget()->insertTab( w, esc, index );
m_topLevel->tabWidget()->showPage( w );
diff --git a/ksirc/dockservercontroller.cpp b/ksirc/dockservercontroller.cpp
index cdb3d2ae..4c553df6 100644
--- a/ksirc/dockservercontroller.cpp
+++ b/ksirc/dockservercontroller.cpp
@@ -240,9 +240,9 @@ void dockServerController::subItemActivated(int sub_id)
servercontroller::self()->new_toplevel(KSircChannel(server, nick));
}
else {
- KSircProcess *kp = servercontroller::self()->processes().tqfind(server);
+ KSircProcess *kp = servercontroller::self()->processes().find(server);
if(kp){
- KSircTopLevel *wm = dynamic_cast<KSircTopLevel *>(kp->getWindowList().tqfind("!default"));
+ KSircTopLevel *wm = dynamic_cast<KSircTopLevel *>(kp->getWindowList().find("!default"));
if(wm){
if(cmd == i18n("Ping")){
wm->sirc_line_return("/ping " + nick + "\n");
@@ -433,10 +433,10 @@ void dockServerController::configNotify()
void dockServerController::raiseWindow(TQString server, TQString name)
{
TQCString txt = server.utf8() + "_" + name.utf8() + "_toplevel";
- TQWidget *obj = dynamic_cast<TQWidget *>( objFinder::tqfind(txt, "KSircTopLevel"));
+ TQWidget *obj = dynamic_cast<TQWidget *>( objFinder::find(txt, "KSircTopLevel"));
if(obj == 0x0){
txt = server.utf8() + "_!" + name.utf8() + "_toplevel";
- obj = dynamic_cast<TQWidget *>( objFinder::tqfind(txt, "KSircTopLevel"));
+ obj = dynamic_cast<TQWidget *>( objFinder::find(txt, "KSircTopLevel"));
}
if(obj != 0x0){
diff --git a/ksirc/dsirc b/ksirc/dsirc
index eddc5fd2..f358fcd7 100755
--- a/ksirc/dsirc
+++ b/ksirc/dsirc
@@ -2082,7 +2082,7 @@ sub donumeric {
if ($cmd eq '401') {
&yetonearg;
&yetonearg;
- &tell("*\cb?\cb* Cannot tqfind $newarg on irc$from");
+ &tell("*\cb?\cb* Cannot find $newarg on irc$from");
} elsif ($cmd eq '402') {
&yetonearg;
&yetonearg;
@@ -2176,7 +2176,7 @@ sub donumeric {
eval $err;
$@ =~ s/\n$//, &tell("*\cbE\cb* error in userhost: $@") if $@ ne '';
} else {
- &tell("*\cb?\cb* Cannot tqfind $n on irc");
+ &tell("*\cb?\cb* Cannot find $n on irc");
}
}
} elsif ($cmd eq '303') {
diff --git a/ksirc/ioDCC.cpp b/ksirc/ioDCC.cpp
index e718a452..7f601ace 100644
--- a/ksirc/ioDCC.cpp
+++ b/ksirc/ioDCC.cpp
@@ -58,7 +58,7 @@ void KSircIODCC::sirc_receive(TQCString str, bool )
// Then we look at the one time start/stop messages. They only arrive
// once in a long long time (compared to the byte messages) so if it takes
// a few extra clock cycles to find them, who cares?
- if(str.tqfind("DCC GET read:", 0) != -1){ /*fold01*/
+ if(str.find("DCC GET read:", 0) != -1){ /*fold01*/
TQRegExp rx("read: (.+) who: (.+) bytes: (.*)");
if(rx.search(str)){
TQString key = TQString("%1/%2").tqarg(rx.cap(1)).tqarg(rx.cap(2));
@@ -73,7 +73,7 @@ void KSircIODCC::sirc_receive(TQCString str, bool )
}
}
}
- else if(str.tqfind("DCC SEND write:", 0) != -1){ /*fold01*/
+ else if(str.find("DCC SEND write:", 0) != -1){ /*fold01*/
TQRegExp rx("write: (.+) who: (.+) bytes: (.*)");
if(rx.search(str)){
TQString key = TQString("%1/%2").tqarg(rx.cap(1)).tqarg(rx.cap(2));
@@ -84,7 +84,7 @@ void KSircIODCC::sirc_receive(TQCString str, bool )
}
}
}
- else if(str.tqfind("INBOUND DCC SEND", 0) != -1){ /*FOLD01*/
+ else if(str.find("INBOUND DCC SEND", 0) != -1){ /*FOLD01*/
TQRegExp rx("who: (.+) file: (.+) size: (.*) ip: (.+) port: (.+)");
if(rx.search(str)){
TQString who = rx.cap(1);
@@ -127,7 +127,7 @@ void KSircIODCC::sirc_receive(TQCString str, bool )
kdDebug(5008) << "DCC SEND was unable to parse: " << str << endl;
}
}
- else if(str.tqfind("Sent DCC SEND", 0) != -1){ /*FOLD01*/
+ else if(str.find("Sent DCC SEND", 0) != -1){ /*FOLD01*/
TQRegExp rx("who: (.+) file: (.+) size: (.*)");
if(rx.search(str)){
TQString who = rx.cap(1);
@@ -164,7 +164,7 @@ void KSircIODCC::sirc_receive(TQCString str, bool )
kdDebug(5008) << "DCC SENT was unable to parse: " << str << endl;
}
}
- else if(str.tqfind("DCC CHAT OFFERED", 0) != -1){ /*FOLD01*/
+ else if(str.find("DCC CHAT OFFERED", 0) != -1){ /*FOLD01*/
TQRegExp rx("who: (.+) ip: (.+) port: (.+)");
if(rx.search(str)){
TQString who = rx.cap(1);
@@ -182,7 +182,7 @@ void KSircIODCC::sirc_receive(TQCString str, bool )
kdDebug(5008) << "DCC CHAT SEND was unable to parse: " << str << endl;
}
}
- else if(str.tqfind("DCC CHAT SEND", 0) != -1){ /*FOLD01*/
+ else if(str.find("DCC CHAT SEND", 0) != -1){ /*FOLD01*/
TQRegExp rx("who: (.+)");
if(rx.search(str)){
TQString who = rx.cap(1);
@@ -198,7 +198,7 @@ void KSircIODCC::sirc_receive(TQCString str, bool )
kdDebug(5008) << "DCC CHAT SEND was unable to parse: " << str << endl;
}
}
- else if(str.tqfind("DCC SEND terminated") != -1){ /*FOLD01*/
+ else if(str.find("DCC SEND terminated") != -1){ /*FOLD01*/
TQRegExp rx("who: (.+) file: (.+) reason: (.*)");
if(rx.search(str)){
TQString who = rx.cap(1);
@@ -222,7 +222,7 @@ void KSircIODCC::sirc_receive(TQCString str, bool )
}
}
}
- else if(str.tqfind ("DCC GET terminated") != -1){ /*fold01*/
+ else if(str.find ("DCC GET terminated") != -1){ /*fold01*/
kdDebug(5008) << "Term: " << str << endl;
TQRegExp rx("who: (.+) file: (.+) reason: (.*)");
if(rx.search(str)){
@@ -247,7 +247,7 @@ void KSircIODCC::sirc_receive(TQCString str, bool )
kdDebug(5008) << "DCC Get term failed to parse: " << str << endl;
}
}
- else if(str.tqfind("DCC GET resumed") != -1){ /*fold01*/
+ else if(str.find("DCC GET resumed") != -1){ /*fold01*/
TQRegExp rx("who: (.+) file: (.+)");
if(rx.search(str)){
TQString who = rx.cap(1);
@@ -262,7 +262,7 @@ void KSircIODCC::sirc_receive(TQCString str, bool )
}
}
}
- else if(str.tqfind("DCC SEND resumed") != -1){ /*fold01*/
+ else if(str.find("DCC SEND resumed") != -1){ /*fold01*/
TQRegExp rx("who: (.+) file: (.+)");
if(rx.search(str)){
TQString who = rx.cap(1);
@@ -273,7 +273,7 @@ void KSircIODCC::sirc_receive(TQCString str, bool )
}
}
}
- else if(str.tqfind("DCC GET established") != -1){ /*fold01*/
+ else if(str.find("DCC GET established") != -1){ /*fold01*/
TQRegExp rx("who: (.+) file: (.+)");
if(rx.search(str)){
TQString who = rx.cap(1);
@@ -284,7 +284,7 @@ void KSircIODCC::sirc_receive(TQCString str, bool )
}
}
}
- else if(str.tqfind("DCC SEND established") != -1){ /*fold01*/
+ else if(str.find("DCC SEND established") != -1){ /*fold01*/
TQRegExp rx("who: (.+) file: (.+) ip: (\\S+)");
if(rx.search(str)){
TQString who = rx.cap(1);
@@ -297,7 +297,7 @@ void KSircIODCC::sirc_receive(TQCString str, bool )
}
}
}
- else if(str.tqfind("DCC CHAT established") != -1){ /*FOLD01*/
+ else if(str.find("DCC CHAT established") != -1){ /*FOLD01*/
TQRegExp rx("who: (.+)");
if(rx.search(str)){
TQString who = rx.cap(1);
@@ -307,7 +307,7 @@ void KSircIODCC::sirc_receive(TQCString str, bool )
}
}
}
- else if(str.tqfind("DCC CHAT inbound established") != -1){ /*FOLD01*/
+ else if(str.find("DCC CHAT inbound established") != -1){ /*FOLD01*/
TQRegExp rx("who: (.+) ip: (.+)");
if(rx.search(str)){
TQString who = rx.cap(1);
@@ -319,7 +319,7 @@ void KSircIODCC::sirc_receive(TQCString str, bool )
}
}
}
- else if(str.tqfind("DCC GET failed") != -1){ /*fold01*/
+ else if(str.find("DCC GET failed") != -1){ /*fold01*/
TQRegExp rx("who: (.+) file: (.+) reason: (.*)");
if(rx.search(str)){
TQString who = rx.cap(1);
@@ -332,7 +332,7 @@ void KSircIODCC::sirc_receive(TQCString str, bool )
KPassivePopup::message(i18n("DCC Get with %1 for %2 failed because of %3").tqarg(who).tqarg(filename).tqarg(error), mgr->mgr());
}
}
- else if(str.tqfind("DCC CHAT failed") != -1){ /*FOLD01*/
+ else if(str.find("DCC CHAT failed") != -1){ /*FOLD01*/
TQRegExp rx("who: (.+) reason: (.*)");
if(rx.search(str)){
TQString who = rx.cap(1);
@@ -343,19 +343,19 @@ void KSircIODCC::sirc_receive(TQCString str, bool )
KPassivePopup::message(i18n("DCC Chat with %1 failed because of %2").tqarg(who).tqarg(error), mgr->mgr());
}
}
- else if(str.tqfind("DCC CHAT renamed") != -1){ /*FOLD01*/
+ else if(str.find("DCC CHAT renamed") != -1){ /*FOLD01*/
TQRegExp rx("who: (.+) to: (.+)");
if(rx.search(str)){
TQString oldwho = rx.cap(1);
TQString newwho = rx.cap(2);
TQString oldwin = "=" + oldwho;
- if(proc->getWindowList().tqfind(oldwin)){
- proc->getWindowList().tqfind(oldwin)->control_message(CHANGE_CHANNEL,TQString("=" +newwho).lower());
+ if(proc->getWindowList().find(oldwin)){
+ proc->getWindowList().find(oldwin)->control_message(CHANGE_CHANNEL,TQString("=" +newwho).lower());
}
}
}
- else if(str.tqfind("Closing DCC GET") != -1){ /*fold01*/
+ else if(str.find("Closing DCC GET") != -1){ /*fold01*/
TQRegExp rx("who: (.+) file: (.+)");
if(rx.search(str)){
TQString who = rx.cap(1);
@@ -366,7 +366,7 @@ void KSircIODCC::sirc_receive(TQCString str, bool )
}
}
}
-// else if(str.tqfind("Closing DCC SEND") != -1){ /*FOLD01*/
+// else if(str.find("Closing DCC SEND") != -1){ /*FOLD01*/
// TQRegExp rx("who: (.+) file: (.+)");
// if(rx.search(str)){
// TQString who = rx.cap(1);
@@ -377,7 +377,7 @@ void KSircIODCC::sirc_receive(TQCString str, bool )
// }
// }
// }
- else if(str.tqfind("Closing DCC CHAT") != -1){ /*fold01*/
+ else if(str.find("Closing DCC CHAT") != -1){ /*fold01*/
TQRegExp rx("who: (.+)");
if(rx.search(str)){
TQString who = rx.cap(1);
@@ -386,7 +386,7 @@ void KSircIODCC::sirc_receive(TQCString str, bool )
}
}
}
- else if(str.tqfind("No DCC SEND") != -1){ /*fold01*/
+ else if(str.find("No DCC SEND") != -1){ /*fold01*/
TQRegExp rx("who: (.+) file: (.+)");
if(rx.search(str)){
TQString who = rx.cap(1);
@@ -412,7 +412,7 @@ void KSircIODCC::sirc_receive(TQCString str, bool )
toDel.clear();
}
}
- else if(str.tqfind("No DCC GET") != -1){ /*fold01*/
+ else if(str.find("No DCC GET") != -1){ /*fold01*/
TQRegExp rx("who: (.+) file: (.+)");
if(rx.search(str)){
TQString who = rx.cap(1);
@@ -436,7 +436,7 @@ void KSircIODCC::sirc_receive(TQCString str, bool )
toDel.clear();
}
}
- else if(str.tqfind("No DCC CHAT") != -1){ /*fold01*/
+ else if(str.find("No DCC CHAT") != -1){ /*fold01*/
TQRegExp rx("who: (.+)");
if(rx.search(str)){
TQString who = rx.cap(1);
@@ -482,9 +482,9 @@ void KSircIODCC::getFile()
{
/*
TQString text = pending->fileListing()->text(pending->fileListing()->currentItem());
- int pos = text.tqfind(" ", 0);
+ int pos = text.find(" ", 0);
TQString nick = text.mid(0, pos);
- pos = text.tqfind(" ", pos+1) + 1;
+ pos = text.find(" ", pos+1) + 1;
TQString filename = text.mid(pos, text.length() - pos);
//if(DlgList[filename]->isVisible() == FALSE)
// DlgList[filename]->show();
@@ -503,9 +503,9 @@ void KSircIODCC::forgetFile()
{
/*
TQString text = pending->fileListing()->text(pending->fileListing()->currentItem());
- int pos = text.tqfind(" ", 0);
+ int pos = text.find(" ", 0);
TQString nick = text.mid(0, pos);
- pos = text.tqfind(" ", pos+1) + 1;
+ pos = text.find(" ", pos+1) + 1;
TQString filename = text.mid(pos, text.length() - pos);
TQString command = "/dcc close get " + nick + " " + filename + "\n";
emit outputLine(command.ascii());
diff --git a/ksirc/ioLAG.cpp b/ksirc/ioLAG.cpp
index ee79094d..0a1a2ec7 100644
--- a/ksirc/ioLAG.cpp
+++ b/ksirc/ioLAG.cpp
@@ -32,9 +32,9 @@ KSircIOLAG::~KSircIOLAG()
void KSircIOLAG::sirc_receive(TQCString str, bool)
{
- if(str.tqcontains("*L*")){
+ if(str.contains("*L*")){
int s1, s2;
- s1 = str.tqfind("*L* ") + 4;
+ s1 = str.find("*L* ") + 4;
s2 = str.length();
if(s1 < 0 || s2 < 0){
kdDebug(5008) << "Lag mesage broken: " << str << endl;
diff --git a/ksirc/ioNotify.cpp b/ksirc/ioNotify.cpp
index c590c180..b3b4a52f 100644
--- a/ksirc/ioNotify.cpp
+++ b/ksirc/ioNotify.cpp
@@ -26,10 +26,10 @@ KSircIONotify::~KSircIONotify()
void KSircIONotify::sirc_receive(TQCString str, bool)
{
- if(str.tqcontains("*)*")){
+ if(str.contains("*)*")){
int s1, s2;
- s1 = str.tqfind("Signon by") + 10;
- s2 = str.tqfind(" ", s1);
+ s1 = str.find("Signon by") + 10;
+ s2 = str.find(" ", s1);
if(s1 < 0 || s2 < 0){
kdDebug(5008) << "Nick Notify mesage broken: " << str << endl;
return;
@@ -37,10 +37,10 @@ void KSircIONotify::sirc_receive(TQCString str, bool)
TQString nick = str.mid(s1, s2 - s1);
emit notify_online(nick);
}
- else if(str.tqcontains("*(*")){
+ else if(str.contains("*(*")){
int s1, s2;
- s1 = str.tqfind("Signoff by") + 11;
- s2 = str.tqfind(" ", s1);
+ s1 = str.find("Signoff by") + 11;
+ s2 = str.find(" ", s1);
if(s1 < 0 || s2 < 0){
kdDebug(5008) << "Nick Notify mesage broken: " << str << endl;
return;
diff --git a/ksirc/iocontroller.cpp b/ksirc/iocontroller.cpp
index e6514537..d63fba7b 100644
--- a/ksirc/iocontroller.cpp
+++ b/ksirc/iocontroller.cpp
@@ -193,7 +193,7 @@ void KSircIOController::stdout_read(KProcess *, char *_buffer, int buflen)
}
if(buffer[buffer.length()-1] != '\n'){
- pos = buffer.tqfindRev('\n');
+ pos = buffer.findRev('\n');
if(pos != -1){
holder = buffer.right(buffer.length()-(pos+1));
buffer.truncate(pos+1);
@@ -222,7 +222,7 @@ void KSircIOController::stdout_read(KProcess *, char *_buffer, int buflen)
m_debugLB->setUpdatesEnabled(false);
do{
- pos2 = buffer.tqfind('\n', pos);
+ pos2 = buffer.find('\n', pos);
if(pos2 == -1)
pos2 = buffer.length();
@@ -236,7 +236,7 @@ void KSircIOController::stdout_read(KProcess *, char *_buffer, int buflen)
//kdDebug(5008) << "Line: " << line << endl;
if((line.length() > 0) && (line[0] == '~')){
- pos3 = line.tqfind('~', 1);
+ pos3 = line.find('~', 1);
if(pos3 > 1){
name = line.mid(1,pos3-1).lower();
name = name.lower();
diff --git a/ksirc/ksirc.cpp b/ksirc/ksirc.cpp
index b391b28a..296e9049 100644
--- a/ksirc/ksirc.cpp
+++ b/ksirc/ksirc.cpp
@@ -120,7 +120,7 @@ extern "C" KDE_EXPORT int kdemain( int argc, char ** argv )
if ( !server.isEmpty() ) {
TQString ser = TQString::fromLocal8Bit( server );
TQString port = "6667";
- if(ser.tqcontains(":")){
+ if(ser.contains(":")){
port = ser.section(":", 1, 1);
ser = ser.section(":", 0, 0);
}
diff --git a/ksirc/ksircprocess.cpp b/ksirc/ksircprocess.cpp
index e0eb019c..3c07d8ad 100644
--- a/ksirc/ksircprocess.cpp
+++ b/ksirc/ksircprocess.cpp
@@ -203,7 +203,7 @@ KSircProcess::KSircProcess( TQString &server_id, KSircServer &kss, TQObject * tq
default_follow_focus = TRUE;
KSircChannel ci(kss.server(), "!no_channel");
new_toplevel(ci, true); //
- TopList.tqreplace("!default", TopList[ci.channel()]);
+ TopList.replace("!default", TopList[ci.channel()]);
running_window = FALSE; // set false so next changes the first name
@@ -341,7 +341,7 @@ void KSircProcess::new_toplevel(const KSircChannel &channelInfo, bool safe)
// TopList.remove("!no_channel"); // We're no longer !no_channel
TopList["!no_channel"]->control_message(CHANGE_CHANNEL, channelInfo.server() + "!!!" + channelInfo.channel() + "!!!" + channelInfo.key());
}
- else if(TopList.tqfind(channelInfo.channel()) == 0x0){ // If the window doesn't exist, continue
+ else if(TopList.find(channelInfo.channel()) == 0x0){ // If the window doesn't exist, continue
// If AutoCreate windows is on, let's make sure we're not being flooded.
if(ksopts->autoCreateWin == TRUE && safe == false){
time_t current_time = time(NULL);
@@ -407,7 +407,7 @@ void KSircProcess::new_toplevel(const KSircChannel &channelInfo, bool safe)
wm->lineEdit()->setFocus(); // Give focus back to the linee, someone takes it away on new create
}
else {
- TQWidget *w = dynamic_cast<TQWidget *>(TopList.tqfind(channelInfo.channel()));
+ TQWidget *w = dynamic_cast<TQWidget *>(TopList.find(channelInfo.channel()));
if(w)
displayMgr->raise(w);
}
@@ -452,7 +452,7 @@ void KSircProcess::close_toplevel(KSircTopLevel *wm, TQString name)
}
if (isDefault)
- TopList.tqreplace("!default", it.current());
+ TopList.replace("!default", it.current());
// Let's let em know she's deleted!
if(ksopts->autoCreateWin == TRUE){
@@ -526,7 +526,7 @@ void KSircProcess::default_window(KSircTopLevel *w)
//
if(w && (default_follow_focus == TRUE))
- TopList.tqreplace("!default", w);
+ TopList.replace("!default", w);
}
diff --git a/ksirc/ksopts.cpp b/ksirc/ksopts.cpp
index 38bf27fa..c0d6a927 100644
--- a/ksirc/ksopts.cpp
+++ b/ksirc/ksopts.cpp
@@ -251,7 +251,7 @@ void KSOptions::load( int sections )
/*
* do global first
*/
- if(channel.tqcontains("global") == FALSE){
+ if(channel.contains("global") == FALSE){
KSOChannel global;
ChannelOpMap coMap;
channel.insert(TQString("global"), coMap);
@@ -315,7 +315,7 @@ void KSOptions::load( int sections )
/*
* do global first
*/
- if(server.tqcontains("global") == FALSE){
+ if(server.contains("global") == FALSE){
KSOServer global;
server.insert(TQString("global"), global);
server["global"].server = "global";
@@ -490,11 +490,11 @@ void KSOptions::save( int sections )
void KSOptions::channelSetup(TQString serv, TQString chan)
{
- if(channel.tqcontains(serv) == FALSE){
+ if(channel.contains(serv) == FALSE){
ChannelOpMap coMap;
channel.insert(serv, coMap);
}
- if(channel[serv].tqcontains(chan) == FALSE){
+ if(channel[serv].contains(chan) == FALSE){
KSOChannel ksoc;
ksoc = channel["global"]["global"];
channel[serv].insert(chan, ksoc);
@@ -524,7 +524,7 @@ void KSOptions::applyChannelGlobal(void)
void KSOptions::serverSetup(TQString serv)
{
- if(server.tqcontains(serv) == FALSE){
+ if(server.contains(serv) == FALSE){
KSOServer ksos;
ksos = server["global"];
server.insert(serv, ksos);
diff --git a/ksirc/ksparser.cpp b/ksirc/ksparser.cpp
index cfdf59f5..e2ebf903 100644
--- a/ksirc/ksparser.cpp
+++ b/ksirc/ksparser.cpp
@@ -141,10 +141,10 @@ TQString KSParser::pushTag(const TQString &tag, const TQString &attributes)
{
TQString res;
m_tags.push(tag);
- if (!m_attributes.tqcontains(tag))
+ if (!m_attributes.contains(tag))
m_attributes.insert(tag, attributes);
else if (!attributes.isEmpty())
- m_attributes.tqreplace(tag, attributes);
+ m_attributes.replace(tag, attributes);
res.append("<" + tag);
if (!m_attributes[tag].isEmpty())
res.append(" " + m_attributes[tag]);
@@ -153,7 +153,7 @@ TQString KSParser::pushTag(const TQString &tag, const TQString &attributes)
TQString KSParser::popTag(const TQString &tag)
{
- if (!m_tags.tqcontains(tag))
+ if (!m_tags.contains(tag))
return TQString();
TQString res;
@@ -172,7 +172,7 @@ TQString KSParser::popTag(const TQString &tag)
TQString KSParser::toggleTag(const TQString &tag, const TQString &attributes)
{
- return m_attributes.tqcontains(tag) ? popTag(tag) : pushTag(tag, attributes);
+ return m_attributes.contains(tag) ? popTag(tag) : pushTag(tag, attributes);
}
TQString KSParser::popAll()
diff --git a/ksirc/kstextview.cpp b/ksirc/kstextview.cpp
index b12f8864..1ad22239 100644
--- a/ksirc/kstextview.cpp
+++ b/ksirc/kstextview.cpp
@@ -57,7 +57,7 @@ TQPixmap ksTextViewLoadPixmap( const TQString &icon )
qAddPostRoutine( cleanupKSTextViewPixmapDict );
}
- TQPixmap *pix = ksTextViewPixmapDict->tqfind( icon );
+ TQPixmap *pix = ksTextViewPixmapDict->find( icon );
if ( !pix )
{
TQImage img;
@@ -586,22 +586,22 @@ TQString Tokenizer::convertToRichText( const PString &ptext )
{
TQString entity = KGlobal::charsets()->toEntity( ch );
indexAdjustment = entity.length() - 1;
- result.tqreplace( i, 1, entity );
+ result.replace( i, 1, entity );
}
*/
if ( ch == '<' )
{
- result.tqreplace( i, 1, "&lt;" );
+ result.replace( i, 1, "&lt;" );
indexAdjustment = 3;
}
else if ( ch == '>' )
{
- result.tqreplace( i, 1, "&gt;" );
+ result.replace( i, 1, "&gt;" );
indexAdjustment = 3;
}
else if ( ch == '&' )
{
- result.tqreplace( i, 1, "&amp;" );
+ result.replace( i, 1, "&amp;" );
indexAdjustment = 4;
}
@@ -1056,7 +1056,7 @@ TQString TextLine::updateSelection( const SelectionPoint &start, const Selection
if ( start.line == this )
{
- const int idx = m_items.tqfindRef( start.item );
+ const int idx = m_items.findRef( start.item );
assert( idx != -1 );
}
else
@@ -1070,7 +1070,7 @@ TQString TextLine::updateSelection( const SelectionPoint &start, const Selection
{
const int oldCurrent = m_items.at();
- const int idx = m_items.tqfindRef( end.item );
+ const int idx = m_items.findRef( end.item );
assert( idx != -1 );
lastItem = m_items.next();
@@ -1381,11 +1381,11 @@ TQString TextParag::updateSelection( const SelectionPoint &start, const Selectio
// sanity check
// (don't put it lower because it changes the current list item)
if ( end.parag == this )
- assert( m_lines.tqfindRef( end.line ) != -1 );
+ assert( m_lines.findRef( end.line ) != -1 );
if ( start.parag == this )
{
- int idx = m_lines.tqfindRef( start.line );
+ int idx = m_lines.findRef( start.line );
assert( idx != -1 );
}
else
@@ -1742,7 +1742,7 @@ bool TextView::removeParag( const TextParagIterator &parag )
return false;
TextParag *paragPtr = parag.m_paragIt.current();
- const int idx = m_parags.tqfindRef( paragPtr );
+ const int idx = m_parags.findRef( paragPtr );
if ( idx == -1 )
return false;
@@ -2138,8 +2138,8 @@ TQString TextView::updateSelection( const SelectionPoint &start, const Selection
}
else
{
- assert( m_parags.tqfindRef( end.parag ) != -1 );
- const int idx = m_parags.tqfindRef( start.parag );
+ assert( m_parags.findRef( end.parag ) != -1 );
+ const int idx = m_parags.findRef( start.parag );
assert( idx != -1 );
TextParag *p = m_parags.current();
diff --git a/ksirc/kstextview.h b/ksirc/kstextview.h
index b523d274..e033c0a0 100644
--- a/ksirc/kstextview.h
+++ b/ksirc/kstextview.h
@@ -81,12 +81,12 @@ public:
ConstIterator findAttribute( const char *key ) const
{
TQString qkey( key );
- return tqfind( StringPtr( qkey ) );
+ return find( StringPtr( qkey ) );
}
Iterator findAttribute( const char *key )
{
TQString qkey( key );
- return tqfind( StringPtr( qkey ) );
+ return find( StringPtr( qkey ) );
}
StringPtr operator[]( const char *key ) const
diff --git a/ksirc/ksview.cpp b/ksirc/ksview.cpp
index 85d0fd1f..8ad1ffd3 100644
--- a/ksirc/ksview.cpp
+++ b/ksirc/ksview.cpp
@@ -131,11 +131,11 @@ TQString KSircView::addLine(const TQString &pixmap, const TQColor &color, const
// '<nick message<' , which is supposedly a bug in TQt's reordering. The
// same is done for [nick] and >nick< to catch queries.
TQRegExp bidiRe( "^(&lt;\\S+&gt;)(.+)$" );
- text.tqreplace( bidiRe, TQString::tqfromLatin1( "<span>\\1</span>\\2" ) );
+ text.replace( bidiRe, TQString::tqfromLatin1( "<span>\\1</span>\\2" ) );
TQRegExp bidiRe2( "^(\\[\\S+\\])(.+)$" );
- text.tqreplace( bidiRe2, TQString::tqfromLatin1( "<span>\\1</span>\\2" ) );
+ text.replace( bidiRe2, TQString::tqfromLatin1( "<span>\\1</span>\\2" ) );
TQRegExp bidiRe3( "^(&gt;\\S+&lt;)(.+)$" );
- text.tqreplace( bidiRe3, TQString::tqfromLatin1( "<span>\\1</span>\\2" ) );
+ text.replace( bidiRe3, TQString::tqfromLatin1( "<span>\\1</span>\\2" ) );
TQRegExp nickCol( "~n(.+)~n" );
nickCol.setMinimal(true);
@@ -168,7 +168,7 @@ TQString KSircView::addLine(const TQString &pixmap, const TQColor &color, const
newText.append("</r>");
}
}
- text.tqreplace(pos, nickCol.matchedLength(), newText);
+ text.replace(pos, nickCol.matchedLength(), newText);
}
//kdDebug(5008) << "After Text: " << text << endl;
diff --git a/ksirc/mditoplevel.cpp b/ksirc/mditoplevel.cpp
index 122a934a..ffe0bb4c 100644
--- a/ksirc/mditoplevel.cpp
+++ b/ksirc/mditoplevel.cpp
@@ -76,7 +76,7 @@ MDITopLevel::~MDITopLevel()
void MDITopLevel::addWidget( TQWidget *widget, bool show )
{
- if ( m_tabWidgets.tqcontainsRef( widget ) )
+ if ( m_tabWidgets.containsRef( widget ) )
return;
kdDebug(5008) << "In add widget" << endl;
@@ -121,7 +121,7 @@ void MDITopLevel::hideWidget( TQWidget *widget )
void MDITopLevel::showWidget( TQWidget *widget )
{
if(m_tab->indexOf(widget) == -1){
- int space = widget->caption().tqfind(" ");
+ int space = widget->caption().find(" ");
TQString cap = space < 1 ? widget->caption():widget->caption().left(space);
m_tab->addTab( widget, cap);
m_tab->showPage( widget );
@@ -180,7 +180,7 @@ bool MDITopLevel::eventFilter( TQObject *obj, TQEvent *ev )
TQWidget *widget = dynamic_cast<TQWidget *>( obj );
- if ( !widget || !m_tabWidgets.tqcontainsRef( widget ) )
+ if ( !widget || !m_tabWidgets.containsRef( widget ) )
return false;
if ( m_tab->currentPage() == widget )
@@ -214,7 +214,7 @@ void MDITopLevel::slotMarkPageDirty( bool addressed )
if ( window != m_tab->currentPage() )
{
- if ( m_addressed.tqcontainsRef( window ) )
+ if ( m_addressed.containsRef( window ) )
addressed = true;
else if ( addressed ) {
m_addressed.append( window );
@@ -231,7 +231,7 @@ void MDITopLevel::slotChangeChannelName( const TQString &, const TQString &chann
return;
TQString esc = channelName;
- esc.tqreplace("&", "&&");
+ esc.replace("&", "&&");
m_tab->setTabLabel( window, esc );
removeFromAddressedList( window );
}
diff --git a/ksirc/objFinder.cpp b/ksirc/objFinder.cpp
index 27b3d0f2..c5283dbd 100644
--- a/ksirc/objFinder.cpp
+++ b/ksirc/objFinder.cpp
@@ -49,7 +49,7 @@ void objFinder::insert(TQObject *obj, const char *key){
emit objFind->inserted(obj);
}
-TQObject *objFinder::tqfind(const char *name, const char *inherits){
+TQObject *objFinder::find(const char *name, const char *inherits){
TQObject *found;
TQDictIterator<TQObject> it(*objList);
uint len = strlen(name);
diff --git a/ksirc/objFinder.h b/ksirc/objFinder.h
index 7303a31b..7da02dc4 100644
--- a/ksirc/objFinder.h
+++ b/ksirc/objFinder.h
@@ -14,7 +14,7 @@ public:
virtual ~objFinder();
static void insert(TQObject *obj, const char *key = 0);
- static TQObject *tqfind(const char *name, const char *inherits);
+ static TQObject *find(const char *name, const char *inherits);
static void dumpTree();
static TQStringList allObjects();
diff --git a/ksirc/puke/controller.cpp b/ksirc/puke/controller.cpp
index a4e13f3c..771a5676 100644
--- a/ksirc/puke/controller.cpp
+++ b/ksirc/puke/controller.cpp
@@ -590,7 +590,7 @@ void PukeController::hdlrPukeFetchWidget(int fd, PukeMessage *pm)
obj = tqparent();
}
else {
- obj = objFinder::tqfind(name, 0x0);
+ obj = objFinder::find(name, 0x0);
if(obj == 0){
wIret.fd = 0;
wIret.iWinId = 0;
@@ -642,10 +642,10 @@ void PukeController::hdlrPukeDeleteWidget(int fd, PukeMessage *pm)
kdDebug(5008) << "WidgetRunner:: no such set of widget descriptors?" << endl;
throw(errorCommandFailed(PUKE_INVALID, INVALID_DEL_NO_SUCH_CONNECTION));
}
- if(qidWS->tqfind(wI.iWinId)){
+ if(qidWS->find(wI.iWinId)){
// Remove the list item then delete the widget. This will stop
// the destroyed signal from trying to remove it again.
- PObject *pw = qidWS->tqfind(wI.iWinId)->pwidget;
+ PObject *pw = qidWS->find(wI.iWinId)->pwidget;
qidWS->remove(wI.iWinId);
delete pw; pw = 0;
pmRet.iCommand = PUKE_WIDGET_DELETE_ACK;
@@ -661,8 +661,8 @@ void PukeController::hdlrPukeDeleteWidget(int fd, PukeMessage *pm)
throw(errorCommandFailed(PUKE_INVALID, INVALID_DEL_NO_SUCH_WIDGET));
}
- WidgetList[fd]->tqfind(wI.iWinId)->pwidget->manTerm();
- delete WidgetList[fd]->tqfind(wI.iWinId)->pwidget;
+ WidgetList[fd]->find(wI.iWinId)->pwidget->manTerm();
+ delete WidgetList[fd]->find(wI.iWinId)->pwidget;
PukeMessage pmRet = *pm;
pmRet.iCommand = PUKE_WIDGET_DELETE_ACK;
@@ -745,7 +745,7 @@ void PukeController::closefd(int fd)
bool PukeController::checkWidgetId(widgetId *pwi)
{
if(WidgetList[pwi->fd] != NULL)
- if(WidgetList[pwi->fd]->tqfind(pwi->iWinId) != NULL)
+ if(WidgetList[pwi->fd]->find(pwi->iWinId) != NULL)
return TRUE;
return FALSE;
@@ -753,7 +753,7 @@ bool PukeController::checkWidgetId(widgetId *pwi)
PObject *PukeController::id2pobject(widgetId *pwi){
if(checkWidgetId(pwi) == TRUE){
- return WidgetList[pwi->fd]->tqfind(pwi->iWinId)->pwidget;
+ return WidgetList[pwi->fd]->find(pwi->iWinId)->pwidget;
}
throw(errorNoSuchWidget(*pwi));
return 0; // never reached
@@ -899,7 +899,7 @@ void PukeController::messageHandler(int fd, PukeMessage *pm) {
}
else{
if(checkWidgetId(&wI) == TRUE){
- WidgetList[wI.fd]->tqfind(wI.iWinId)->pwidget->messageHandler(fd, pm);
+ WidgetList[wI.fd]->find(wI.iWinId)->pwidget->messageHandler(fd, pm);
}
else{
PukeMessage pmRet;
@@ -943,7 +943,7 @@ widgetId PukeController::createWidget(widgetId wI, PukeMessage *pm)
wIret.fd = wI.fd;
if(checkWidgetId(&wI) == TRUE){
- PObject *obj = WidgetList[wI.fd]->tqfind(wI.iWinId)->pwidget;
+ PObject *obj = WidgetList[wI.fd]->find(wI.iWinId)->pwidget;
if(obj->widget()->isWidgetType() == FALSE){
throw(errorCommandFailed(PUKE_INVALID, 0));
}
diff --git a/ksirc/servercontroller.cpp b/ksirc/servercontroller.cpp
index c525ec65..1f4e62d7 100644
--- a/ksirc/servercontroller.cpp
+++ b/ksirc/servercontroller.cpp
@@ -767,10 +767,10 @@ void servercontroller::WindowSelected(TQListViewItem *item)
return;
TQString txt = TQString(parent_server->text(0)) + "_" + item->text(0) + "_toplevel";
- TQWidget *obj = dynamic_cast<TQWidget *>( objFinder::tqfind(txt.utf8(), "KSircTopLevel"));
+ TQWidget *obj = dynamic_cast<TQWidget *>( objFinder::find(txt.utf8(), "KSircTopLevel"));
if(obj == 0x0){
txt =TQString(parent_server->text(0)) + "_!" + item->text(0) + "_toplevel";
- obj = dynamic_cast<TQWidget *>( objFinder::tqfind(txt.utf8(), "KSircTopLevel"));
+ obj = dynamic_cast<TQWidget *>( objFinder::find(txt.utf8(), "KSircTopLevel"));
}
if(obj != 0x0){
diff --git a/ksirc/stringparserstate.h b/ksirc/stringparserstate.h
index 06167267..04fb96ea 100644
--- a/ksirc/stringparserstate.h
+++ b/ksirc/stringparserstate.h
@@ -33,7 +33,7 @@ public:
{
if ( m_current >= m_end )
return true;
- return m_endItems.tqfindIndex( currentValue() ) != -1;
+ return m_endItems.findIndex( currentValue() ) != -1;
}
ConstIterator current() const { return m_current; }
diff --git a/ksirc/topic.cpp b/ksirc/topic.cpp
index 3afa199d..1932fa03 100644
--- a/ksirc/topic.cpp
+++ b/ksirc/topic.cpp
@@ -51,11 +51,11 @@ void KSircTopic::setText( const TQString &_text)
TQString richText( "<font color=\"%1\">" );
richText = richText.tqarg( ksopts->textColor.name() );
- text.tqreplace('&', "&amp;");
- text.tqreplace('<', "&lt;");
- text.tqreplace('>', "&gt;");
+ text.replace('&', "&amp;");
+ text.replace('<', "&lt;");
+ text.replace('>', "&gt;");
- text.tqreplace('~', "~~");
+ text.replace('~', "~~");
// ### a bit of a hack: turn '&lt;nick&gt; message' into
// <span>&lt;nick&gt;<span> message' . span itself isn't supported but it
@@ -65,11 +65,11 @@ void KSircTopic::setText( const TQString &_text)
// '<nick message<' , which is supposedly a bug in TQt's reordering. The
// same is done for [nick] and >nick< to catch queries.
TQRegExp bidiRe( "^(&lt;\\S+&gt;)(.+)$" );
- text.tqreplace( bidiRe, TQString::tqfromLatin1( "<span>\\1</span>\\2" ) );
+ text.replace( bidiRe, TQString::tqfromLatin1( "<span>\\1</span>\\2" ) );
TQRegExp bidiRe2( "^(\\[\\S+\\])(.+)$" );
- text.tqreplace( bidiRe2, TQString::tqfromLatin1( "<span>\\1</span>\\2" ) );
+ text.replace( bidiRe2, TQString::tqfromLatin1( "<span>\\1</span>\\2" ) );
TQRegExp bidiRe3( "^(&gt;\\S+&lt;)(.+)$" );
- text.tqreplace( bidiRe3, TQString::tqfromLatin1( "<span>\\1</span>\\2" ) );
+ text.replace( bidiRe3, TQString::tqfromLatin1( "<span>\\1</span>\\2" ) );
KSParser parser;
richText += parser.parse( text );
@@ -228,9 +228,9 @@ TQPopupMenu *KSircTopicEditor::createPopupMenu( const TQPoint &pos )
void KSircTopicEditor::slotMaybeResize()
{
- if(text().tqcontains("\n")){
+ if(text().contains("\n")){
TQString s = text();
- s.tqreplace('\n', " ");
+ s.replace('\n', " ");
setText(s);
setCursorPosition(0, s.length());
}
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){