summaryrefslogtreecommitdiffstats
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
commit1b35f1baa94eb0b3869c0dadd5d467075370da3f (patch)
tree0c0330ed83508e646e69203aaa530e0f7e33f91f
parent5dde1b467f283301f2ea456abf72b04536b2687b (diff)
downloadkonversation-1b35f1baa94eb0b3869c0dadd5d467075370da3f.tar.gz
konversation-1b35f1baa94eb0b3869c0dadd5d467075370da3f.zip
rename the following methods:
tqfind find tqreplace replace tqcontains contains git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/konversation@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
-rwxr-xr-xkonversation/scripts/media4
-rw-r--r--konversation/src/autoreplace_preferences.cpp2
-rw-r--r--konversation/src/awaymanager.cpp12
-rw-r--r--konversation/src/blowfish/BlowfishCbc.cpp2
-rw-r--r--konversation/src/blowfish/BlowfishCbc.h2
-rw-r--r--konversation/src/channel.cpp34
-rw-r--r--konversation/src/channellistpanel.cpp14
-rw-r--r--konversation/src/channeloptionsdialog.cpp4
-rw-r--r--konversation/src/chatwindow.cpp8
-rw-r--r--konversation/src/common.cpp18
-rw-r--r--konversation/src/config/preferences.cpp18
-rw-r--r--konversation/src/connectionmanager.cpp18
-rw-r--r--konversation/src/dccchat.cpp2
-rw-r--r--konversation/src/dccresumedialog.cpp6
-rw-r--r--konversation/src/dcctransfer.cpp2
-rw-r--r--konversation/src/dcctransferpanel.cpp2
-rw-r--r--konversation/src/dcctransfersend.cpp8
-rw-r--r--konversation/src/editnotifydialog.cpp2
-rw-r--r--konversation/src/emoticon.cpp2
-rw-r--r--konversation/src/identitydialog.cpp2
-rw-r--r--konversation/src/inputfilter.cpp58
-rw-r--r--konversation/src/irccharsets.cpp8
-rw-r--r--konversation/src/ircinput.cpp24
-rw-r--r--konversation/src/ircview.cpp66
-rw-r--r--konversation/src/konvdcop.cpp6
-rw-r--r--konversation/src/konversationapplication.cpp26
-rw-r--r--konversation/src/konversationapplication.h4
-rw-r--r--konversation/src/konvibookmarkmenu.cpp2
-rw-r--r--konversation/src/konviconfigdialog.cpp2
-rw-r--r--konversation/src/konvisettingsdialog.cpp4
-rw-r--r--konversation/src/linkaddressbook/addressbook_base.cpp2
-rw-r--r--konversation/src/logfilereader.cpp4
-rw-r--r--konversation/src/multilinetextedit.cpp2
-rw-r--r--konversation/src/nick.cpp12
-rw-r--r--konversation/src/nickinfo.cpp2
-rw-r--r--konversation/src/nickinfo.h2
-rw-r--r--konversation/src/nicksonline.cpp12
-rw-r--r--konversation/src/osd.cpp8
-rw-r--r--konversation/src/outputfilter.cpp64
-rw-r--r--konversation/src/query.cpp2
-rw-r--r--konversation/src/server.cpp94
-rw-r--r--konversation/src/servergroupdialog.cpp2
-rw-r--r--konversation/src/servergroupsettings.cpp2
-rw-r--r--konversation/src/serverison.cpp8
-rw-r--r--konversation/src/topiclabel.cpp12
-rw-r--r--konversation/src/urlcatcher.cpp2
-rw-r--r--konversation/src/viewcontainer.cpp16
-rw-r--r--konversation/src/viewtree.cpp2
-rw-r--r--konversation/src/watchednicknames_preferences.cpp2
49 files changed, 306 insertions, 306 deletions
diff --git a/konversation/scripts/media b/konversation/scripts/media
index cc9b645..e369262 100755
--- a/konversation/scripts/media
+++ b/konversation/scripts/media
@@ -126,7 +126,7 @@ class Player(object):
if mode and mode != self.displayName:
self._format['intro']=self._format[mode]
else:
- self._format['intro']=self._format[self.type.tqreplace(',','').split()[0]]
+ self._format['intro']=self._format[self.type.replace(',','').split()[0]]
return string.Template(outputFormat).safe_substitute(self._format)
return ''
@@ -167,7 +167,7 @@ class Player(object):
try:
input = input.decode('latin-1')
except UnicodeError:
- input = input.decode('ascii', 'tqreplace')
+ input = input.decode('ascii', 'replace')
except NameError:
pass
return input.encode('utf-8')
diff --git a/konversation/src/autoreplace_preferences.cpp b/konversation/src/autoreplace_preferences.cpp
index 8e7ed9c..6c3fb9e 100644
--- a/konversation/src/autoreplace_preferences.cpp
+++ b/konversation/src/autoreplace_preferences.cpp
@@ -146,7 +146,7 @@ void Autoreplace_Config::saveSettings()
for(unsigned int index=0;index<newList.count();index++)
{
// write the current entry's pattern and replacement (adds a "#" to preserve blanks at the end of the line)
- config->writeEntry(TQString("Autotqreplace%1").tqarg(index),newList[index]+'#');
+ config->writeEntry(TQString("Autoreplace%1").tqarg(index),newList[index]+'#');
} // for
}
// if there were no entries at all, write a dummy entry to prevent KConfigXT from "optimizing"
diff --git a/konversation/src/awaymanager.cpp b/konversation/src/awaymanager.cpp
index f5d8202..fd65596 100644
--- a/konversation/src/awaymanager.cpp
+++ b/konversation/src/awaymanager.cpp
@@ -122,7 +122,7 @@ void AwayManager::identityOnline(int identityId)
IdentityPtr identity = Preferences::identityById(identityId);
if (identity && identity->getAutomaticAway() &&
- !m_identitiesOnAutoAway.tqcontains(identityId))
+ !m_identitiesOnAutoAway.contains(identityId))
{
m_identitiesOnAutoAway.append(identityId);
@@ -132,7 +132,7 @@ void AwayManager::identityOnline(int identityId)
void AwayManager::identityOffline(int identityId)
{
- if (m_identitiesOnAutoAway.tqcontains(identityId))
+ if (m_identitiesOnAutoAway.contains(identityId))
{
m_identitiesOnAutoAway.remove(identityId);
@@ -245,7 +245,7 @@ void AwayManager::implementIdleAutoAway(bool activity)
{
IdentityPtr identity = server->getIdentity();
- if (m_identitiesOnAutoAway.tqcontains(identity->id()) && identity->getAutomaticUnaway()
+ if (m_identitiesOnAutoAway.contains(identity->id()) && identity->getAutomaticUnaway()
&& server->isConnected() && server->isAway())
{
server->requestUnaway();
@@ -272,7 +272,7 @@ void AwayManager::implementIdleAutoAway(bool activity)
{
int identityId = server->getIdentity()->id();
- if (identitiesIdleTimeExceeded.tqcontains(identityId) && server->isConnected() && !server->isAway())
+ if (identitiesIdleTimeExceeded.contains(identityId) && server->isConnected() && !server->isAway())
server->requestAway();
}
}
@@ -289,7 +289,7 @@ void AwayManager::setManagedIdentitiesAway()
for (server = serverList.first(); server; server = serverList.next())
{
- if (m_identitiesOnAutoAway.tqcontains(server->getIdentity()->id()) && server->isConnected() && !server->isAway())
+ if (m_identitiesOnAutoAway.contains(server->getIdentity()->id()) && server->isConnected() && !server->isAway())
server->requestAway();
}
}
@@ -303,7 +303,7 @@ void AwayManager::setManagedIdentitiesUnaway()
{
IdentityPtr identity = server->getIdentity();
- if (m_identitiesOnAutoAway.tqcontains(identity->id()) && identity->getAutomaticUnaway()
+ if (m_identitiesOnAutoAway.contains(identity->id()) && identity->getAutomaticUnaway()
&& server->isConnected() && server->isAway())
{
server->requestUnaway();
diff --git a/konversation/src/blowfish/BlowfishCbc.cpp b/konversation/src/blowfish/BlowfishCbc.cpp
index b798e29..fd8ff2f 100644
--- a/konversation/src/blowfish/BlowfishCbc.cpp
+++ b/konversation/src/blowfish/BlowfishCbc.cpp
@@ -15,7 +15,7 @@
//---------------------------------------------------------------------------
// Mouser 1/14/05
// I'm not sure this implementation of cbc is exactly the same as other cbc
-// algorithms you may tqfind, though the different is insignificant and just
+// algorithms you may find, though the different is insignificant and just
// requires you to call your other algorithm slightly differently.
// This blowfish cbc class basically pretends that the IV is 00000000 but
// but that the first 8byte block of the plaintext to encrypt is treated
diff --git a/konversation/src/blowfish/BlowfishCbc.h b/konversation/src/blowfish/BlowfishCbc.h
index b4c1b23..2abb335 100644
--- a/konversation/src/blowfish/BlowfishCbc.h
+++ b/konversation/src/blowfish/BlowfishCbc.h
@@ -15,7 +15,7 @@
//---------------------------------------------------------------------------
// Mouser 1/14/05
// I'm not sure this implementation of cbc is exactly the same as other cbc
-// algorithms you may tqfind, though the difference is insignificant and just
+// algorithms you may find, though the difference is insignificant and just
// requires you to call your other algorithm slightly differently.
// This blowfish cbc class basically pretends that the IV is 00000000 but
// but that the first 8byte block of the plaintext to encrypt is treated
diff --git a/konversation/src/channel.cpp b/konversation/src/channel.cpp
index e8d9426..a99baba 100644
--- a/konversation/src/channel.cpp
+++ b/konversation/src/channel.cpp
@@ -661,18 +661,18 @@ void Channel::popupCommand(int id)
if (!pattern.isEmpty())
{
- pattern.tqreplace("%c",getName());
+ pattern.replace("%c",getName());
TQString command;
- if (pattern.tqcontains("%l"))
+ if (pattern.contains("%l"))
{
TQStringList list;
for (TQStringList::Iterator it=nickList.begin(); it!=nickList.end(); ++it)
list.append((*it));
- command = pattern.tqreplace("%l", list.join(" "));
+ command = pattern.replace("%l", list.join(" "));
if (raw)
m_server->queue(command);
@@ -688,7 +688,7 @@ void Channel::popupCommand(int id)
for (unsigned int index = 0; index<patternList.count(); index++)
{
command = patternList[index];
- command.tqreplace("%u", (*it));
+ command.replace("%u", (*it));
if (raw)
m_server->queue(command);
@@ -817,7 +817,7 @@ void Channel::completeNick()
{
TQString lookNick = nicknameList.at(completionPosition)->getChannelNick()->getNickname();
- if(!prefixCharacter.isEmpty() && lookNick.tqcontains(prefixCharacter))
+ if(!prefixCharacter.isEmpty() && lookNick.contains(prefixCharacter))
{
lookNick = lookNick.section( prefixCharacter,1 );
}
@@ -904,7 +904,7 @@ bool Channel::autoJoin()
Konversation::ChannelList channelList = m_server->getServerGroup()->channelList();
if (!channelList.empty())
- return channelList.tqfind(channelSettings()) != channelList.end();
+ return channelList.find(channelSettings()) != channelList.end();
else
return false;
}
@@ -1183,7 +1183,7 @@ void Channel::quickButtonClicked(const TQString &buttonText)
TQString out=m_server->parseWildcards(buttonText,m_server->getNickname(),getName(),getPassword(),getSelectedNickList(),TQString());
// are there any newlines in the definition?
- if(out.tqfind('\n')!=-1)
+ if(out.find('\n')!=-1)
sendChannelText(out);
// single line without newline needs to be copied into input line
else
@@ -1295,7 +1295,7 @@ void Channel::removeNick(ChannelNickPtr channelNick, const TQString &reason, boo
if(!displayReason.isEmpty())
{
// if the reason contains text markup characters, play it safe and reset all
- if(displayReason.tqfind(TQRegExp("[\\0000-\\0037]")) != -1)
+ if(displayReason.find(TQRegExp("[\\0000-\\0037]")) != -1)
displayReason += "\017";
}
@@ -1366,7 +1366,7 @@ void Channel::kickNick(ChannelNickPtr channelNick, const TQString &kicker, const
if(!displayReason.isEmpty())
{
// if the reason contains text markup characters, play it safe and reset all
- if(displayReason.tqfind(TQRegExp("[\\0000-\\0037]")) != -1)
+ if(displayReason.find(TQRegExp("[\\0000-\\0037]")) != -1)
displayReason += "\017";
}
@@ -2071,7 +2071,7 @@ void Channel::updateModeWidgets(char mode, bool plus, const TQString &parameter)
for(TQStringList::iterator it = removable.begin(); it != removable.end(); ++it)
{
- m_modeList.remove(m_modeList.tqfind((*it)));
+ m_modeList.remove(m_modeList.find((*it)));
}
}
emit modesChanged();
@@ -2114,9 +2114,9 @@ void Channel::updateQuickButtons(const TQStringList &newButtonList)
quickButton->setDefinition(buttonText);
// Add tool tips
- TQString toolTip=buttonText.tqreplace("&","&amp;").
- tqreplace("<","&lt;").
- tqreplace(">","&gt;");
+ TQString toolTip=buttonText.replace("&","&amp;").
+ replace("<","&lt;").
+ replace(">","&gt;");
TQToolTip::add(quickButton,toolTip);
@@ -2871,7 +2871,7 @@ TQString NickList::completeNick(const TQString& pattern, bool& complete, TQStrin
NickList foundNicks;
foundNicks.setCompareMethod(NickList::TimeStamp);
- if((pattern.tqfind(TQRegExp("^(\\d|\\w)")) != -1) && skipNonAlfaNum)
+ if((pattern.find(TQRegExp("^(\\d|\\w)")) != -1) && skipNonAlfaNum)
{
prefix = "^([^\\d\\w]|[\\_]){0,}";
}
@@ -2884,12 +2884,12 @@ TQString NickList::completeNick(const TQString& pattern, bool& complete, TQStrin
{
newNick = it.current()->getChannelNick()->getNickname();
- if(!prefix.isEmpty() && newNick.tqcontains(prefixCharacter))
+ if(!prefix.isEmpty() && newNick.contains(prefixCharacter))
{
newNick = newNick.section( prefixCharacter,1 );
}
- if(newNick.tqfind(regexp) != -1)
+ if(newNick.find(regexp) != -1)
{
foundNicks.append(it.current());
}
@@ -2956,5 +2956,5 @@ bool NickList::containsNick(const TQString& nickname)
#include "channel.moc"
-// kate: space-indent on; tab-width 4; indent-width 4; mixed-indent off; tqreplace-tabs on;
+// kate: space-indent on; tab-width 4; indent-width 4; mixed-indent off; replace-tabs on;
// vim: set et sw=4 ts=4 cino=l1,cs,U1:
diff --git a/konversation/src/channellistpanel.cpp b/konversation/src/channellistpanel.cpp
index 59a3932..698e52d 100644
--- a/konversation/src/channellistpanel.cpp
+++ b/konversation/src/channellistpanel.cpp
@@ -236,7 +236,7 @@ void ChannelListPanel::saveList()
{
TQString channelName;
channelName.fill(' ',maxChannelWidth);
- channelName.tqreplace(0,item->text(0).length(),item->text(0));
+ channelName.replace(0,item->text(0).length(),item->text(0));
TQString nicksPad;
nicksPad.fill(' ',maxNicksWidth);
@@ -440,12 +440,12 @@ void ChannelListPanel::applyFilterToItem(TQListViewItem* item)
{
if(getChannelTarget())
{
- if(item->text(0).tqfind(TQRegExp(getFilterText(),false,!getRegExp()))==-1) visible=false;
+ if(item->text(0).find(TQRegExp(getFilterText(),false,!getRegExp()))==-1) visible=false;
}
if(getTopicTarget())
{
- if(item->text(2).tqfind(TQRegExp(getFilterText(),false,!getRegExp()))==-1) visible=false;
+ if(item->text(2).find(TQRegExp(getFilterText(),false,!getRegExp()))==-1) visible=false;
}
}
@@ -537,8 +537,8 @@ void ChannelListPanel::contextMenu (KListView* /* l */, TQListViewItem* i, const
else if(href.startsWith("ftp.")) href="ftp://"+href;
// Replace all spaces with %20 in href
- href.tqreplace(' ', "%20");
- href.tqreplace('&', "&&");
+ href.replace(' ', "%20");
+ href.replace('&', "&&");
// next search begins right after the link
pos+=url.length();
@@ -561,8 +561,8 @@ void ChannelListPanel::contextMenu (KListView* /* l */, TQListViewItem* i, const
int selected = showURLmenu->exec(p);
if (selected!=-1)
{
- TQMenuItem* item = showURLmenu->tqfindItem( selected );
- new KRun(KURL(item->text().tqreplace("&&","&")));
+ TQMenuItem* item = showURLmenu->findItem( selected );
+ new KRun(KURL(item->text().replace("&&","&")));
}
delete showURLmenu;
diff --git a/konversation/src/channeloptionsdialog.cpp b/konversation/src/channeloptionsdialog.cpp
index e6a6ed6..afb3f7f 100644
--- a/konversation/src/channeloptionsdialog.cpp
+++ b/konversation/src/channeloptionsdialog.cpp
@@ -160,7 +160,7 @@ namespace Konversation
TQString ChannelOptionsDialog::topic()
{
- return m_widget->topicEdit->text().tqreplace("\n"," ");
+ return m_widget->topicEdit->text().replace("\n"," ");
}
void ChannelOptionsDialog::refreshTopicHistory()
@@ -388,7 +388,7 @@ namespace Konversation
void ChannelOptionsDialog::removeBan(const TQString& ban)
{
- delete m_widget->banList->tqfindItem(ban, 0);
+ delete m_widget->banList->findItem(ban, 0);
}
void ChannelOptionsDialog::banEdited(TQListViewItem *edited)
diff --git a/konversation/src/chatwindow.cpp b/konversation/src/chatwindow.cpp
index f214703..2ba73ff 100644
--- a/konversation/src/chatwindow.cpp
+++ b/konversation/src/chatwindow.cpp
@@ -226,7 +226,7 @@ void ChatWindow::setLogfileName(const TQString& name)
else if (m_server)
{
// make sure that no path delimiters are in the name
- logName = TQString(TQString(m_server->getDisplayName().lower()).append('_').append(name).append(".log")).tqreplace('/','_');
+ logName = TQString(TQString(m_server->getDisplayName().lower()).append('_').append(name).append(".log")).replace('/','_');
}
// load backlog to show
@@ -283,12 +283,12 @@ void ChatWindow::setLogfileName(const TQString& name)
if(backlog.tqdevice()->at() == filePosition) backlog.tqdevice()->at(filePosition + 1);
// if a tab character is present in the line
- if(backlogLine.tqfind('\t') != -1)
+ if(backlogLine.find('\t') != -1)
{
// extract first column from log
- TQString backlogFirst = backlogLine.left(backlogLine.tqfind('\t'));
+ TQString backlogFirst = backlogLine.left(backlogLine.find('\t'));
// cut first column from line
- backlogLine = backlogLine.mid(backlogLine.tqfind('\t') + 1);
+ backlogLine = backlogLine.mid(backlogLine.find('\t') + 1);
// Logfile is in utf8 so we don't need to do encoding stuff here
// append backlog with time and first column to text view
firstColumnsInPacket << backlogFirst;
diff --git a/konversation/src/common.cpp b/konversation/src/common.cpp
index 54f54b1..7e1d301 100644
--- a/konversation/src/common.cpp
+++ b/konversation/src/common.cpp
@@ -68,7 +68,7 @@ namespace Konversation
link = "<a href=\"#%1\">%2</a>";
}
- if(filteredLine.tqcontains("#"))
+ if(filteredLine.contains("#"))
{
TQRegExp chanExp("(^|\\s|^\"|\\s\"|,|'|\\(|\\:|!|@|%|\\+)(#[^,\\s;\\)\\:\\/\\(\\<\\>]*[^.,\\s;\\)\\:\\/\\(\"\''\\<\\>])");
while((pos = chanExp.search(filteredLine, pos)) >= 0)
@@ -78,8 +78,8 @@ namespace Konversation
pos += chanExp.cap(1).length();
// HACK:Use space as a placeholder for \ as TQt tries to be clever and does a replace to / in urls in TQTextEdit
- insertText = link.tqarg(TQString(href).tqreplace('\\', " "), href);
- filteredLine.tqreplace(pos, urlLen, insertText);
+ insertText = link.tqarg(TQString(href).replace('\\', " "), href);
+ filteredLine.replace(pos, urlLen, insertText);
pos += insertText.length();
}
}
@@ -104,7 +104,7 @@ namespace Konversation
TQString append;
// check if the matched text is already replaced as a channel
- if ( filteredLine.tqfindRev( "<a", pos ) > filteredLine.tqfindRev( "</a>", pos ) )
+ if ( filteredLine.findRev( "<a", pos ) > filteredLine.findRev( "</a>", pos ) )
{
++pos;
continue;
@@ -131,7 +131,7 @@ namespace Konversation
// Don't consider trailing closing parenthesis part of link when
// there's an opening parenthesis preceding the beginning of the
// URL or there is no opening parenthesis in the URL at all.
- if (href.right(1) == ")" && (filteredLine.mid(pos-1,1) == "(" || !href.tqcontains("(")))
+ if (href.right(1) == ")" && (filteredLine.mid(pos-1,1) == "(" || !href.contains("(")))
{
href.truncate(href.length()-1);
append.prepend(")");
@@ -151,15 +151,15 @@ namespace Konversation
// Use \x0b as a placeholder for & so we can readd them after changing all & in the normal text to &amp;
// HACK Replace % with \x03 in the url to keep TQt from doing stupid things
- insertText = link.tqarg(protocol, TQString(href).tqreplace('&', "\x0b").tqreplace('%', "\x03"), href) + append;
- filteredLine.tqreplace(pos, urlLen, insertText);
+ insertText = link.tqarg(protocol, TQString(href).replace('&', "\x0b").replace('%', "\x03"), href) + append;
+ filteredLine.replace(pos, urlLen, insertText);
pos += insertText.length();
KonversationApplication::instance()->storeUrl(fromNick, href);
}
// Change & to &amp; to prevent html entities to do strange things to the text
- filteredLine.tqreplace('&', "&amp;");
- filteredLine.tqreplace("\x0b", "&");
+ filteredLine.replace('&', "&amp;");
+ filteredLine.replace("\x0b", "&");
// kdDebug() << "Took (msecs) : " << timer.elapsed() << " for " << filteredLine << endl;
diff --git a/konversation/src/config/preferences.cpp b/konversation/src/config/preferences.cpp
index 37b1a70..c28c844 100644
--- a/konversation/src/config/preferences.cpp
+++ b/konversation/src/config/preferences.cpp
@@ -330,7 +330,7 @@ const TQMap<int, TQStringList> Preferences::notifyList() { return self()->mNotif
const TQStringList Preferences::notifyListByGroupName(const TQString& groupName)
{
int id=serverGroupIdByName(groupName);
- if (id && self()->mNotifyList.tqfind(id) != self()->mNotifyList.end())
+ if (id && self()->mNotifyList.find(id) != self()->mNotifyList.end())
return self()->mNotifyList[id];
else
return TQStringList();
@@ -343,7 +343,7 @@ const TQString Preferences::notifyStringByGroupName(const TQString& groupName)
bool Preferences::addNotify(int serverGroupId, const TQString& newPattern)
{
- if (!self()->mNotifyList[serverGroupId].tqcontains(newPattern))
+ if (!self()->mNotifyList[serverGroupId].contains(newPattern))
{
TQStringList nicknameList = self()->mNotifyList[serverGroupId];
nicknameList.append(newPattern);
@@ -358,7 +358,7 @@ bool Preferences::removeNotify(const TQString& groupName, const TQString& patter
int id=serverGroupIdByName(groupName);
if(!id) return false;
- if (self()->mNotifyList.tqfind(id) != self()->mNotifyList.end())
+ if (self()->mNotifyList.find(id) != self()->mNotifyList.end())
{
TQStringList nicknameList = self()->mNotifyList[id];
nicknameList.remove(pattern);
@@ -373,18 +373,18 @@ bool Preferences::removeNotify(const TQString& groupName, const TQString& patter
bool Preferences::isNotify(int serverGroupId, const TQString& pattern)
{
- if (self()->mNotifyList.tqfind(serverGroupId) != self()->mNotifyList.end())
+ if (self()->mNotifyList.find(serverGroupId) != self()->mNotifyList.end())
{
TQStringList nicknameList = self()->mNotifyList[serverGroupId];
- if (nicknameList.tqcontains(pattern)) return true;
+ if (nicknameList.contains(pattern)) return true;
}
return false;
}
bool Preferences::hasNotifyList(int serverGroupId)
{
- if (self()->mNotifyList.tqfind(serverGroupId) != self()->mNotifyList.end())
+ if (self()->mNotifyList.find(serverGroupId) != self()->mNotifyList.end())
return true;
else
return false;
@@ -562,8 +562,8 @@ const TQString Preferences::channelEncoding(const TQString& server,const TQStrin
const TQString Preferences::channelEncoding(int serverGroupId,const TQString& channel)
{
- if(self()->mChannelEncodingsMap.tqcontains(serverGroupId))
- if(self()->mChannelEncodingsMap[serverGroupId].tqcontains(channel.lower()))
+ if(self()->mChannelEncodingsMap.contains(serverGroupId))
+ if(self()->mChannelEncodingsMap[serverGroupId].contains(channel.lower()))
return self()->mChannelEncodingsMap[serverGroupId][channel.lower()];
return TQString();
}
@@ -598,7 +598,7 @@ TQString Preferences::webBrowserCmd()
{
// add %u to command if it's not in there
TQString cmd=self()->mWebBrowserCmd;
- if(cmd.tqfind("%u")==-1) cmd+=" %u";
+ if(cmd.find("%u")==-1) cmd+=" %u";
return cmd;
}
diff --git a/konversation/src/connectionmanager.cpp b/konversation/src/connectionmanager.cpp
index 1942f88..366d7b7 100644
--- a/konversation/src/connectionmanager.cpp
+++ b/konversation/src/connectionmanager.cpp
@@ -146,7 +146,7 @@ void ConnectionManager::handleConnectionStateChange(Server* server, Konversation
if (state == Konversation::SSConnected)
{
- if (!m_activeIdentities.tqcontains(identityId))
+ if (!m_activeIdentities.contains(identityId))
{
m_activeIdentities.append(identityId);
@@ -155,7 +155,7 @@ void ConnectionManager::handleConnectionStateChange(Server* server, Konversation
}
else if (state != Konversation::SSConnecting)
{
- if (m_activeIdentities.tqcontains(identityId))
+ if (m_activeIdentities.contains(identityId))
{
m_activeIdentities.remove(identityId);
@@ -191,7 +191,7 @@ void ConnectionManager::handleReconnect(Server* server)
{
Konversation::ServerList serverList = settings.serverGroup()->serverList();
- int index = serverList.tqfindIndex(settings.server());
+ int index = serverList.findIndex(settings.server());
int size = serverList.size();
if (index == size - 1 || index == -1)
@@ -246,7 +246,7 @@ void ConnectionManager::decodeIrcUrl(const TQString& url, ConnectionSettings& se
mangledUrlSegments = TQStringList::split('/', mangledUrl, false);
// Check for ",isserver".
- if (mangledUrlSegments[0].tqcontains(','))
+ if (mangledUrlSegments[0].contains(','))
{
TQStringList addressSegments;
bool checkIfServerGroup = true;
@@ -271,7 +271,7 @@ void ConnectionManager::decodeIrcUrl(const TQString& url, ConnectionSettings& se
if (!channel.isEmpty())
{
// Add default prefix to channel if necessary.
- if (!channel.tqcontains(TQRegExp("^[#+&]{1}")))
+ if (!channel.contains(TQRegExp("^[#+&]{1}")))
channel = '#' + channel;
channelSettings.setName(channel);
@@ -321,7 +321,7 @@ void ConnectionManager::decodeAddress(const TQString& address, ConnectionSetting
// Full-length IPv6 address with port
// Example: RFC 2732 notation: [2001:0DB8:0000:0000:0000:0000:1428:57ab]:6666
// Example: Non-RFC 2732 notation: 2001:0DB8:0000:0000:0000:0000:1428:57ab:6666
- if (address.tqcontains(':')==8)
+ if (address.contains(':')==8)
{
host = address.section(':',0,-2).remove("[").remove("]");
port = address.section(':',-1);
@@ -330,7 +330,7 @@ void ConnectionManager::decodeAddress(const TQString& address, ConnectionSetting
// Example: Without port, RFC 2732 notation: [2001:0DB8:0000:0000:0000:0000:1428:57ab]
// Example: Without port, Non-RFC 2732 notation: 2001:0DB8:0000:0000:0000:0000:1428:57ab
// Example: With port, RFC 2732 notation: [2001:0DB8::1428:57ab]:6666
- else if (address.tqcontains(':')>=4)
+ else if (address.contains(':')>=4)
{
// Last segment does not end with ], but the next to last does;
// Assume not-full-length IPv6 address with port
@@ -349,7 +349,7 @@ void ConnectionManager::decodeAddress(const TQString& address, ConnectionSetting
// IPv4 address or ordinary hostname with port
// Example: IPv4 address with port: 123.123.123.123:6666
// Example: Hostname with port: irc.bla.org:6666
- else if (address.tqcontains(':')==1)
+ else if (address.contains(':')==1)
{
host = address.section(':',0,-2);
port = address.section(':',-1);
@@ -550,7 +550,7 @@ TQPtrList<Server> ConnectionManager::getServerList()
Server* ConnectionManager::getServerByConnectionId(int connectionId)
{
- if (m_connectionList.tqcontains(connectionId))
+ if (m_connectionList.contains(connectionId))
return m_connectionList[connectionId];
else
return 0;
diff --git a/konversation/src/dccchat.cpp b/konversation/src/dccchat.cpp
index c1e5b68..588bf1b 100644
--- a/konversation/src/dccchat.cpp
+++ b/konversation/src/dccchat.cpp
@@ -233,7 +233,7 @@ void DccChat::readData()
if( (*itLine).startsWith( "\x01" ) )
{
// cut out the CTCP command
- TQString ctcp = (*itLine).mid( 1, (*itLine).tqfind( 1, 1 ) - 1 );
+ TQString ctcp = (*itLine).mid( 1, (*itLine).find( 1, 1 ) - 1 );
TQString ctcpCommand = ctcp.section( " ", 0, 0 );
TQString ctcpArgument = ctcp.section( " ", 1 );
diff --git a/konversation/src/dccresumedialog.cpp b/konversation/src/dccresumedialog.cpp
index 7568569..d2d3c7e 100644
--- a/konversation/src/dccresumedialog.cpp
+++ b/konversation/src/dccresumedialog.cpp
@@ -150,14 +150,14 @@ void DccResumeDialog::suggestNewName() // slot
TQString basename = m_urlreqFileURL->url().section("/", -1);
KURL baseURL(m_urlreqFileURL->url().section("/", 0, -2));
- int index = basename.tqfind( '.' );
+ int index = basename.find( '.' );
if ( index != -1 )
{
dotSuffix = basename.mid( index );
basename.truncate( index );
}
- int pos = basename.tqfindRev( '_' );
+ int pos = basename.findRev( '_' );
if(pos != -1 )
{
TQString tmp = basename.mid( pos+1 );
@@ -170,7 +170,7 @@ void DccResumeDialog::suggestNewName() // slot
else
{
// yes there's already a number behind the _ so increment it by one
- basename.tqreplace( pos+1, tmp.length(), TQString::number(number+1) );
+ basename.replace( pos+1, tmp.length(), TQString::number(number+1) );
suggestedName = basename + dotSuffix;
}
}
diff --git a/konversation/src/dcctransfer.cpp b/konversation/src/dcctransfer.cpp
index 042175a..dfeb54c 100644
--- a/konversation/src/dcctransfer.cpp
+++ b/konversation/src/dcctransfer.cpp
@@ -210,7 +210,7 @@ TQString DccTransfer::sanitizeFileName( const TQString& fileName )
{
TQString fileNameTmp = TQFileInfo( fileName ).fileName();
if ( fileNameTmp.startsWith( "." ) )
- fileNameTmp.tqreplace( 0, 1, '_' ); // Don't create hidden files
+ fileNameTmp.replace( 0, 1, '_' ); // Don't create hidden files
if ( fileNameTmp.isEmpty() )
fileNameTmp = "unnamed";
return fileNameTmp;
diff --git a/konversation/src/dcctransferpanel.cpp b/konversation/src/dcctransferpanel.cpp
index fe35bec..a1c6d3f 100644
--- a/konversation/src/dcctransferpanel.cpp
+++ b/konversation/src/dcctransferpanel.cpp
@@ -346,7 +346,7 @@ void DccTransferPanel::clearDcc()
bool itemSelected = false;
while( selected.current() )
{
- if (selected.current()->itemBelow() && !lst.tqcontainsRef(selected.current()->itemBelow()))
+ if (selected.current()->itemBelow() && !lst.containsRef(selected.current()->itemBelow()))
{
m_listView->setSelected(selected.current()->itemBelow(),true);
m_listView->setCurrentItem(selected.current()->itemBelow());
diff --git a/konversation/src/dcctransfersend.cpp b/konversation/src/dcctransfersend.cpp
index 87e0539..c909489 100644
--- a/konversation/src/dcctransfersend.cpp
+++ b/konversation/src/dcctransfersend.cpp
@@ -196,12 +196,12 @@ bool DccTransferSend::queue()
}
}
- //FIXME: if "\\\"" works well on other IRC clients, tqreplace "\"" with "\\\""
- m_fileName.tqreplace( "\"", "_" );
+ //FIXME: if "\\\"" works well on other IRC clients, replace "\"" with "\\\""
+ m_fileName.replace( "\"", "_" );
if (Preferences::dccSpaceToUnderscore())
- m_fileName.tqreplace( " ", "_" );
+ m_fileName.replace( " ", "_" );
else {
- if (m_fileName.tqcontains(" ") > 0)
+ if (m_fileName.contains(" ") > 0)
m_fileName = "\"" + m_fileName + "\"";
}
diff --git a/konversation/src/editnotifydialog.cpp b/konversation/src/editnotifydialog.cpp
index b804a09..6d6cee1 100644
--- a/konversation/src/editnotifydialog.cpp
+++ b/konversation/src/editnotifydialog.cpp
@@ -66,7 +66,7 @@ KDialogBase::Ok,true)
{
TQString name = (*it)->name();
- if (!networkNames.tqcontains(name))
+ if (!networkNames.contains(name))
{
networkNames.append(name);
}
diff --git a/konversation/src/emoticon.cpp b/konversation/src/emoticon.cpp
index e47d0fa..d4ee674 100644
--- a/konversation/src/emoticon.cpp
+++ b/konversation/src/emoticon.cpp
@@ -160,7 +160,7 @@ namespace Konversation
for(EmotIconMap::iterator it = self()->m_emotIconMap.begin(); it != self()->m_emotIconMap.end(); ++it)
{
TQRegExp regExp(TQString("(^|\\s)%1($|\\s)").tqarg(it.data()));
- filteredTxt.tqreplace(regExp, " <img width=\"" + TQString::number(fm.height()) + "\" height=\"" + TQString::number(fm.height())
+ filteredTxt.replace(regExp, " <img width=\"" + TQString::number(fm.height()) + "\" height=\"" + TQString::number(fm.height())
+ "\" src=\"" + it.key() + "\" alt=\"" + it.data() + "\">&nbsp;");
}
diff --git a/konversation/src/identitydialog.cpp b/konversation/src/identitydialog.cpp
index c4c707d..cc918b4 100644
--- a/konversation/src/identitydialog.cpp
+++ b/konversation/src/identitydialog.cpp
@@ -627,7 +627,7 @@ namespace Konversation
IdentityPtr IdentityDialog::setCurrentIdentity(IdentityPtr identity)
{
- int index = Preferences::identityList().tqfindIndex(identity);
+ int index = Preferences::identityList().findIndex(identity);
setCurrentIdentity(index);
return m_currentIdentity;
diff --git a/konversation/src/inputfilter.cpp b/konversation/src/inputfilter.cpp
index d025b73..7902b8c 100644
--- a/konversation/src/inputfilter.cpp
+++ b/konversation/src/inputfilter.cpp
@@ -57,7 +57,7 @@ void InputFilter::parseLine(const TQString& a_newLine)
// Remove white spaces at the end and beginning
newLine = newLine.stripWhiteSpace();
// Find end of middle parameter list
- int pos = newLine.tqfind(" :");
+ int pos = newLine.find(" :");
// Was there a trailing parameter?
if(pos != -1)
{
@@ -75,7 +75,7 @@ void InputFilter::parseLine(const TQString& a_newLine)
if(newLine[0] == ':')
{
// Find end of prefix
- pos = newLine.tqfind(' ');
+ pos = newLine.find(' ');
// Copy prefix
prefix = newLine.mid(1, pos - 1);
// Remove prefix from line
@@ -83,7 +83,7 @@ void InputFilter::parseLine(const TQString& a_newLine)
}
// Find end of command
- pos = newLine.tqfind(' ');
+ pos = newLine.find(' ');
// Copy command (all lowercase to make parsing easier)
TQString command = newLine.left(pos).lower();
// Are there parameters left in the string?
@@ -100,7 +100,7 @@ void InputFilter::parseLine(const TQString& a_newLine)
Q_ASSERT(server);
// Server command, if no "!" was found in prefix
- if((prefix.tqfind('!') == -1) && (prefix != server->getNickname()))
+ if((prefix.find('!') == -1) && (prefix != server->getNickname()))
{
parseServerCommand(prefix, command, parameterList, trailing);
@@ -117,7 +117,7 @@ void InputFilter::parseClientCommand(const TQString &prefix, const TQString &com
Q_ASSERT(konv_app);
Q_ASSERT(server);
// Extract nickname from prefix
- int pos = prefix.tqfind("!");
+ int pos = prefix.find("!");
TQString sourceNick = prefix.left(pos);
TQString sourceHosttqmask = prefix.mid(pos + 1);
// remember hosttqmask for this nick, it could have changed
@@ -135,11 +135,11 @@ void InputFilter::parseClientCommand(const TQString &prefix, const TQString &com
if(trailing.at(0)==TQChar(0x01))
{
// cut out the CTCP command
- TQString ctcp = trailing.mid(1,trailing.tqfind(1,1)-1);
+ TQString ctcp = trailing.mid(1,trailing.find(1,1)-1);
- TQString ctcpCommand=ctcp.left(ctcp.tqfind(" ")).lower();
- TQString ctcpArgument=ctcp.mid(ctcp.tqfind(" ")+1);
- ctcpArgument=static_cast<KonversationApplication*>(kapp)->doAutotqreplace(ctcpArgument,false);
+ TQString ctcpCommand=ctcp.left(ctcp.find(" ")).lower();
+ TQString ctcpArgument=ctcp.mid(ctcp.find(" ")+1);
+ ctcpArgument=static_cast<KonversationApplication*>(kapp)->doAutoreplace(ctcpArgument,false);
// If it was a ctcp action, build an action string
if(ctcpCommand=="action" && isChan)
@@ -157,7 +157,7 @@ void InputFilter::parseClientCommand(const TQString &prefix, const TQString &com
if(sourceNick != server->getNickname())
{
- if(ctcpArgument.lower().tqfind(TQRegExp("(^|[^\\d\\w])"
+ if(ctcpArgument.lower().find(TQRegExp("(^|[^\\d\\w])"
+ TQRegExp::escape(server->loweredNickname())
+ "([^\\d\\w]|$)")) !=-1 )
{
@@ -258,11 +258,11 @@ void InputFilter::parseClientCommand(const TQString &prefix, const TQString &com
TQString dccType=ctcpArgument.lower().section(' ',0,0);
// Support file names with spaces
- TQString dccArguments = ctcpArgument.mid(ctcpArgument.tqfind(" ")+1);
+ TQString dccArguments = ctcpArgument.mid(ctcpArgument.find(" ")+1);
TQStringList dccArgumentList;
- if ((dccArguments.tqcontains('\"') >= 2) && (dccArguments.startsWith("\""))) {
- int lastQuotePos = dccArguments.tqfindRev("\"");
+ if ((dccArguments.contains('\"') >= 2) && (dccArguments.startsWith("\""))) {
+ int lastQuotePos = dccArguments.findRev("\"");
if (dccArguments[lastQuotePos+1] == ' ') {
TQString fileName = dccArguments.mid(1, lastQuotePos-1);
dccArguments = dccArguments.mid(lastQuotePos+2);
@@ -494,7 +494,7 @@ void InputFilter::parseClientCommand(const TQString &prefix, const TQString &com
// TODO: Try to remember channel keys for autojoins and manual joins, so
// we can get %k to work
- if(channelName.tqfind(' ')!=-1)
+ if(channelName.find(' ')!=-1)
{
key=channelName.section(' ',1,1);
channelName=channelName.section(' ',0,0);
@@ -696,7 +696,7 @@ void InputFilter::parseServerCommand(const TQString &prefix, const TQString &com
{
TQString host;
- if(trailing.tqcontains("@"))
+ if(trailing.contains("@"))
host = trailing.section("@",1);
// re-set nickname, since the server may have truncated it
@@ -739,7 +739,7 @@ void InputFilter::parseServerCommand(const TQString &prefix, const TQString &com
{
TQString property, value;
int pos;
- if ((pos=(*it).tqfind( '=' )) !=-1)
+ if ((pos=(*it).find( '=' )) !=-1)
{
property = (*it).left(pos);
value = (*it).mid(pos+1);
@@ -750,7 +750,7 @@ void InputFilter::parseServerCommand(const TQString &prefix, const TQString &com
}
if (property=="PREFIX")
{
- pos = value.tqfind(')',1);
+ pos = value.find(')',1);
if(pos==-1)
{
server->setPrefixes(TQString(), value);
@@ -1181,7 +1181,7 @@ void InputFilter::parseServerCommand(const TQString &prefix, const TQString &com
{
// escape html tags
TQString escapedRealName(trailing);
- escapedRealName.tqreplace("<","&lt;").tqreplace(">","&gt;");
+ escapedRealName.replace("<","&lt;").replace(">","&gt;");
server->appendMessageToFrontmost(i18n("Whois"),
i18n("%1 is %2@%3 (%4)")
.tqarg(parameterList[1])
@@ -1279,7 +1279,7 @@ void InputFilter::parseServerCommand(const TQString &prefix, const TQString &com
{
if(!whoRequestList.isEmpty())
{ // for safety
- TQStringList::iterator it = whoRequestList.tqfind(parameterList[1].lower());
+ TQStringList::iterator it = whoRequestList.find(parameterList[1].lower());
if(it != whoRequestList.end())
{
@@ -1741,7 +1741,7 @@ void InputFilter::parseServerCommand(const TQString &prefix, const TQString &com
case RPL_CAPAB: // Special freenode reply afaik
{
// Disable as we don't use this for anything yet
- if(trailing.tqcontains("IDENTIFY-MSG"))
+ if(trailing.contains("IDENTIFY-MSG"))
{
server->enableIdentifyMsg(true);
break;
@@ -1805,7 +1805,7 @@ void InputFilter::parseModes(const TQString &sourceNick, const TQStringList &par
else
{
// Check if this was a parameter mode
- if(parameterModes.tqfind(mode)!=-1)
+ if(parameterModes.find(mode)!=-1)
{
// Check if the mode actually wants a parameter. -k and -l do not!
if(plus || (!plus && (mode!='k') && (mode!='l')))
@@ -1841,7 +1841,7 @@ bool InputFilter::isAChannel(const TQString &check)
{
Q_ASSERT(server);
// if we ever see the assert, we need the ternary
- return server? server->isAChannel(check) : TQString("#&").tqcontains(check.at(0));
+ return server? server->isAChannel(check) : TQString("#&").contains(check.at(0));
}
bool InputFilter::isIgnore(const TQString &sender, Ignore::Type type)
@@ -1853,7 +1853,7 @@ bool InputFilter::isIgnore(const TQString &sender, Ignore::Type type)
for(unsigned int index =0; index<list.count(); index++)
{
Ignore* item = list.at(index);
- TQRegExp ignoreItem(TQString(TQRegExp::escape(item->getName())).tqreplace("\\*", "(.*)"),false);
+ TQRegExp ignoreItem(TQString(TQRegExp::escape(item->getName())).replace("\\*", "(.*)"),false);
if (ignoreItem.exactMatch(sender) && (item->getFlags() & type))
doIgnore = true;
if (ignoreItem.exactMatch(sender) && (item->getFlags() & Ignore::Exception))
@@ -1888,7 +1888,7 @@ int InputFilter::getAutomaticRequest(const TQString& command, const TQString& na
void InputFilter::addWhoRequest(const TQString& name) { whoRequestList << name.lower(); }
-bool InputFilter::isWhoRequestUnderProcess(const TQString& name) { return (whoRequestList.tqcontains(name.lower())>0); }
+bool InputFilter::isWhoRequestUnderProcess(const TQString& name) { return (whoRequestList.contains(name.lower())>0); }
void InputFilter::setLagMeasuring(bool state) { lagMeasuring=state; }
@@ -1898,7 +1898,7 @@ void InputFilter::parsePrivMsg(const TQString& prefix,
const TQStringList& parameterList,
const TQString& trailing)
{
- int pos = prefix.tqfind("!");
+ int pos = prefix.find("!");
TQString source;
TQString sourceHosttqmask;
TQString message(trailing);
@@ -1914,7 +1914,7 @@ void InputFilter::parsePrivMsg(const TQString& prefix,
}
KonversationApplication* konv_app = static_cast<KonversationApplication*>(kapp);
- message = konv_app->doAutotqreplace(message, false);
+ message = konv_app->doAutoreplace(message, false);
if(isAChannel(parameterList[0]))
{
@@ -1931,7 +1931,7 @@ void InputFilter::parsePrivMsg(const TQString& prefix,
TQRegExp::escape(server->loweredNickname()) +
"([^\\d\\w]|$)");
regexp.setCaseSensitive(false);
- if(message.tqfind(regexp) !=-1 )
+ if(message.find(regexp) !=-1 )
{
konv_app->notificationHandler()->nick(channel,
source, message);
@@ -1964,7 +1964,7 @@ void InputFilter::parsePrivMsg(const TQString& prefix,
TQRegExp::escape(server->loweredNickname()) +
"([^\\d\\w]|$)");
regexp.setCaseSensitive(false);
- if(message.tqfind(regexp) !=-1 )
+ if(message.find(regexp) !=-1 )
{
konv_app->notificationHandler()->nick(query,
source, message);
@@ -1981,5 +1981,5 @@ void InputFilter::parsePrivMsg(const TQString& prefix,
#include "inputfilter.moc"
-// kate: space-indent on; tab-width 4; indent-width 4; mixed-indent off; tqreplace-tabs on;
+// kate: space-indent on; tab-width 4; indent-width 4; mixed-indent off; replace-tabs on;
// vim: set et sw=4 ts=4 cino=l1,cs,U1:
diff --git a/konversation/src/irccharsets.cpp b/konversation/src/irccharsets.cpp
index 458ad1e..0849cfc 100644
--- a/konversation/src/irccharsets.cpp
+++ b/konversation/src/irccharsets.cpp
@@ -63,7 +63,7 @@ namespace Konversation
{
// simplify ambiguousName
TQString simplifiedAmbiguousName( ambiguousName.lower() );
- simplifiedAmbiguousName.tqreplace( TQRegExp( "[^a-z0-9]" ), "" );
+ simplifiedAmbiguousName.replace( TQRegExp( "[^a-z0-9]" ), "" );
// search m_simplifiedShortNames
int index = 0;
@@ -75,7 +75,7 @@ namespace Konversation
}
// search m_shortNameAliases
- if ( m_shortNameAliases.tqcontains( simplifiedAmbiguousName ) )
+ if ( m_shortNameAliases.contains( simplifiedAmbiguousName ) )
return m_shortNameAliases[ simplifiedAmbiguousName ];
// failed
@@ -96,7 +96,7 @@ namespace Konversation
bool IRCCharsets::isValidEncoding( const TQString& shortName )
{
- return ( m_shortNames.tqcontains( shortName ) > 0 );
+ return ( m_shortNames.contains( shortName ) > 0 );
}
TQString IRCCharsets::encodingForLocale()
@@ -151,7 +151,7 @@ namespace Konversation
else
{
m_shortNames.append( encodingName );
- m_simplifiedShortNames.append( encodingName.tqreplace( reSimplify, "" ) );
+ m_simplifiedShortNames.append( encodingName.replace( reSimplify, "" ) );
if(encodingName == "jis7") // Add iso-2022-jp which is same as jis7 but not in TQt
{
diff --git a/konversation/src/ircinput.cpp b/konversation/src/ircinput.cpp
index 973da76..fb23fcc 100644
--- a/konversation/src/ircinput.cpp
+++ b/konversation/src/ircinput.cpp
@@ -258,7 +258,7 @@ void IRCInput::keyPressEvent(TQKeyEvent* e)
}
else
{
- setText(static_cast<KonversationApplication*>(kapp)->doAutotqreplace(text(),true));
+ setText(static_cast<KonversationApplication*>(kapp)->doAutoreplace(text(),true));
emit submit();
}
}
@@ -394,32 +394,32 @@ void IRCInput::paste()
bool signal=false;
- // tqreplace \r with \n to make xterm pastes happy
- pasteText.tqreplace("\r","\n");
+ // replace \r with \n to make xterm pastes happy
+ pasteText.replace("\r","\n");
// remove blank lines
- while(pasteText.tqcontains("\n\n"))
- pasteText.tqreplace("\n\n","\n");
+ while(pasteText.contains("\n\n"))
+ pasteText.replace("\n\n","\n");
TQRegExp reTopSpace("^ *\n");
- while(pasteText.tqcontains(reTopSpace))
+ while(pasteText.contains(reTopSpace))
pasteText.remove(reTopSpace);
TQRegExp reBottomSpace("\n *$");
- while(pasteText.tqcontains(reBottomSpace))
+ while(pasteText.contains(reBottomSpace))
pasteText.remove(reBottomSpace);
// Escape % when var expansion is enabled
if (!Preferences::disableExpansion())
{
- pasteText.tqreplace ('%', "%%");
+ pasteText.replace ('%', "%%");
}
// does the text contain at least one newline character?
- if(pasteText.tqfind('\n')!=-1)
+ if(pasteText.find('\n')!=-1)
{
// make comparisons easier (avoid signed / unsigned warnings)
- unsigned int pos=pasteText.tqfind('\n');
- unsigned int rpos=pasteText.tqfindRev('\n');
+ unsigned int pos=pasteText.find('\n');
+ unsigned int rpos=pasteText.findRev('\n');
// emit the signal if there's a line break in the middle of the text
if(pos>0 && pos!=(pasteText.length()-1))
@@ -468,7 +468,7 @@ bool IRCInput::checkPaste(TQString& text)
int doPaste=KMessageBox::Yes;
//text is now preconditioned when you get here
- int lines=text.tqcontains('\n');
+ int lines=text.contains('\n');
if(text.length()>256 || lines)
{
diff --git a/konversation/src/ircview.cpp b/konversation/src/ircview.cpp
index 7572626..63e046b 100644
--- a/konversation/src/ircview.cpp
+++ b/konversation/src/ircview.cpp
@@ -109,7 +109,7 @@ IRCView::IRCView(TQWidget* tqparent, Server* newServer) : KTextBrowser(tqparent)
m_popup->setItemVisible(copyUrlMenuSeparator, false);
m_popup->insertItem(SmallIconSet("editcopy"),i18n("&Copy"),Copy);
m_popup->insertItem(i18n("Select All"),SelectAll);
- m_popup->insertItem(SmallIcon("tqfind"),i18n("Find Text..."),Search);
+ m_popup->insertItem(SmallIcon("find"),i18n("Find Text..."),Search);
setServer(newServer);
@@ -205,14 +205,14 @@ void IRCView::highlightedSlot(const TQString& _link)
{
TQString link = _link;
// HACK Replace % with \x03 in the url to keep TQt from doing stupid things
- link = link.tqreplace ('\x03', "%");
+ link = link.replace ('\x03', "%");
//Hack to handle the fact that we get a decoded url
link = KURL::fromPathOrURL(link).url();
// HACK:Use space as a placeholder for \ as TQt tries to be clever and does a replace to / in urls in TQTextEdit
if(link.startsWith("#"))
{
- link = link.tqreplace(' ', "\\");
+ link = link.replace(' ', "\\");
}
//we just saw this a second ago. no need to reemit.
@@ -317,7 +317,7 @@ void IRCView::openLink(const TQString& url, bool newTab)
else
{
TQString cmd = Preferences::webBrowserCmd();
- cmd.tqreplace("%u", url);
+ cmd.replace("%u", url);
KProcess *proc = new KProcess;
TQStringList cmdAndArgs = KShell::splitArgs(cmd);
*proc << cmdAndArgs;
@@ -333,7 +333,7 @@ void IRCView::openLink(const TQString& url, bool newTab)
else if (url.startsWith("##") && m_server && m_server->isConnected())
{
TQString channel(url);
- channel.tqreplace("##", "#");
+ channel.replace("##", "#");
m_server->sendJoinCommand(channel);
}
//FIXME: Don't do user links in DCC Chats to begin with since they don't have a server.
@@ -351,9 +351,9 @@ void IRCView::replaceDecoration(TQString& line, char decoration, char replacemen
int pos;
bool decorated = false;
- while((pos=line.tqfind(decoration))!=-1)
+ while((pos=line.find(decoration))!=-1)
{
- line.tqreplace(pos,1,(decorated) ? TQString("</%1>").tqarg(replacement) : TQString("<%1>").tqarg(replacement));
+ line.replace(pos,1,(decorated) ? TQString("</%1>").tqarg(replacement) : TQString("<%1>").tqarg(replacement));
decorated = !decorated;
}
}
@@ -373,9 +373,9 @@ bool doHighlight, bool parseURL, bool self)
// TODO: Use TQStyleSheet::escape() here
// Replace all < with &lt;
- filteredLine.tqreplace("<","\x0blt;");
+ filteredLine.replace("<","\x0blt;");
// Replace all > with &gt;
- filteredLine.tqreplace(">", "\x0bgt;");
+ filteredLine.replace(">", "\x0bgt;");
#if 0
if(!Preferences::disableExpansion())
@@ -392,7 +392,7 @@ bool doHighlight, bool parseURL, bool self)
{
replacement = boldRe.cap(1);
replacement = "\x02"+replacement+"\x02";
- filteredLine.tqreplace(position,replacement.length()+2,replacement);
+ filteredLine.replace(position,replacement.length()+2,replacement);
}
position += boldRe.matchedLength();
}
@@ -405,14 +405,14 @@ bool doHighlight, bool parseURL, bool self)
{
replacement = underRe.cap(1);
replacement = "\x1f"+replacement+"\x1f";
- filteredLine.tqreplace(position,replacement.length()+2,replacement);
+ filteredLine.replace(position,replacement.length()+2,replacement);
}
position += underRe.matchedLength();
}
}
#endif
- if(filteredLine.tqfind("\x07") != -1)
+ if(filteredLine.find("\x07") != -1)
{
if(Preferences::beep())
{
@@ -420,7 +420,7 @@ bool doHighlight, bool parseURL, bool self)
}
}
- // tqreplace \003 and \017 codes with rich text color codes
+ // replace \003 and \017 codes with rich text color codes
// captures 1 2 23 4 4 3 1
TQRegExp colorRegExp("(\003([0-9]|0[0-9]|1[0-5]|)(,([0-9]|0[0-9]|1[0-5])|,|)|\017)");
@@ -458,7 +458,7 @@ bool doHighlight, bool parseURL, bool self)
firstColor = false;
}
- filteredLine.tqreplace(pos, colorRegExp.cap(0).length(), colorString);
+ filteredLine.replace(pos, colorRegExp.cap(0).length(), colorString);
}
if(!firstColor)
@@ -480,8 +480,8 @@ bool doHighlight, bool parseURL, bool self)
else
{
// Change & to &amp; to prevent html entities to do strange things to the text
- filteredLine.tqreplace('&', "&amp;");
- filteredLine.tqreplace("\x0b", "&");
+ filteredLine.replace('&', "&amp;");
+ filteredLine.replace("\x0b", "&");
}
filteredLine = Konversation::EmotIcon::filter(filteredLine, fontMetrics());
@@ -503,7 +503,7 @@ bool doHighlight, bool parseURL, bool self)
TQString highlightColor;
if(Preferences::highlightNick() &&
- filteredLine.lower().tqfind(TQRegExp("(^|[^\\d\\w])" +
+ filteredLine.lower().find(TQRegExp("(^|[^\\d\\w])" +
TQRegExp::escape(ownNick.lower()) +
"([^\\d\\w]|$)")) != -1)
{
@@ -527,9 +527,9 @@ bool doHighlight, bool parseURL, bool self)
TQRegExp needleReg=highlight->getPattern();
needleReg.setCaseSensitive(false);
// highlight regexp in text
- patternFound = ((filteredLine.tqfind(needleReg) != -1) ||
+ patternFound = ((filteredLine.find(needleReg) != -1) ||
// highlight regexp in nickname
- (whoSent.tqfind(needleReg) != -1));
+ (whoSent.find(needleReg) != -1));
// remember captured patterns for later
captures=needleReg.tqcapturedTexts();
@@ -539,9 +539,9 @@ bool doHighlight, bool parseURL, bool self)
{
TQString needle=highlight->getPattern();
// highlight patterns in text
- patternFound = ((filteredLine.tqfind(needle, 0, false) != -1) ||
+ patternFound = ((filteredLine.find(needle, 0, false) != -1) ||
// highlight patterns in nickname
- (whoSent.tqfind(needle, 0, false) != -1));
+ (whoSent.find(needle, 0, false) != -1));
}
if(!patternFound)
@@ -570,12 +570,12 @@ bool doHighlight, bool parseURL, bool self)
konvApp->notificationHandler()->highlight(m_chatWin, whoSent, line);
m_autoTextToSend = highlight->getAutoText();
- // tqreplace %0 - %9 in regex groups
+ // replace %0 - %9 in regex groups
for(unsigned int capture=0;capture<captures.count();capture++)
{
- m_autoTextToSend.tqreplace(TQString("%%1").tqarg(capture),captures[capture]);
+ m_autoTextToSend.replace(TQString("%%1").tqarg(capture),captures[capture]);
}
- m_autoTextToSend.tqreplace(TQRegExp("%[0-9]"),TQString());
+ m_autoTextToSend.replace(TQRegExp("%[0-9]"),TQString());
}
}
@@ -593,7 +593,7 @@ bool doHighlight, bool parseURL, bool self)
}
// Replace pairs of spaces with "<space>&nbsp;" to preserve some semblance of text wrapping
- filteredLine.tqreplace(" "," \xA0");
+ filteredLine.replace(" "," \xA0");
return filteredLine;
}
@@ -604,7 +604,7 @@ TQString IRCView::createNickLine(const TQString& nick, bool encapsulateNick, boo
if(Preferences::useClickableNicks())
{
// HACK:Use space as a placeholder for \ as TQt tries to be clever and does a replace to / in urls in TQTextEdit
- nickLine = "<a href=\"#" + TQString(nick).tqreplace('\\', " ") + "\">%2</a>";
+ nickLine = "<a href=\"#" + TQString(nick).replace('\\', " ") + "\">%2</a>";
}
if(privMsg)
@@ -1017,8 +1017,8 @@ void IRCView::appendBacklogMessage(const TQString& firstColumn,const TQString& r
}
// Nicks are in "<nick>" format so replace the "<>"
- nick.tqreplace("<","&lt;");
- nick.tqreplace(">","&gt;");
+ nick.replace("<","&lt;");
+ nick.replace(">","&gt;");
TQString line;
@@ -1272,7 +1272,7 @@ void IRCView::contentsContextMenuEvent(TQContextMenuEvent* ev)
// HACK Replace % with \x03 in the url to keep TQt from doing stupid things
m_highlightedURL = anchorAt(viewportToContents(mapFromGlobal(TQCursor::pos())));
- m_highlightedURL = m_highlightedURL.tqreplace('\x03', "%");
+ m_highlightedURL = m_highlightedURL.replace('\x03', "%");
// Hack to counter the fact that we're given an decoded url
m_highlightedURL = KURL::fromPathOrURL(m_highlightedURL).url();
@@ -1281,7 +1281,7 @@ void IRCView::contentsContextMenuEvent(TQContextMenuEvent* ev)
if(m_highlightedURL.startsWith("#"))
{
// HACK:Use space as a placeholder for \ as TQt tries to be clever and does a replace to / in urls in TQTextEdit
- m_highlightedURL = m_highlightedURL.tqreplace(' ', "\\");
+ m_highlightedURL = m_highlightedURL.replace(' ', "\\");
}
if (!block)
@@ -1543,7 +1543,7 @@ void IRCView::searchAgain()
}
}
- if(!tqfind(m_pattern, m_caseSensitive, m_wholeWords, m_forward, &m_findParagraph, &m_findIndex))
+ if(!find(m_pattern, m_caseSensitive, m_wholeWords, m_forward, &m_findParagraph, &m_findIndex))
{
KMessageBox::information(this,i18n("No matches found for \"%1\".").tqarg(m_pattern),i18n("Information"));
}
@@ -1610,7 +1610,7 @@ bool IRCView::searchNext(bool reversed)
}
}
- return tqfind(m_pattern, m_caseSensitive, m_wholeWords, fwd,
+ return find(m_pattern, m_caseSensitive, m_wholeWords, fwd,
&m_findParagraph, &m_findIndex);
}
@@ -1787,5 +1787,5 @@ void IRCView::saveLinkAs(const TQString& url)
#include "ircview.moc"
-// kate: space-indent on; tab-width 4; indent-width 4; mixed-indent off; tqreplace-tabs on;
+// kate: space-indent on; tab-width 4; indent-width 4; mixed-indent off; replace-tabs on;
// vim: set et sw=4 ts=4 cino=l1,cs,U1:
diff --git a/konversation/src/konvdcop.cpp b/konversation/src/konvdcop.cpp
index ae9d1a8..b6e4b2a 100644
--- a/konversation/src/konvdcop.cpp
+++ b/konversation/src/konvdcop.cpp
@@ -99,7 +99,7 @@ void KonvDCOP::actionToAll(const TQString &message)
void KonvDCOP::say(const TQString& _server,const TQString& _target,const TQString& _command)
{
- //Sadly, copy on write doesn't exist with TQString::tqreplace
+ //Sadly, copy on write doesn't exist with TQString::replace
TQString server(_server), target(_target), command(_command);
// TODO: this just masks a greater problem - Server::addQuery will return a query for '' --argonel
@@ -108,8 +108,8 @@ void KonvDCOP::say(const TQString& _server,const TQString& _target,const TQStrin
kdDebug() << "KonvDCOP::say() requires 3 arguments." << endl;
else
{
- command.tqreplace('\n',"\\n");
- command.tqreplace('\r',"\\r");
+ command.replace('\n',"\\n");
+ command.replace('\r',"\\r");
target.remove('\n');
target.remove('\r');
server.remove('\n');
diff --git a/konversation/src/konversationapplication.cpp b/konversation/src/konversationapplication.cpp
index b5f6a58..06bb2a1 100644
--- a/konversation/src/konversationapplication.cpp
+++ b/konversation/src/konversationapplication.cpp
@@ -115,7 +115,7 @@ int KonversationApplication::newInstance()
bool changed = false;
for ( TQStringList::ConstIterator it = scripts.begin(); it != scripts.end(); ++it )
{
- if(!aliasList.tqcontains(*it)) {
+ if(!aliasList.contains(*it)) {
changed = true;
aliasList.append(*it);
}
@@ -462,10 +462,10 @@ void KonversationApplication::readOptions()
TQStringList autoreplaceList(Preferences::autoreplaceList());
// Read all entries
index=0;
- while(config->hasKey(TQString("Autotqreplace%1").tqarg(index)))
+ while(config->hasKey(TQString("Autoreplace%1").tqarg(index)))
{
// read entry and get length of the string
- TQString entry=config->readEntry(TQString("Autotqreplace%1").tqarg(index++));
+ TQString entry=config->readEntry(TQString("Autoreplace%1").tqarg(index++));
unsigned int length=entry.length()-1;
// if there's a "#" in the end, strip it (used to preserve blanks at the end of the replacement text)
// there should always be one, but older versions did not do it, so we check first
@@ -747,7 +747,7 @@ void KonversationApplication::storeUrl(const TQString& who,const TQString& newUr
if(url.startsWith("www.")) url="http://"+url;
else if(url.startsWith("ftp.")) url="ftp://"+url;
- url=url.tqreplace("&amp;","&");
+ url=url.replace("&amp;","&");
// check that we don't add the same URL twice
deleteUrl(who,url);
@@ -792,7 +792,7 @@ void KonversationApplication::splitNick_Server(const TQString& nick_server, TQSt
{
//kaddresbook uses the utf separator 0xE120, so treat that as a separator as well
TQString nickServer = nick_server;
- nickServer.tqreplace(TQChar(0xE120), "@");
+ nickServer.replace(TQChar(0xE120), "@");
ircnick = nickServer.section("@",0,0);
serverOrGroup = nickServer.section("@",1);
}
@@ -816,7 +816,7 @@ NickInfoPtr KonversationApplication::getNickInfo(const TQString &ircnick, const
}
// auto replace on input/output
-TQString KonversationApplication::doAutotqreplace(const TQString& text,bool output)
+TQString KonversationApplication::doAutoreplace(const TQString& text,bool output)
{
// get autoreplace list
TQStringList autoreplaceList=Preferences::autoreplaceList();
@@ -851,21 +851,21 @@ TQString KonversationApplication::doAutotqreplace(const TQString& text,bool outp
do {
replacement = definition.section(',',3);
// find matches
- index = line.tqfind(needleReg, index);
+ index = line.find(needleReg, index);
if(index != -1)
{
// remember captured patterns
TQStringList captures = needleReg.tqcapturedTexts();
- // tqreplace %0 - %9 in regex groups
+ // replace %0 - %9 in regex groups
for(unsigned int capture=0;capture<captures.count();capture++)
{
- replacement.tqreplace(TQString("%%1").tqarg(capture),captures[capture]);
+ replacement.replace(TQString("%%1").tqarg(capture),captures[capture]);
}
- replacement.tqreplace(TQRegExp("%[0-9]"),TQString());
+ replacement.replace(TQRegExp("%[0-9]"),TQString());
// replace input with replacement
- line.tqreplace(index, captures[0].length(), replacement);
+ line.replace(index, captures[0].length(), replacement);
index += replacement.length();
}
} while(index >= 0 && index < (int)line.length());
@@ -874,7 +874,7 @@ TQString KonversationApplication::doAutotqreplace(const TQString& text,bool outp
{
TQRegExp needleReg("\\b" + TQRegExp::escape(pattern) + "\\b");
needleReg.setCaseSensitive(false);
- line.tqreplace(needleReg,replacement);
+ line.replace(needleReg,replacement);
}
}
}
@@ -884,5 +884,5 @@ TQString KonversationApplication::doAutotqreplace(const TQString& text,bool outp
#include "konversationapplication.moc"
-// kate: space-indent on; tab-width 4; indent-width 4; mixed-indent off; tqreplace-tabs on;
+// kate: space-indent on; tab-width 4; indent-width 4; mixed-indent off; replace-tabs on;
// vim: set et sw=4 ts=4 cino=l1,cs,U1:
diff --git a/konversation/src/konversationapplication.h b/konversation/src/konversationapplication.h
index b410d09..4795659 100644
--- a/konversation/src/konversationapplication.h
+++ b/konversation/src/konversationapplication.h
@@ -117,7 +117,7 @@ class KonversationApplication : public KUniqueApplication
Konversation::NotificationHandler* notificationHandler() const { return m_notificationHandler; }
// auto replacement for input or output lines
- TQString doAutotqreplace(const TQString& text,bool output);
+ TQString doAutoreplace(const TQString& text,bool output);
int newInstance();
@@ -166,5 +166,5 @@ class KonversationApplication : public KUniqueApplication
#endif
-// kate: space-indent on; tab-width 4; indent-width 4; mixed-indent off; tqreplace-tabs on;
+// kate: space-indent on; tab-width 4; indent-width 4; mixed-indent off; replace-tabs on;
// vim: set et sw=4 ts=4 cino=l1,cs,U1:
diff --git a/konversation/src/konvibookmarkmenu.cpp b/konversation/src/konvibookmarkmenu.cpp
index 582685a..183f2d7 100644
--- a/konversation/src/konvibookmarkmenu.cpp
+++ b/konversation/src/konvibookmarkmenu.cpp
@@ -93,7 +93,7 @@ void KonviBookmarkMenu::fillBookmarkMenu()
bm = parentBookmark.next(bm) )
{
TQString text = bm.text();
- text.tqreplace( '&', "&&" );
+ text.replace( '&', "&&" );
if ( !separatorInserted && m_bIsRoot) // inserted before the first konq bookmark, to avoid the separator if no konq bookmark
{
m_parentMenu->insertSeparator();
diff --git a/konversation/src/konviconfigdialog.cpp b/konversation/src/konviconfigdialog.cpp
index 01b463c..15a1aab 100644
--- a/konversation/src/konviconfigdialog.cpp
+++ b/konversation/src/konviconfigdialog.cpp
@@ -182,7 +182,7 @@ void KonviConfigDialog::setupManagerConnections(KConfigDialogManager *manager)
KonviConfigDialog* KonviConfigDialog::exists(const char* name)
{
- return openDialogs.tqfind(name);
+ return openDialogs.find(name);
}
bool KonviConfigDialog::showDialog(const char* name)
diff --git a/konversation/src/konvisettingsdialog.cpp b/konversation/src/konvisettingsdialog.cpp
index 5580e96..8cd45c3 100644
--- a/konversation/src/konvisettingsdialog.cpp
+++ b/konversation/src/konvisettingsdialog.cpp
@@ -146,7 +146,7 @@ KonviSettingsDialog::KonviSettingsDialog( TQWidget *tqparent) :
connect(m_confAliasWdg, TQT_SIGNAL(modified()), this, TQT_SLOT(modifiedSlot()));
//Behaviour/Auto Replace
- m_confAutoreplaceWdg = new Autoreplace_Config( this, "Autotqreplace" );
+ m_confAutoreplaceWdg = new Autoreplace_Config( this, "Autoreplace" );
pagePath.clear();
pagePath << i18n("Behavior") << i18n("Auto Replace");
addPage ( m_confAutoreplaceWdg, pagePath, "kview", i18n("Auto Replace") );
@@ -190,7 +190,7 @@ KonviSettingsDialog::KonviSettingsDialog( TQWidget *tqparent) :
m_confWatchedNicknamesWdg = new WatchedNicknames_Config( this, "WatchedNicknames" );
pagePath.clear();
pagePath << i18n("Notifications") << i18n("Watched Nicknames");
- addPage ( m_confWatchedNicknamesWdg, pagePath, "ktqfind", i18n("Watched Nicknames") );
+ addPage ( m_confWatchedNicknamesWdg, pagePath, "kfind", i18n("Watched Nicknames") );
// remember index so we can open this page later from outside
m_watchedNicknamesIndex=lastAddedIndex();
connect(m_confWatchedNicknamesWdg, TQT_SIGNAL(modified()), this, TQT_SLOT(modifiedSlot()));
diff --git a/konversation/src/linkaddressbook/addressbook_base.cpp b/konversation/src/linkaddressbook/addressbook_base.cpp
index 313a4bf..5fdff3f 100644
--- a/konversation/src/linkaddressbook/addressbook_base.cpp
+++ b/konversation/src/linkaddressbook/addressbook_base.cpp
@@ -109,7 +109,7 @@ namespace Konversation
TQStringList::iterator end = addresses.end();
for ( TQStringList::iterator it = addresses.begin(); it != end; ++it )
{
- if(!(*it).tqcontains(TQChar( 0xE120)))
+ if(!(*it).contains(TQChar( 0xE120)))
nicks.append(*it);
else
{
diff --git a/konversation/src/logfilereader.cpp b/konversation/src/logfilereader.cpp
index 4a78b83..d61f36b 100644
--- a/konversation/src/logfilereader.cpp
+++ b/konversation/src/logfilereader.cpp
@@ -154,8 +154,8 @@ void LogfileReader::saveLog()
i18n("Choose Destination Folder"));
if(!destination.isEmpty())
{
- // tqreplace # with %25 to make it URL conforming
- KIO::Job* job=KIO::copy(KURL(fileName.tqreplace("#","%23")),
+ // replace # with %25 to make it URL conforming
+ KIO::Job* job=KIO::copy(KURL(fileName.replace("#","%23")),
KURL(destination),
true);
diff --git a/konversation/src/multilinetextedit.cpp b/konversation/src/multilinetextedit.cpp
index 4d20761..5ec23bc 100644
--- a/konversation/src/multilinetextedit.cpp
+++ b/konversation/src/multilinetextedit.cpp
@@ -71,7 +71,7 @@ void MultilineTextEdit::drawWhitespaces()
line=text(paragraph);
// start looking for whitespaces from the beginning
pos=0;
- while((pos=line.tqfind(regex,pos))!=-1)
+ while((pos=line.find(regex,pos))!=-1)
{
// whitespace found is not the carriage return at the end of the line?
if(pos<((int)line.length()-1))
diff --git a/konversation/src/nick.cpp b/konversation/src/nick.cpp
index 81aad09..8ddb67c 100644
--- a/konversation/src/nick.cpp
+++ b/konversation/src/nick.cpp
@@ -249,12 +249,12 @@ int Nick::getSortingValue() const
int flags;
TQString sortingOrder = Preferences::sortOrder();
- if(getChannelNick()->isOwner()) flags=sortingOrder.tqfind('q');
- else if(getChannelNick()->isAdmin()) flags=sortingOrder.tqfind('p');
- else if(getChannelNick()->isOp() ) flags=sortingOrder.tqfind('o');
- else if(getChannelNick()->isHalfOp()) flags=sortingOrder.tqfind('h');
- else if(getChannelNick()->hasVoice()) flags=sortingOrder.tqfind('v');
- else flags=sortingOrder.tqfind('-');
+ if(getChannelNick()->isOwner()) flags=sortingOrder.find('q');
+ else if(getChannelNick()->isAdmin()) flags=sortingOrder.find('p');
+ else if(getChannelNick()->isOp() ) flags=sortingOrder.find('o');
+ else if(getChannelNick()->isHalfOp()) flags=sortingOrder.find('h');
+ else if(getChannelNick()->hasVoice()) flags=sortingOrder.find('v');
+ else flags=sortingOrder.find('-');
return flags;
}
diff --git a/konversation/src/nickinfo.cpp b/konversation/src/nickinfo.cpp
index d585a4b..5f95ca2 100644
--- a/konversation/src/nickinfo.cpp
+++ b/konversation/src/nickinfo.cpp
@@ -344,7 +344,7 @@ void NickInfo::tooltipTableData(TQTextStream &tooltip) const
else if(!getRealName().isEmpty() && getRealName().lower() != loweredNickname())
{
TQString escapedRealName( getRealName() );
- escapedRealName.tqreplace("<","&lt;").tqreplace(">","&gt;");
+ escapedRealName.replace("<","&lt;").replace(">","&gt;");
tooltip << escapedRealName;
dirty = true;
}
diff --git a/konversation/src/nickinfo.h b/konversation/src/nickinfo.h
index bbb60e1..b268359 100644
--- a/konversation/src/nickinfo.h
+++ b/konversation/src/nickinfo.h
@@ -47,7 +47,7 @@ class NickInfo : public TQObject, public KShared
TQString loweredNickname() const;
TQString getHosttqmask() const;
/** Currently return whether the user has set themselves to away with /away.
- * May be changed in the future to parse the nick string and see if it tqcontains
+ * May be changed in the future to parse the nick string and see if it contains
* "|away" or "|afk" or something.
*/
bool isAway() const;
diff --git a/konversation/src/nicksonline.cpp b/konversation/src/nicksonline.cpp
index 5a5461b..da1649e 100644
--- a/konversation/src/nicksonline.cpp
+++ b/konversation/src/nicksonline.cpp
@@ -284,7 +284,7 @@ void NicksOnline::updateServerOnlineList(Server* servr)
networkRoot->setText(nlvcServerName, serverName);
// Update list of servers in the network that are connected.
TQStringList serverList = TQStringList::split(",", networkRoot->text(nlvcAdditionalInfo));
- if (!serverList.tqcontains(serverName)) serverList.append(serverName);
+ if (!serverList.contains(serverName)) serverList.append(serverName);
networkRoot->setText(nlvcAdditionalInfo, serverList.join(","));
// Get item in nicklistview for the Offline branch.
TQListViewItem* offlineRoot = findItemType(networkRoot, NicksOnlineItem::OfflineItem);
@@ -382,7 +382,7 @@ void NicksOnline::updateServerOnlineList(Server* servr)
while (child)
{
TQListViewItem* nextChild = child->nextSibling();
- if (channelList.tqfind(child->text(nlvcNick)) == channelList.end())
+ if (channelList.find(child->text(nlvcNick)) == channelList.end())
delete child;
child = nextChild;
}
@@ -420,7 +420,7 @@ void NicksOnline::updateServerOnlineList(Server* servr)
if (static_cast<NicksOnlineItem*>(item)->type() != NicksOnlineItem::OfflineItem)
{
TQString nickname = item->text(nlvcNick);
- if ((watchList.tqfind(nickname) == watchList.end()) &&
+ if ((watchList.find(nickname) == watchList.end()) &&
(serverName == item->text(nlvcServerName))) delete item;
}
item = nextItem;
@@ -432,7 +432,7 @@ void NicksOnline::updateServerOnlineList(Server* servr)
{
TQListViewItem* nextItem = item->nextSibling();
TQString nickname = item->text(nlvcNick);
- if ((watchList.tqfind(nickname) == watchList.end()) &&
+ if ((watchList.find(nickname) == watchList.end()) &&
(serverName == item->text(nlvcServerName))) delete item;
item = nextItem;
}
@@ -623,7 +623,7 @@ const TQString& nickname)
Server* server = KonversationApplication::instance()->getConnectionManager()->getServerByName(serverName);
if (!server) return 0;
TQString networkName = server->getDisplayName();
- TQListViewItem* networkRoot = m_nickListView->tqfindItem(networkName, nlvcNetwork);
+ TQListViewItem* networkRoot = m_nickListView->findItem(networkName, nlvcNetwork);
if (!networkRoot) return 0;
TQListViewItem* nickRoot = findItemChild(networkRoot, nickname, NicksOnlineItem::NicknameItem);
return nickRoot;
@@ -971,5 +971,5 @@ void NicksOnline::childAdjustFocus() {}
#include "nicksonline.moc"
-// kate: space-indent on; tab-width 4; indent-width 4; mixed-indent off; tqreplace-tabs on;
+// kate: space-indent on; tab-width 4; indent-width 4; mixed-indent off; replace-tabs on;
// vim: set et sw=4 ts=4 cino=l1,cs,U1:
diff --git a/konversation/src/osd.cpp b/konversation/src/osd.cpp
index 81787b0..10320d1 100644
--- a/konversation/src/osd.cpp
+++ b/konversation/src/osd.cpp
@@ -130,10 +130,10 @@ void OSDWidget::showOSD( const TQString &text, bool preemptive )
{
TQString plaintext = text.copy();
- plaintext.tqreplace(TQRegExp("</?(?:font|a|b|i)\\b[^>]*>"), TQString(""));
- plaintext.tqreplace(TQString("&lt;"), TQString("<"));
- plaintext.tqreplace(TQString("&gt;"), TQString(">"));
- plaintext.tqreplace(TQString("&amp;"), TQString("&"));
+ plaintext.replace(TQRegExp("</?(?:font|a|b|i)\\b[^>]*>"), TQString(""));
+ plaintext.replace(TQString("&lt;"), TQString("<"));
+ plaintext.replace(TQString("&gt;"), TQString(">"));
+ plaintext.replace(TQString("&amp;"), TQString("&"));
if ( preemptive || !timerMin.isActive() )
{
diff --git a/konversation/src/outputfilter.cpp b/konversation/src/outputfilter.cpp
index f1c95c2..59ae5af 100644
--- a/konversation/src/outputfilter.cpp
+++ b/konversation/src/outputfilter.cpp
@@ -76,17 +76,17 @@ namespace Konversation
TQString aliasReplace;
// cut alias replacement from definition
- if ( aliasList[index].tqcontains("%p") )
+ if ( aliasList[index].contains("%p") )
aliasReplace = aliasList[index].section(' ',1);
else
aliasReplace = aliasList[index].section(' ',1 )+' '+line.section(' ',1 );
// protect "%%"
- aliasReplace.tqreplace("%%","%\x01");
- // tqreplace %p placeholder with rest of line
- aliasReplace.tqreplace("%p",line.section(' ',1));
+ aliasReplace.replace("%%","%\x01");
+ // replace %p placeholder with rest of line
+ aliasReplace.replace("%p",line.section(' ',1));
// restore "%<1>" as "%%"
- aliasReplace.tqreplace("%\x01","%%");
+ aliasReplace.replace("%\x01","%%");
// modify line
line=aliasReplace;
// return "replaced"
@@ -191,17 +191,17 @@ namespace Konversation
if(!Preferences::disableExpansion())
{
// replace placeholders
- inputLine.tqreplace("%%","%\x01"); // make sure to protect double %%
- inputLine.tqreplace("%B","\x02"); // tqreplace %B with bold char
- inputLine.tqreplace("%C","\x03"); // tqreplace %C with color char
- inputLine.tqreplace("%G","\x07"); // tqreplace %G with ASCII BEL 0x07
- inputLine.tqreplace("%I","\x09"); // tqreplace %I with italics char
- inputLine.tqreplace("%O","\x0f"); // tqreplace %O with reset to default char
- inputLine.tqreplace("%S","\x13"); // tqreplace %S with strikethru char
- // inputLine.tqreplace(TQRegExp("%?"),"\x15");
- inputLine.tqreplace("%R","\x16"); // tqreplace %R with reverse char
- inputLine.tqreplace("%U","\x1f"); // tqreplace %U with underline char
- inputLine.tqreplace("%\x01","%"); // restore double %% as single %
+ inputLine.replace("%%","%\x01"); // make sure to protect double %%
+ inputLine.replace("%B","\x02"); // replace %B with bold char
+ inputLine.replace("%C","\x03"); // replace %C with color char
+ inputLine.replace("%G","\x07"); // replace %G with ASCII BEL 0x07
+ inputLine.replace("%I","\x09"); // replace %I with italics char
+ inputLine.replace("%O","\x0f"); // replace %O with reset to default char
+ inputLine.replace("%S","\x13"); // replace %S with strikethru char
+ // inputLine.replace(TQRegExp("%?"),"\x15");
+ inputLine.replace("%R","\x16"); // replace %R with reverse char
+ inputLine.replace("%U","\x1f"); // replace %U with underline char
+ inputLine.replace("%\x01","%"); // restore double %% as single %
}
TQString line=inputLine.lower();
@@ -373,7 +373,7 @@ namespace Konversation
{
OutputFilterResult result;
- if(channelName.tqcontains(",")) // Protect against #foo,0 tricks
+ if(channelName.contains(",")) // Protect against #foo,0 tricks
channelName = channelName.remove(",0");
//else if(channelName == "0") // FIXME IRC RFC 2812 section 3.2.1
@@ -409,7 +409,7 @@ namespace Konversation
if(isAChannel(destination))
{
// get nick to kick
- TQString victim = parameter.left(parameter.tqfind(" "));
+ TQString victim = parameter.left(parameter.find(" "));
if(victim.isEmpty())
{
@@ -460,7 +460,7 @@ namespace Konversation
if(isAChannel(parameter))
{
// get channel name
- TQString channel = parameter.left(parameter.tqfind(" "));
+ TQString channel = parameter.left(parameter.find(" "));
// get part reason (if any)
TQString reason = parameter.mid(channel.length() + 1);
@@ -512,7 +512,7 @@ namespace Konversation
if(isAChannel(parameter))
{
// get channel name
- TQString channel=parameter.left(parameter.tqfind(" "));
+ TQString channel=parameter.left(parameter.find(" "));
// get topic (if any)
TQString topic=parameter.mid(channel.length()+1);
// if no topic given, retrieve topic
@@ -614,7 +614,7 @@ namespace Konversation
OutputFilterResult OutputFilter::parseNotice(const TQString &parameter)
{
OutputFilterResult result;
- TQString recipient = parameter.left(parameter.tqfind(" "));
+ TQString recipient = parameter.left(parameter.find(" "));
TQString message = parameter.mid(recipient.length()+1);
if(parameter.isEmpty() || message.isEmpty())
@@ -731,7 +731,7 @@ namespace Konversation
OutputFilterResult OutputFilter::parseSMsg(const TQString &parameter)
{
OutputFilterResult result;
- TQString recipient = parameter.left(parameter.tqfind(" "));
+ TQString recipient = parameter.left(parameter.find(" "));
TQString message = parameter.mid(recipient.length() + 1);
if(message.startsWith(commandChar + "me"))
@@ -842,7 +842,7 @@ namespace Konversation
else
{
TQString tmpParameter = parameter;
- TQStringList parameterList = TQStringList::split(' ', tmpParameter.tqreplace("\\ ", "%20"));
+ TQStringList parameterList = TQStringList::split(' ', tmpParameter.replace("\\ ", "%20"));
TQString dccType = parameterList[0].lower();
@@ -959,7 +959,7 @@ namespace Konversation
OutputFilterResult result;
/*TQString newFileName(fileName);
- newFileName.tqreplace(" ", "_");*/
+ newFileName.replace(" ", "_");*/
result.toServer = "PRIVMSG " + sender + " :" + '\x01' + "DCC RESUME " + fileName + ' ' + port + ' '
+ TQString::number(startAt) + '\x01';
@@ -1040,7 +1040,7 @@ namespace Konversation
{
TQStringList parameterList = TQStringList::split(' ', parameter);
- if(parameterList[0].tqfind("../") == -1)
+ if(parameterList[0].find("../") == -1)
{
emit launchScript(destination, parameter);
}
@@ -1323,7 +1323,7 @@ namespace Konversation
{
for(unsigned int index=0;index<parameterList.count();index++)
{
- if(!parameterList[index].tqcontains('!'))
+ if(!parameterList[index].contains('!'))
{
parameterList[index] += "!*";
}
@@ -1368,7 +1368,7 @@ namespace Konversation
for (TQStringList::Iterator it = unignoreList.begin(); it != unignoreList.end(); ++it)
{
// If pattern looks incomplete, try to complete it
- if (!(*it).tqcontains('!'))
+ if (!(*it).contains('!'))
{
TQString fixedPattern = (*it);
fixedPattern += "!*";
@@ -1471,7 +1471,7 @@ namespace Konversation
{
Q_ASSERT(m_server);
// XXX if we ever see the assert, we need the ternary
- return m_server? m_server->isAChannel(check) : TQString("#&").tqcontains(check.at(0));
+ return m_server? m_server->isAChannel(check) : TQString("#&").contains(check.at(0));
}
OutputFilterResult OutputFilter::usage(const TQString& string)
@@ -1542,7 +1542,7 @@ namespace Konversation
emit connectTo(Konversation::CreateNewConnection, splitted[0], splitted[1], splitted[2]);
else if (splitted.count() == 2)
{
- if (splitted[0].tqcontains(TQRegExp(":[0-9]+$")))
+ if (splitted[0].contains(TQRegExp(":[0-9]+$")))
emit connectTo(Konversation::CreateNewConnection, splitted[0], "", splitted[1]);
else
emit connectTo(Konversation::CreateNewConnection, splitted[0], splitted[1]);
@@ -1638,7 +1638,7 @@ namespace Konversation
{
TQString parameter(prametr.isEmpty()?destination:prametr);
- if(parameter.isEmpty() || parameter.tqcontains(' '))
+ if(parameter.isEmpty() || parameter.contains(' '))
return usage(i18n("Usage: %1delkey <nick> or <channel> deletes the encryption key for nick or channel").tqarg(commandChar));
m_server->setKeyForRecipient(parameter, "");
@@ -1717,7 +1717,7 @@ namespace Konversation
// FIXME: The reason we detect the host by occurrence of a dot is the large penalty
// we would incur by using inputfilter to find out if there's a user==target on the
// server - once we have a better API for this, switch to it.
- else if (target.tqcontains('.'))
+ else if (target.contains('.'))
{
KNetwork::KResolverResults resolved = KNetwork::KResolver::resolve(target,"");
if(resolved.error() == KResolver::NoError && resolved.size() > 0)
@@ -1786,5 +1786,5 @@ namespace Konversation
}
#include "outputfilter.moc"
-// kate: space-indent on; tab-width 4; indent-width 4; mixed-indent off; tqreplace-tabs on;
+// kate: space-indent on; tab-width 4; indent-width 4; mixed-indent off; replace-tabs on;
// vim: set et sw=4 ts=4 cino=l1,cs,U1:
diff --git a/konversation/src/query.cpp b/konversation/src/query.cpp
index e5ae865..94353f2 100644
--- a/konversation/src/query.cpp
+++ b/konversation/src/query.cpp
@@ -663,7 +663,7 @@ void Query::quitNick(const TQString& reason)
}
else
{
- if (displayReason.tqfind(TQRegExp("[\\0000-\\0037]"))!=-1)
+ if (displayReason.find(TQRegExp("[\\0000-\\0037]"))!=-1)
displayReason+="\017";
appendCommandMessage(i18n("Quit"),i18n("%1 has left this server (%2).").tqarg(getName()).tqarg(displayReason),false);
diff --git a/konversation/src/server.cpp b/konversation/src/server.cpp
index d280bf5..0e62b6b 100644
--- a/konversation/src/server.cpp
+++ b/konversation/src/server.cpp
@@ -463,7 +463,7 @@ bool& isOp,bool& isHalfop,bool& hasVoice)
if (nickname.isEmpty()) return;
- while ((modeIndex = m_serverNickPrefixes.tqfind(nickname[0])) != -1)
+ while ((modeIndex = m_serverNickPrefixes.find(nickname[0])) != -1)
{
if(nickname.isEmpty())
return;
@@ -741,7 +741,7 @@ void Server::notifyResponse(const TQString& nicksOnline)
//Are any nicks gone offline
for (it = m_prevISONList.begin(); it != m_prevISONList.end(); ++it)
{
- if (lcActual.tqfind(' ' + (*it) + ' ', 0, false) == -1)
+ if (lcActual.find(' ' + (*it) + ' ', 0, false) == -1)
{
setNickOffline(*it);
nicksOnlineChanged = true;
@@ -751,7 +751,7 @@ void Server::notifyResponse(const TQString& nicksOnline)
//Are any nicks gone online
for (it = actualList.begin(); it != actualList.end(); ++it)
{
- if (lcPrevISON.tqfind(' ' + (*it) + ' ', 0, false) == -1) {
+ if (lcPrevISON.find(' ' + (*it) + ' ', 0, false) == -1) {
setWatchedNickOnline(*it);
nicksOnlineChanged = true;
}
@@ -798,7 +798,7 @@ void Server::autoCommandsAndChannels()
TQString connectCommands = getServerGroup()->connectCommands();
if (!getNickname().isEmpty())
- connectCommands.tqreplace("%nick", getNickname());
+ connectCommands.replace("%nick", getNickname());
TQStringList connectCommandsList = TQStringList::split(";", connectCommands);
TQStringList::iterator iter;
@@ -831,7 +831,7 @@ void Server::resetNickSelection()
//for equivalence testing in case the identity gets changed underneath us
m_referenceNicklist = getIdentity()->getNicknameList();
//where in this identities nicklist will we have started?
- int start = m_referenceNicklist.tqfindIndex(getNickname());
+ int start = m_referenceNicklist.findIndex(getNickname());
int len = m_referenceNicklist.count();
//we first use this list of indices *after* we've already tried the current nick, which we don't want
@@ -877,7 +877,7 @@ void Server::processIncomingData()
if (m_rawLog)
{
TQString toRaw = front;
- m_rawLog->appendRaw("&gt;&gt; " + toRaw.tqreplace("&","&amp;").tqreplace("<","&lt;").tqreplace(">","&gt;").tqreplace(TQRegExp("\\s"), "&nbsp;"));
+ m_rawLog->appendRaw("&gt;&gt; " + toRaw.replace("&","&amp;").replace("<","&lt;").replace(">","&gt;").replace(TQRegExp("\\s"), "&nbsp;"));
}
m_inputFilter.parseLine(front);
m_processingIncoming = false;
@@ -921,7 +921,7 @@ void Server::incoming()
// split buffer to lines
TQValueList<TQCString> qcsBufferLines;
int lastLFposition = -1;
- for( int nextLFposition ; ( nextLFposition = qcsBuffer.tqfind('\n', lastLFposition+1) ) != -1 ; lastLFposition = nextLFposition )
+ for( int nextLFposition ; ( nextLFposition = qcsBuffer.find('\n', lastLFposition+1) ) != -1 ; lastLFposition = nextLFposition )
qcsBufferLines << qcsBuffer.mid(lastLFposition+1, nextLFposition-lastLFposition-1);
// remember the incomplete line (split by packets)
@@ -943,10 +943,10 @@ void Server::incoming()
{
if( lineSplit[0][0] == ':' ) // does this message have a prefix?
{
- if( !lineSplit[0].tqcontains('!') ) // is this a server(global) message?
+ if( !lineSplit[0].contains('!') ) // is this a server(global) message?
isServerMessage = true;
else
- senderNick = lineSplit[0].mid(1, lineSplit[0].tqfind('!')-1);
+ senderNick = lineSplit[0].mid(1, lineSplit[0].find('!')-1);
lineSplit.pop_front(); // remove prefix
}
@@ -1056,7 +1056,7 @@ int Server::_send_internal(TQString outputLine)
{
TQStringList outputLineSplit=TQStringList::split(" ", outputLine);
//Lets cache the uppercase command so we don't miss or reiterate too much
- int outboundCommand=outcmds.tqfindIndex(outputLineSplit[0].upper());
+ int outboundCommand=outcmds.findIndex(outputLineSplit[0].upper());
if (outputLine.at(outputLine.length()-1) == '\n')
{
@@ -1099,7 +1099,7 @@ int Server::_send_internal(TQString outputLine)
TQString blowfishKey=getKeyForRecipient(outputLineSplit[1]);
if (!blowfishKey.isEmpty() && outboundCommand >1)
{
- int colon = outputLine.tqfind(':');
+ int colon = outputLine.find(':');
if (colon > -1)
{
colon++;
@@ -1136,7 +1136,7 @@ int Server::_send_internal(TQString outputLine)
TQ_LONG sout = m_socket->writeBlock(encoded, encoded.length());
if (m_rawLog)
- m_rawLog->appendRaw("&lt;&lt; " + outputLine.tqreplace("&","&amp;").tqreplace("<","&lt;").tqreplace(">","&gt;"));
+ m_rawLog->appendRaw("&lt;&lt; " + outputLine.replace("&","&amp;").replace("<","&lt;").replace(">","&gt;"));
return sout;
}
@@ -1279,7 +1279,7 @@ void Server::ctcpReply(const TQString &receiver,const TQString &text)
NickInfoPtr Server::getNickInfo(const TQString& nickname)
{
TQString lcNickname(nickname.lower());
- if (m_allNicks.tqcontains(lcNickname))
+ if (m_allNicks.contains(lcNickname))
{
NickInfoPtr nickinfo = m_allNicks[lcNickname];
Q_ASSERT(nickinfo);
@@ -1310,7 +1310,7 @@ const NickInfoMap* Server::getAllNicks() { return &m_allNicks; }
const ChannelNickMap *Server::getJoinedChannelMembers(const TQString& channelName) const
{
TQString lcChannelName = channelName.lower();
- if (m_joinedChannels.tqcontains(lcChannelName))
+ if (m_joinedChannels.contains(lcChannelName))
return m_joinedChannels[lcChannelName];
else
return 0;
@@ -1322,7 +1322,7 @@ const ChannelNickMap *Server::getJoinedChannelMembers(const TQString& channelNam
const ChannelNickMap *Server::getUnjoinedChannelMembers(const TQString& channelName) const
{
TQString lcChannelName = channelName.lower();
- if (m_unjoinedChannels.tqcontains(lcChannelName))
+ if (m_unjoinedChannels.contains(lcChannelName))
return m_unjoinedChannels[lcChannelName];
else
return 0;
@@ -1348,7 +1348,7 @@ ChannelNickPtr Server::getChannelNick(const TQString& channelName, const TQStrin
const ChannelNickMap *channelNickMap = getChannelMembers(channelName);
if (channelNickMap)
{
- if (channelNickMap->tqcontains(lcNickname))
+ if (channelNickMap->contains(lcNickname))
return (*channelNickMap)[lcNickname];
else
return 0;
@@ -1375,7 +1375,7 @@ ChannelNickPtr Server::setChannelNick(const TQString& channelName, const TQStrin
// Create a lower case nick list from the watch list.
TQStringList watchLowerList=TQStringList::split(' ',watchlist.lower());
// If on the watch list, add channel and nick to unjoinedChannels list.
- if (watchLowerList.tqfind(lcNickname) != watchLowerList.end())
+ if (watchLowerList.find(lcNickname) != watchLowerList.end())
{
channelNick = addNickToUnjoinedChannelsList(channelName, nickname);
channelNick->setMode(mode);
@@ -1395,7 +1395,7 @@ TQStringList Server::getNickJoinedChannels(const TQString& nickname)
ChannelMembershipMap::ConstIterator channel;
for( channel = m_joinedChannels.begin(); channel != m_joinedChannels.end(); ++channel )
{
- if (channel.data()->tqcontains(lcNickname)) channellist.append(channel.key());
+ if (channel.data()->contains(lcNickname)) channellist.append(channel.key());
}
return channellist;
}
@@ -1408,11 +1408,11 @@ TQStringList Server::getNickChannels(const TQString& nickname)
ChannelMembershipMap::ConstIterator channel;
for( channel = m_joinedChannels.begin(); channel != m_joinedChannels.end(); ++channel )
{
- if (channel.data()->tqcontains(lcNickname)) channellist.append(channel.key());
+ if (channel.data()->contains(lcNickname)) channellist.append(channel.key());
}
for( channel = m_unjoinedChannels.begin(); channel != m_unjoinedChannels.end(); ++channel )
{
- if (channel.data()->tqcontains(lcNickname)) channellist.append(channel.key());
+ if (channel.data()->contains(lcNickname)) channellist.append(channel.key());
}
return channellist;
}
@@ -1610,7 +1610,7 @@ void Server::requestDccSend(const TQString &a_recipient)
Nick* lookNick=nicks.first();
while(lookNick)
{
- if(!nickList.tqcontains(lookNick->getChannelNick()->getNickname())) nickList.append(lookNick->getChannelNick()->getNickname());
+ if(!nickList.contains(lookNick->getChannelNick()->getNickname())) nickList.append(lookNick->getChannelNick()->getNickname());
lookNick=nicks.next();
}
lookChannel=m_channelList.next();
@@ -1620,7 +1620,7 @@ void Server::requestDccSend(const TQString &a_recipient)
class Query* lookQuery=m_queryList.first();
while(lookQuery)
{
- if(!nickList.tqcontains(lookQuery->getName())) nickList.append(lookQuery->getName());
+ if(!nickList.contains(lookQuery->getName())) nickList.append(lookQuery->getName());
lookQuery=m_queryList.next();
}
@@ -1755,7 +1755,7 @@ void Server::dccResumeGetRequest(const TQString &sender, const TQString &fileNam
{
Konversation::OutputFilterResult result;
- if (fileName.tqcontains(" ") > 0)
+ if (fileName.contains(" ") > 0)
result = getOutputFilter()->resumeRequest(sender,"\""+fileName+"\"",port,startAt);
else
result = getOutputFilter()->resumeRequest(sender,fileName,port,startAt);
@@ -2033,7 +2033,7 @@ void Server::updateChannelMode(const TQString &updater, const TQString &channelN
// "q" is the likely answer.. UnrealIRCd and euIRCd use it.
// TODO these need to become dynamic
TQString userModes="vhoqa"; // voice halfop op owner admin
- int modePos = userModes.tqfind(mode);
+ int modePos = userModes.find(mode);
if (modePos > 0)
{
ChannelNickPtr updateeNick = getChannelNick(channelName, parameter);
@@ -2164,7 +2164,7 @@ ChannelNickPtr Server::addNickToJoinedChannelsList(const TQString& channelName,
// Move the channel from unjoined list (if present) to joined list.
TQString lcChannelName = channelName.lower();
ChannelNickMap *channel;
- if (m_unjoinedChannels.tqcontains(lcChannelName))
+ if (m_unjoinedChannels.contains(lcChannelName))
{
channel = m_unjoinedChannels[lcChannelName];
m_unjoinedChannels.remove(lcChannelName);
@@ -2174,7 +2174,7 @@ ChannelNickPtr Server::addNickToJoinedChannelsList(const TQString& channelName,
else
{
// Create a new list in the joined channels if not already present.
- if (!m_joinedChannels.tqcontains(lcChannelName))
+ if (!m_joinedChannels.contains(lcChannelName))
{
channel = new ChannelNickMap;
m_joinedChannels.insert(lcChannelName, channel);
@@ -2185,7 +2185,7 @@ ChannelNickPtr Server::addNickToJoinedChannelsList(const TQString& channelName,
}
// Add NickInfo to channel list if not already in the list.
ChannelNickPtr channelNick;
- if (!channel->tqcontains(lcNickname))
+ if (!channel->contains(lcNickname))
{
channelNick = new ChannelNick(nickInfo, false, false, false, false, false);
Q_ASSERT(channelNick);
@@ -2242,7 +2242,7 @@ ChannelNickPtr Server::addNickToUnjoinedChannelsList(const TQString& channelName
// Move the channel from joined list (if present) to unjoined list.
TQString lcChannelName = channelName.lower();
ChannelNickMap *channel;
- if (m_joinedChannels.tqcontains(lcChannelName))
+ if (m_joinedChannels.contains(lcChannelName))
{
channel = m_joinedChannels[lcChannelName];
m_joinedChannels.remove(lcChannelName);
@@ -2252,7 +2252,7 @@ ChannelNickPtr Server::addNickToUnjoinedChannelsList(const TQString& channelName
else
{
// Create a new list in the unjoined channels if not already present.
- if (!m_unjoinedChannels.tqcontains(lcChannelName))
+ if (!m_unjoinedChannels.contains(lcChannelName))
{
channel = new ChannelNickMap;
m_unjoinedChannels.insert(lcChannelName, channel);
@@ -2263,7 +2263,7 @@ ChannelNickPtr Server::addNickToUnjoinedChannelsList(const TQString& channelName
}
// Add NickInfo to unjoinedChannels list if not already in the list.
ChannelNickPtr channelNick;
- if (!channel->tqcontains(lcNickname))
+ if (!channel->contains(lcNickname))
{
channelNick = new ChannelNick(nickInfo, false, false, false, false, false);
channel->insert(lcNickname, channelNick);
@@ -2331,7 +2331,7 @@ bool Server::setNickOffline(const TQString& nickname)
if (nickInfo && wasOnline)
{
// Delete from query list, if present.
- if (m_queryNicks.tqcontains(lcNickname)) m_queryNicks.remove(lcNickname);
+ if (m_queryNicks.contains(lcNickname)) m_queryNicks.remove(lcNickname);
// Delete the nickname from all channels (joined or unjoined).
TQStringList nickChannels = getNickChannels(lcNickname);
TQStringList::iterator itEnd = nickChannels.end();
@@ -2343,7 +2343,7 @@ bool Server::setNickOffline(const TQString& nickname)
}
// Delete NickInfo.
- if (m_allNicks.tqcontains(lcNickname)) m_allNicks.remove(lcNickname);
+ if (m_allNicks.contains(lcNickname)) m_allNicks.remove(lcNickname);
// If the nick was in the watch list, emit various signals and messages.
if (isWatchedNick(nickname)) setWatchedNickOffline(nickname, nickInfo);
@@ -2366,7 +2366,7 @@ bool Server::deleteNickIfUnlisted(const TQString &nickname)
// Don't delete our own nickinfo.
if (lcNickname == loweredNickname()) return false;
- if (!m_queryNicks.tqcontains(lcNickname))
+ if (!m_queryNicks.contains(lcNickname))
{
TQStringList nickChannels = getNickChannels(nickname);
if (nickChannels.isEmpty())
@@ -2390,10 +2390,10 @@ void Server::removeChannelNick(const TQString& channelName, const TQString& nick
TQString lcChannelName = channelName.lower();
TQString lcNickname = nickname.lower();
ChannelNickMap *channel;
- if (m_joinedChannels.tqcontains(lcChannelName))
+ if (m_joinedChannels.contains(lcChannelName))
{
channel = m_joinedChannels[lcChannelName];
- if (channel->tqcontains(lcNickname))
+ if (channel->contains(lcNickname))
{
channel->remove(lcNickname);
doSignal = true;
@@ -2404,10 +2404,10 @@ void Server::removeChannelNick(const TQString& channelName, const TQString& nick
}
else
{
- if (m_unjoinedChannels.tqcontains(lcChannelName))
+ if (m_unjoinedChannels.contains(lcChannelName))
{
channel = m_unjoinedChannels[lcChannelName];
- if (channel->tqcontains(lcNickname))
+ if (channel->contains(lcNickname))
{
channel->remove(lcNickname);
doSignal = true;
@@ -2453,7 +2453,7 @@ bool Server::isWatchedNick(const TQString& nickname)
// Get watch list from preferences.
TQString watchlist= ' ' + getWatchListString() + ' ';
// Search case-insensitivly
- return (watchlist.tqfind(' ' + nickname + ' ', 0, 0) != -1);
+ return (watchlist.find(' ' + nickname + ' ', 0, 0) != -1);
}
/**
@@ -2468,7 +2468,7 @@ void Server::removeJoinedChannel(const TQString& channelName)
TQStringList watchListLower = getWatchList();
TQString lcChannelName = channelName.lower();
// Move the channel nick list from the joined to unjoined lists.
- if (m_joinedChannels.tqcontains(lcChannelName))
+ if (m_joinedChannels.contains(lcChannelName))
{
doSignal = true;
ChannelNickMap* channel = m_joinedChannels[lcChannelName];
@@ -2482,7 +2482,7 @@ void Server::removeJoinedChannel(const TQString& channelName)
for ( member = channel->begin(); member != channel->end() ;)
{
TQString lcNickname = member.key();
- if (watchListLower.tqfind(lcNickname) == watchListLower.end())
+ if (watchListLower.find(lcNickname) == watchListLower.end())
{
// Remove the unwatched nickname from the unjoined channel.
channel->remove(member);
@@ -2536,7 +2536,7 @@ void Server::renameNickInfo(NickInfoPtr nickInfo, const TQString& newname)
}
// Rename key in Query list.
- if (m_queryNicks.tqcontains(lcNickname))
+ if (m_queryNicks.contains(lcNickname))
{
m_queryNicks.remove(lcNickname);
m_queryNicks.insert(lcNewname, nickInfo);
@@ -2826,7 +2826,7 @@ const TQString& /*parameter*/)
int index = 0, found = 0;
TQChar toExpand;
- while ((found = toParse.tqfind('%',index)) != -1)
+ while ((found = toParse.find('%',index)) != -1)
{
// append part before the %
out.append(toParse.mid(index,found-index));
@@ -2836,7 +2836,7 @@ const TQString& /*parameter*/)
toExpand = toParse.at(index++);
if (toExpand == 's')
{
- found = toParse.tqfind('%',index);
+ found = toParse.find('%',index);
if (found == -1) // no other % (not valid)
break;
separator = toParse.mid(index,found-index);
@@ -2917,7 +2917,7 @@ void Server::scriptExecutionError(const TQString& name)
bool Server::isAChannel(const TQString &channel) const
{
- return (getChannelTypes().tqcontains(channel.at(0)) > 0);
+ return (getChannelTypes().contains(channel.at(0)) > 0);
}
void Server::addRawLog(bool show)
@@ -3185,7 +3185,7 @@ void Server::setAway(bool away)
if (identity && identity->getShowAwayMessage())
{
TQString message = identity->getAwayMessage();
- sendToAllChannels(message.tqreplace(TQRegExp("%s", false), m_awayReason));
+ sendToAllChannels(message.replace(TQRegExp("%s", false), m_awayReason));
}
if (identity && identity->getInsertRememberLineOnAway())
@@ -3210,7 +3210,7 @@ void Server::setAway(bool away)
if (identity && identity->getShowAwayMessage())
{
TQString message = identity->getReturnMessage();
- sendToAllChannels(message.tqreplace(TQRegExp("%t", false), awayTime()));
+ sendToAllChannels(message.replace(TQRegExp("%t", false), awayTime()));
}
}
else
@@ -3344,5 +3344,5 @@ void Server::updateEncoding()
#include "server.moc"
-// kate: space-indent on; tab-width 4; indent-width 4; mixed-indent off; tqreplace-tabs on;
+// kate: space-indent on; tab-width 4; indent-width 4; mixed-indent off; replace-tabs on;
// vim: set et sw=4 ts=4 cino=l1,cs,U1:
diff --git a/konversation/src/servergroupdialog.cpp b/konversation/src/servergroupdialog.cpp
index d90d95c..41a675c 100644
--- a/konversation/src/servergroupdialog.cpp
+++ b/konversation/src/servergroupdialog.cpp
@@ -207,7 +207,7 @@ namespace Konversation
// Track the server the Server List dialog told us to edit
// and find out which server to select in the listbox
m_editedServer = true;
- m_editedServerIndex = m_serverList.tqfindIndex(server);
+ m_editedServerIndex = m_serverList.findIndex(server);
m_mainWidget->m_serverLBox->setCurrentItem(m_editedServerIndex);
editServer();
diff --git a/konversation/src/servergroupsettings.cpp b/konversation/src/servergroupsettings.cpp
index 33cf8fb..567edfc 100644
--- a/konversation/src/servergroupsettings.cpp
+++ b/konversation/src/servergroupsettings.cpp
@@ -133,7 +133,7 @@ namespace Konversation
if (before.name().isEmpty())
m_channelList.append(channel);
else
- m_channelList.insert(m_channelList.tqfind(before), channel);
+ m_channelList.insert(m_channelList.find(before), channel);
}
void ServerGroupSettings::removeChannel(const ChannelSettings& channel)
diff --git a/konversation/src/serverison.cpp b/konversation/src/serverison.cpp
index 4b77db6..ac54843 100644
--- a/konversation/src/serverison.cpp
+++ b/konversation/src/serverison.cpp
@@ -78,7 +78,7 @@ KABC::Addressee ServerISON::getOfflineNickAddressee(TQString& nickname)
TQString lcNickname = nickname.lower();
if(m_ISONList_invalid)
recalculateAddressees();
- if (m_offlineNickToAddresseeMap.tqcontains(lcNickname))
+ if (m_offlineNickToAddresseeMap.contains(lcNickname))
return m_offlineNickToAddresseeMap[lcNickname];
else
return KABC::Addressee();
@@ -127,7 +127,7 @@ void ServerISON::recalculateAddressees()
// First check if we already know that this addressee is online.
// If so, add all the nicks of the addressee that are online, but do not
// add the offline nicks. There is no point in monitoring such nicks.
- if (addresseeToOnlineNickMap.tqcontains(uid))
+ if (addresseeToOnlineNickMap.contains(uid))
{
TQStringList nicknames = addresseeToOnlineNickMap[uid];
TQStringList::iterator itEnd = nicknames.end();
@@ -212,7 +212,7 @@ void ServerISON::nickInfoChanged(Server* /*server*/, const NickInfoPtr /*nickInf
//We need to call recalculateAddressees before returning m_ISONList
//Maybe we could do something like:
-//if(m_ISONList.tqcontains(nickInfo->getNickName())) return;
+//if(m_ISONList.contains(nickInfo->getNickName())) return;
m_ISONList_invalid = true;
}
@@ -227,7 +227,7 @@ bool joined, bool parted, const TQString& nickname)
{
// Whenever a nick on the watch list leaves the last joined channel, must recalculate lists.
// The nick will be added to the ISON list.
- if (joined && parted && m_watchList.tqcontains(nickname))
+ if (joined && parted && m_watchList.contains(nickname))
if (m_server->getNickJoinedChannels(nickname).isEmpty()) m_ISONList_invalid = true;
}
diff --git a/konversation/src/topiclabel.cpp b/konversation/src/topiclabel.cpp
index 4e4480c..602e5c3 100644
--- a/konversation/src/topiclabel.cpp
+++ b/konversation/src/topiclabel.cpp
@@ -84,7 +84,7 @@ namespace Konversation
pressPosition=e->pos();
urlToDrag = anchorAt(pressPosition);
// HACK Replace % with \x03 in the url to keep TQt from doing stupid things
- urlToDrag = urlToDrag.tqreplace ('\x03', "%");
+ urlToDrag = urlToDrag.replace ('\x03', "%");
// Hack to counter the fact that we're given an decoded url
urlToDrag = KURL::fromPathOrURL(urlToDrag).url();
if (!urlToDrag.isNull())
@@ -140,7 +140,7 @@ namespace Konversation
else if (link.startsWith("#") && m_server && m_server->isConnected())
{
TQString channel(link);
- channel.tqreplace("##","#");
+ channel.replace("##","#");
m_server->sendJoinCommand(channel);
}
// Always use KDE default mailer.
@@ -151,7 +151,7 @@ namespace Konversation
else
{
TQString cmd = Preferences::webBrowserCmd();
- cmd.tqreplace("%u",KURL::fromPathOrURL(link).url());
+ cmd.replace("%u",KURL::fromPathOrURL(link).url());
KProcess *proc = new KProcess;
TQStringList cmdAndArgs = KShell::splitArgs(cmd);
*proc << cmdAndArgs;
@@ -252,9 +252,9 @@ namespace Konversation
TQFontMetrics fm(currentFont());
TQString text = m_fullText;
- // text.tqreplace("&", "&amp;"). Not needed as we do it in tagURLs
- text.tqreplace("<", "\x0blt;"). // tagUrls will tqreplace \x0b with &
- tqreplace(">", "\x0bgt;");
+ // text.replace("&", "&amp;"). Not needed as we do it in tagURLs
+ text.replace("<", "\x0blt;"). // tagUrls will replace \x0b with &
+ replace(">", "\x0bgt;");
text = tagURLs(text, "", false);
if(height() < (fm.lineSpacing() * 2))
diff --git a/konversation/src/urlcatcher.cpp b/konversation/src/urlcatcher.cpp
index da96a45..a29c89e 100644
--- a/konversation/src/urlcatcher.cpp
+++ b/konversation/src/urlcatcher.cpp
@@ -143,7 +143,7 @@ void UrlCatcher::openUrl(TQListViewItem* item)
else
{
TQString cmd = Preferences::webBrowserCmd();
- cmd.tqreplace("%u", url);
+ cmd.replace("%u", url);
KProcess *proc = new KProcess;
TQStringList cmdAndArgs = KShell::splitArgs(cmd);
*proc << cmdAndArgs;
diff --git a/konversation/src/viewcontainer.cpp b/konversation/src/viewcontainer.cpp
index bffff02..3dcc3f5 100644
--- a/konversation/src/viewcontainer.cpp
+++ b/konversation/src/viewcontainer.cpp
@@ -519,7 +519,7 @@ void ViewContainer::updateViewActions(int index)
action = actionCollection()->action("clear_window");
if (action) action->setEnabled(insertSupported);
- action = actionCollection()->action("edit_tqfind");
+ action = actionCollection()->action("edit_find");
if (action)
{
action->setText(i18n("Find Text..."));
@@ -539,7 +539,7 @@ void ViewContainer::updateViewActions(int index)
if (m_frontServer)
{
TQString name = m_frontServer->getDisplayName();
- name = name.tqreplace('&', "&&");
+ name = name.replace('&', "&&");
channelListAction->setEnabled(true);
channelListAction->setChecked(m_frontServer->getChannelListPanel());
channelListAction->setText(i18n("Channel &List for %1").tqarg(name));
@@ -561,7 +561,7 @@ void ViewContainer::updateViewActions(int index)
else
{
TQString name = view->getName();
- name = name.tqreplace('&', "&&");
+ name = name.replace('&', "&&");
action->setText(i18n("&Open Logfile for %1").tqarg(name));
}
}
@@ -629,7 +629,7 @@ void ViewContainer::updateViewActions(int index)
action = actionCollection()->action("clear_tabs");
if (action) action->setEnabled(false);
- action = actionCollection()->action("edit_tqfind");
+ action = actionCollection()->action("edit_find");
if (action) action->setEnabled(false);
action = actionCollection()->action("edit_find_next");
@@ -823,7 +823,7 @@ void ViewContainer::setViewNotification(ChatWindow* view, const Konversation::Ta
if (!view || view == m_tabWidget->currentPage())
return;
- if (type < Konversation::tnfControl && (m_activeViewOrderList.tqfind(view) == m_activeViewOrderList.end()))
+ if (type < Konversation::tnfControl && (m_activeViewOrderList.find(view) == m_activeViewOrderList.end()))
m_activeViewOrderList.append(view);
if (!Preferences::tabNotificationsLeds() && !Preferences::tabNotificationsText())
@@ -1111,7 +1111,7 @@ void ViewContainer::unsetViewNotification(ChatWindow* view)
m_tabWidget->setTabColor(view, textColor);
}
- TQValueList<ChatWindow*>::iterator it = m_activeViewOrderList.tqfind(view);
+ TQValueList<ChatWindow*>::iterator it = m_activeViewOrderList.find(view);
if (it != m_activeViewOrderList.end())
m_activeViewOrderList.remove(it);
@@ -1564,7 +1564,7 @@ void ViewContainer::cleanupAfterClose(ChatWindow* view)
}
// Remove the view from the active view list if it's still on it
- TQValueList<ChatWindow*>::iterator it = m_activeViewOrderList.tqfind(view);
+ TQValueList<ChatWindow*>::iterator it = m_activeViewOrderList.find(view);
if (it != m_activeViewOrderList.end())
m_activeViewOrderList.remove(it);
@@ -1755,7 +1755,7 @@ TQString ViewContainer::currentViewURL(bool passNetwork)
port = ':'+TQString::number(m_frontServer->getPort());
}
- if (server.tqcontains(':')) // IPv6
+ if (server.contains(':')) // IPv6
server = '['+server+']';
url = "irc://"+server+port+'/'+channel;
diff --git a/konversation/src/viewtree.cpp b/konversation/src/viewtree.cpp
index 8b0e72e..4ccde93 100644
--- a/konversation/src/viewtree.cpp
+++ b/konversation/src/viewtree.cpp
@@ -953,7 +953,7 @@ void ViewTree::paintEmptyArea(TQPainter* p, const TQRect& rect)
int y = last->itemPos() + last->height();
int x = visibleWidth();
- if (!rect.tqcontains(x-1, y+2))
+ if (!rect.contains(x-1, y+2))
return;
TQColor bgColor = paletteBackgroundColor();
diff --git a/konversation/src/watchednicknames_preferences.cpp b/konversation/src/watchednicknames_preferences.cpp
index dcc91bd..ccd206a 100644
--- a/konversation/src/watchednicknames_preferences.cpp
+++ b/konversation/src/watchednicknames_preferences.cpp
@@ -90,7 +90,7 @@ void WatchedNicknames_Config::addNetworkBranch(Konversation::ServerGroupSettings
ValueListViewItem* groupItem=new ValueListViewItem(serverGroupList->id(),notifyListView,notifyListView->lastChild(),serverGroupList->name());
// get the group iterator to find all servers in the group
- TQMapConstIterator<int, TQStringList> groupIt=notifyList.tqfind(serverGroupList->id());
+ TQMapConstIterator<int, TQStringList> groupIt=notifyList.find(serverGroupList->id());
// get list of nicks for the current group
TQStringList nicks=groupIt.data();