summaryrefslogtreecommitdiffstats
path: root/akregator/src/librss/tools_p.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'akregator/src/librss/tools_p.cpp')
-rw-r--r--akregator/src/librss/tools_p.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/akregator/src/librss/tools_p.cpp b/akregator/src/librss/tools_p.cpp
index 72058fa05..baaa6409d 100644
--- a/akregator/src/librss/tools_p.cpp
+++ b/akregator/src/librss/tools_p.cpp
@@ -24,7 +24,7 @@ time_t parseISO8601Date(const TQString &s)
return 0; // error
// FIXME: imho this is done in KRFCDate::parseDateISO8601() automatically, so we could omit it? -fo
- if (s.tqfind('T') != -1)
+ if (s.find('T') != -1)
return KRFCDate::parseDateISO8601(s);
else
return KRFCDate::parseDateISO8601(s + "T12:00:00");
@@ -43,11 +43,11 @@ TQString childNodesAsXML(const TQDomNode& tqparent)
static TQString plainTextToHtml(const TQString& plainText)
{
TQString str(plainText);
- str.tqreplace("&", "&");
- str.tqreplace("\"", """);
- str.tqreplace("<", "&lt;");
- //str.tqreplace(">", "&gt;");
- str.tqreplace("\n", "<br/>");
+ str.replace("&", "&amp;");
+ str.replace("\"", "&quot;");
+ str.replace("<", "&lt;");
+ //str.replace(">", "&gt;");
+ str.replace("\n", "<br/>");
return str;
}
@@ -84,7 +84,7 @@ static ContentFormat mapTypeToFormat(const TQString& modep, const TQString& type
xmltypes.append(TQString::fromUtf8("application/xml-dtd"));
- if (xmltypes.tqcontains(type)
+ if (xmltypes.contains(type)
|| type.tqendsWith(TQString::fromUtf8("+xml"), false)
|| type.tqendsWith(TQString::fromUtf8("/xml"), false))
return XML;
@@ -102,7 +102,7 @@ static TQString extractAtomContent(const TQDomElement& e)
{
case HTML:
{
- const bool hasPre = e.text().tqcontains( "<pre>", false ) || e.text().tqcontains( "<pre ", false );
+ const bool hasPre = e.text().contains( "<pre>", false ) || e.text().contains( "<pre ", false );
return KCharsets::resolveEntities( hasPre ? e.text() : e.text().simplifyWhiteSpace() );
}
case Text:
@@ -132,10 +132,10 @@ TQString extractNode(const TQDomNode &tqparent, const TQString &elemName, bool i
}
else // check for HTML; not necessary for Atom:content
{
- bool hasPre = result.tqcontains("<pre>", false) || result.tqcontains("<pre ", false);
- bool hasHtml = hasPre || result.tqcontains("<"); // FIXME: test if we have html, should be more clever -> regexp
+ bool hasPre = result.contains("<pre>", false) || result.contains("<pre ", false);
+ bool hasHtml = hasPre || result.contains("<"); // FIXME: test if we have html, should be more clever -> regexp
if(!isInlined && !hasHtml) // perform nl2br if not a inline elt and it has no html elts
- result = result = result.tqreplace(TQChar('\n'), "<br />");
+ result = result = result.replace(TQChar('\n'), "<br />");
if(!hasPre) // strip white spaces if no <pre>
result = result.simplifyWhiteSpace();
}
@@ -151,7 +151,7 @@ TQString extractTitle(const TQDomNode & tqparent)
TQString result = node.toElement().text();
- result = KCharsets::resolveEntities(KCharsets::resolveEntities(result).tqreplace(TQRegExp("<[^>]*>"), "").remove("\\"));
+ result = KCharsets::resolveEntities(KCharsets::resolveEntities(result).replace(TQRegExp("<[^>]*>"), "").remove("\\"));
result = result.simplifyWhiteSpace();
if (result.isEmpty())
@@ -177,7 +177,7 @@ static void authorFromString(const TQString& strp, TQString& name, TQString& ema
{
TQString all = remail.cap(0);
email = remail.cap(1);
- str.tqreplace(all, ""); // remove mail address
+ str.replace(all, ""); // remove mail address
}
// simplify the rest and use it as name