diff options
Diffstat (limited to 'akregator/src/librss/article.cpp')
-rw-r--r-- | akregator/src/librss/article.cpp | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/akregator/src/librss/article.cpp b/akregator/src/librss/article.cpp index 244130535..59949244b 100644 --- a/akregator/src/librss/article.cpp +++ b/akregator/src/librss/article.cpp @@ -78,35 +78,35 @@ Article::Article(const TQDomNode &node, Format format, Version version) : d(new TQDomNode n; for (n = node.firstChild(); !n.isNull(); n = n.nextSibling()) { const TQDomElement e = n.toElement(); - if ( (e.tagName()==TQString::fromLatin1("link")) && - (e.attribute(TQString::fromLatin1("rel"), TQString::fromLatin1("alternate")) == TQString::fromLatin1("alternate"))) + if ( (e.tagName()==TQString::tqfromLatin1("link")) && + (e.attribute(TQString::tqfromLatin1("rel"), TQString::tqfromLatin1("alternate")) == TQString::tqfromLatin1("alternate"))) { - d->link=n.toElement().attribute(TQString::fromLatin1("href")); + d->link=n.toElement().attribute(TQString::tqfromLatin1("href")); break; } } } else { - if (!(elemText = extractNode(node, TQString::fromLatin1("link"))).isNull()) + if (!(elemText = extractNode(node, TQString::tqfromLatin1("link"))).isNull()) d->link = elemText; } // prefer content/content:encoded over summary/description for feeds that provide it - TQString tagName=(format==AtomFeed)? TQString::fromLatin1("content"): TQString::fromLatin1("content:encoded"); + TQString tagName=(format==AtomFeed)? TQString::tqfromLatin1("content"): TQString::tqfromLatin1("content:encoded"); if (!(elemText = extractNode(node, tagName, false)).isNull()) d->description = elemText; if (d->description.isEmpty()) { - if (!(elemText = extractNode(node, TQString::fromLatin1("body"), false)).isNull()) + if (!(elemText = extractNode(node, TQString::tqfromLatin1("body"), false)).isNull()) d->description = elemText; if (d->description.isEmpty()) // 3rd try: see http://www.intertwingly.net/blog/1299.html { - if (!(elemText = extractNode(node, TQString::fromLatin1((format==AtomFeed)? "summary" : "description"), false)).isNull()) + if (!(elemText = extractNode(node, TQString::tqfromLatin1((format==AtomFeed)? "summary" : "description"), false)).isNull()) d->description = elemText; } } @@ -116,21 +116,21 @@ Article::Article(const TQDomNode &node, Format format, Version version) : d(new if (format == AtomFeed) { if (version == vAtom_1_0) - elemText = extractNode(node, TQString::fromLatin1("updated")); + elemText = extractNode(node, TQString::tqfromLatin1("updated")); else - elemText = extractNode(node, TQString::fromLatin1("issued")); + elemText = extractNode(node, TQString::tqfromLatin1("issued")); if (!elemText.isNull()) time = parseISO8601Date(elemText); } else { - elemText = extractNode(node, TQString::fromLatin1("pubDate")); + elemText = extractNode(node, TQString::tqfromLatin1("pubDate")); if (!elemText.isNull()) time = KRFCDate::parseDate(elemText); } - if (!(elemText = extractNode(node, TQString::fromLatin1("dc:date"))).isNull()) + if (!(elemText = extractNode(node, TQString::tqfromLatin1("dc:date"))).isNull()) { time = parseISO8601Date(elemText); } @@ -139,11 +139,11 @@ Article::Article(const TQDomNode &node, Format format, Version version) : d(new if (time != 0) d->pubDate.setTime_t(time); - if (!(elemText = extractNode(node, TQString::fromLatin1("wfw:comment"))).isNull()) { + if (!(elemText = extractNode(node, TQString::tqfromLatin1("wfw:comment"))).isNull()) { d->commentsLink = elemText; } - if (!(elemText = extractNode(node, TQString::fromLatin1("slash:comments"))).isNull()) { + if (!(elemText = extractNode(node, TQString::tqfromLatin1("slash:comments"))).isNull()) { d->numComments = elemText.toInt(); } @@ -152,19 +152,19 @@ Article::Article(const TQDomNode &node, Format format, Version version) : d(new // in RSS 1.0, we use <item about> attribute as ID // FIXME: pass format version instead of checking for attribute - if (!element.isNull() && element.hasAttribute(TQString::fromLatin1("rdf:about"))) + if (!element.isNull() && element.hasAttribute(TQString::tqfromLatin1("rdf:about"))) { - d->guid = element.attribute(TQString::fromLatin1("rdf:about")); // HACK: using ns properly did not work + d->guid = element.attribute(TQString::tqfromLatin1("rdf:about")); // HACK: using ns properly did not work d->guidIsPermaLink = false; } else { - tagName=(format==AtomFeed)? TQString::fromLatin1("id"): TQString::fromLatin1("guid"); + tagName=(format==AtomFeed)? TQString::tqfromLatin1("id"): TQString::tqfromLatin1("guid"); TQDomNode n = node.namedItem(tagName); if (!n.isNull()) { d->guidIsPermaLink = (format==AtomFeed)? false : true; - if (n.toElement().attribute(TQString::fromLatin1("isPermaLink"), "true") == "false") d->guidIsPermaLink = false; + if (n.toElement().attribute(TQString::tqfromLatin1("isPermaLink"), "true") == "false") d->guidIsPermaLink = false; if (!(elemText = extractNode(node, tagName)).isNull()) d->guid = elemText; } @@ -178,10 +178,10 @@ Article::Article(const TQDomNode &node, Format format, Version version) : d(new md5Machine.update(d->title.utf8()); md5Machine.update(d->description.utf8()); d->guid = TQString(md5Machine.hexDigest().data()); - d->meta[TQString::fromLatin1("guidIsHash")] = TQString::fromLatin1("true"); + d->meta[TQString::tqfromLatin1("guidIsHash")] = TQString::tqfromLatin1("true"); } - TQDomNode enclosure = element.namedItem(TQString::fromLatin1("enclosure")); + TQDomNode enclosure = element.namedItem(TQString::tqfromLatin1("enclosure")); if (enclosure.isElement()) d->enclosure = Enclosure::fromXML(enclosure.toElement()); @@ -191,12 +191,12 @@ Article::Article(const TQDomNode &node, Format format, Version version) : d(new { if (i.isElement()) { - if (i.toElement().tagName() == TQString::fromLatin1("metaInfo:meta")) + if (i.toElement().tagName() == TQString::tqfromLatin1("metaInfo:meta")) { - TQString type = i.toElement().attribute(TQString::fromLatin1("type")); + TQString type = i.toElement().attribute(TQString::tqfromLatin1("type")); d->meta[type] = i.toElement().text(); } - else if (i.toElement().tagName() == TQString::fromLatin1("category")) + else if (i.toElement().tagName() == TQString::tqfromLatin1("category")) { d->categories.append(Category::fromXML(i.toElement())); } |