summaryrefslogtreecommitdiffstats
path: root/konversation/src/ircview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'konversation/src/ircview.cpp')
-rw-r--r--konversation/src/ircview.cpp66
1 files changed, 33 insertions, 33 deletions
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: