diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-02-16 20:17:18 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-02-16 20:17:18 +0000 |
commit | f4fae92b6768541e2952173c3d4b09040f95bf7e (patch) | |
tree | d8c5d93232235cd635f3310b4d95490df181ba2d /akregator/src/librss/tools_p.cpp | |
parent | 125c0a08265b75a133644d3b55f47e37c919f45d (diff) | |
download | tdepim-f4fae92b6768541e2952173c3d4b09040f95bf7e.tar.gz tdepim-f4fae92b6768541e2952173c3d4b09040f95bf7e.zip |
Moved kpilot from kdepim to applications, as the core Trinity libraries should not contain hardware-dependent software
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1221127 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'akregator/src/librss/tools_p.cpp')
-rw-r--r-- | akregator/src/librss/tools_p.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/akregator/src/librss/tools_p.cpp b/akregator/src/librss/tools_p.cpp index 41996fd8f..e12bea883 100644 --- a/akregator/src/librss/tools_p.cpp +++ b/akregator/src/librss/tools_p.cpp @@ -43,11 +43,11 @@ TQString childNodesAsXML(const TQDomNode& parent) static TQString plainTextToHtml(const TQString& plainText) { TQString str(plainText); - str.replace("&", "&"); - str.replace("\"", """); - str.replace("<", "<"); - //str.replace(">", ">"); - str.replace("\n", "<br/>"); + str.tqreplace("&", "&"); + str.tqreplace("\"", """); + str.tqreplace("<", "<"); + //str.tqreplace(">", ">"); + str.tqreplace("\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.contains(type) + if (xmltypes.tqcontains(type) || type.endsWith(TQString::fromUtf8("+xml"), false) || type.endsWith(TQString::fromUtf8("/xml"), false)) return XML; @@ -102,7 +102,7 @@ static TQString extractAtomContent(const TQDomElement& e) { case HTML: { - const bool hasPre = e.text().contains( "<pre>", false ) || e.text().contains( "<pre ", false ); + const bool hasPre = e.text().tqcontains( "<pre>", false ) || e.text().tqcontains( "<pre ", false ); return KCharsets::resolveEntities( hasPre ? e.text() : e.text().simplifyWhiteSpace() ); } case Text: @@ -132,10 +132,10 @@ TQString extractNode(const TQDomNode &parent, const TQString &elemName, bool isI } else // check for HTML; not necessary for Atom:content { - 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 + 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 if(!isInlined && !hasHtml) // perform nl2br if not a inline elt and it has no html elts - result = result = result.replace(TQChar('\n'), "<br />"); + result = result = result.tqreplace(TQChar('\n'), "<br />"); if(!hasPre) // strip white spaces if no <pre> result = result.simplifyWhiteSpace(); } @@ -145,13 +145,13 @@ TQString extractNode(const TQDomNode &parent, const TQString &elemName, bool isI TQString extractTitle(const TQDomNode & parent) { - TQDomNode node = parent.namedItem(TQString::fromLatin1("title")); + TQDomNode node = parent.namedItem(TQString::tqfromLatin1("title")); if (node.isNull()) return TQString::null; TQString result = node.toElement().text(); - result = KCharsets::resolveEntities(KCharsets::resolveEntities(result).replace(TQRegExp("<[^>]*>"), "").remove("\\")); + result = KCharsets::resolveEntities(KCharsets::resolveEntities(result).tqreplace(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.replace(all, ""); // remove mail address + str.tqreplace(all, ""); // remove mail address } // simplify the rest and use it as name |