summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/irc/ksparser.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-22 00:30:31 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-22 00:30:31 +0000
commit69cac65817d949cda2672ec4f0aa73d5e66a0ba1 (patch)
tree073fde0496ea90eb5bf5cffe66a8da43a9f55fbc /kopete/protocols/irc/ksparser.cpp
parent3467e6464beac3a162839bf7078e22e3a74d73e7 (diff)
downloadtdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.tar.gz
tdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.zip
TQt4 port kdenetwork
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1237912 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kopete/protocols/irc/ksparser.cpp')
-rw-r--r--kopete/protocols/irc/ksparser.cpp64
1 files changed, 32 insertions, 32 deletions
diff --git a/kopete/protocols/irc/ksparser.cpp b/kopete/protocols/irc/ksparser.cpp
index f9029e84..ea7e72cd 100644
--- a/kopete/protocols/irc/ksparser.cpp
+++ b/kopete/protocols/irc/ksparser.cpp
@@ -33,22 +33,22 @@ KSParser KSParser::m_parser;
const TQColor KSParser::IRC_Colors[17]=
{
- Qt::white,
- Qt::black,
- Qt::darkBlue,
- Qt::darkGreen,
- Qt::red,
- Qt::darkRed,
- Qt::darkMagenta,
- Qt::darkYellow,
- Qt::yellow,
- Qt::green,
- Qt::darkCyan,
- Qt::cyan,
- Qt::blue,
- Qt::magenta,
- Qt::darkGray,
- Qt::gray,
+ TQt::white,
+ TQt::black,
+ TQt::darkBlue,
+ TQt::darkGreen,
+ TQt::red,
+ TQt::darkRed,
+ TQt::darkMagenta,
+ TQt::darkYellow,
+ TQt::yellow,
+ TQt::green,
+ TQt::darkCyan,
+ TQt::cyan,
+ TQt::blue,
+ TQt::magenta,
+ TQt::darkGray,
+ TQt::gray,
TQColor() // default invalid color, must be the last
};
@@ -117,17 +117,17 @@ TQCString KSParser::_parse(const TQCString &message)
}
else
{
- toAppend = popTag(TQString::fromLatin1("span"));
+ toAppend = popTag(TQString::tqfromLatin1("span"));
}
break;
case 0x07: //System bell: ^G
- KNotifyClient::beep( TQString::fromLatin1("IRC beep event received in a message") );
+ KNotifyClient::beep( TQString::tqfromLatin1("IRC beep event received in a message") );
break;
case '\t': // 0x09
- toAppend = TQString::fromLatin1("&nbsp;&nbsp;&nbsp;&nbsp;");
+ toAppend = TQString::tqfromLatin1("&nbsp;&nbsp;&nbsp;&nbsp;");
break;
case '\n': // 0x0D
- toAppend= TQString::fromLatin1("<br/>");
+ toAppend= TQString::tqfromLatin1("<br/>");
break;
case 0x0D: // Italics: ^N
toAppend = toggleTag("i");
@@ -145,14 +145,14 @@ TQCString KSParser::_parse(const TQCString &message)
toAppend = toggleTag("u");
break;
case '<':
- toAppend = TQString::fromLatin1("&lt;");
+ toAppend = TQString::tqfromLatin1("&lt;");
break;
case '>':
- toAppend = TQString::fromLatin1("&gt;");
+ toAppend = TQString::tqfromLatin1("&gt;");
break;
default:
if (cur < TQChar(' ')) // search for control characters
- toAppend = TQString::fromLatin1("&lt;%1&gt;").arg(cur, 2, 16).upper();
+ toAppend = TQString::tqfromLatin1("&lt;%1&gt;").tqarg(cur, 2, 16).upper();
else
toAppend = TQStyleSheet::escape(cur);
}
@@ -178,10 +178,10 @@ TQString KSParser::pushTag(const TQString &tag, const TQString &attributes)
{
TQString res;
m_tags.push(tag);
- if(!m_attributes.contains(tag))
+ if(!m_attributes.tqcontains(tag))
m_attributes.insert(tag, attributes);
else if(!attributes.isEmpty())
- m_attributes.replace(tag, attributes);
+ m_attributes.tqreplace(tag, attributes);
res.append("<" + tag);
if(!m_attributes[tag].isEmpty())
res.append(" " + m_attributes[tag]);
@@ -193,20 +193,20 @@ TQString KSParser::pushColorTag(const TQColor &fgColor, const TQColor &bgColor)
TQString tagStyle;
if (fgColor.isValid())
- tagStyle += TQString::fromLatin1("color:%1;").arg(fgColor.name());
+ tagStyle += TQString::tqfromLatin1("color:%1;").tqarg(fgColor.name());
if (bgColor.isValid())
- tagStyle += TQString::fromLatin1("background-color:%1;").arg(bgColor.name());
+ tagStyle += TQString::tqfromLatin1("background-color:%1;").tqarg(bgColor.name());
if(!tagStyle.isEmpty())
- tagStyle = TQString::fromLatin1("style=\"%1\"").arg(tagStyle);
+ tagStyle = TQString::tqfromLatin1("style=\"%1\"").tqarg(tagStyle);
- return pushTag(TQString::fromLatin1("span"), tagStyle);;
+ return pushTag(TQString::tqfromLatin1("span"), tagStyle);;
}
TQString KSParser::popTag(const TQString &tag)
{
- if (!m_tags.contains(tag))
- return TQString::null;
+ if (!m_tags.tqcontains(tag))
+ return TQString();
TQString res;
TQValueStack<TQString> savedTags;
@@ -224,7 +224,7 @@ TQString KSParser::popTag(const TQString &tag)
TQString KSParser::toggleTag(const TQString &tag)
{
- return m_attributes.contains(tag)?popTag(tag):pushTag(tag);
+ return m_attributes.tqcontains(tag)?popTag(tag):pushTag(tag);
}
TQString KSParser::popAll()