summaryrefslogtreecommitdiffstats
path: root/knewsticker/common/xmlnewsaccess.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'knewsticker/common/xmlnewsaccess.cpp')
-rw-r--r--knewsticker/common/xmlnewsaccess.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/knewsticker/common/xmlnewsaccess.cpp b/knewsticker/common/xmlnewsaccess.cpp
index 8f4619f6..3aff700b 100644
--- a/knewsticker/common/xmlnewsaccess.cpp
+++ b/knewsticker/common/xmlnewsaccess.cpp
@@ -37,9 +37,9 @@ bool XMLNewsArticle::operator==(const XMLNewsArticle &a)
}
XMLNewsSource::XMLNewsSource() : TQObject(),
- m_name(TQString::null),
- m_link(TQString::null),
- m_description(TQString::null),
+ m_name(TQString()),
+ m_link(TQString()),
+ m_description(TQString()),
m_downloadData(0)
{
}
@@ -60,8 +60,8 @@ void XMLNewsSource::loadFrom(const KURL &url)
m_downloadData->open(IO_WriteOnly);
KIO::Job *job = KIO::get(url, false, false);
- job->addMetaData(TQString::fromLatin1("UserAgent"),
- TQString::fromLatin1("KNewsTicker v0.2"));
+ job->addMetaData(TQString::tqfromLatin1("UserAgent"),
+ TQString::tqfromLatin1("KNewsTicker v0.2"));
connect(job, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)),
TQT_SLOT(slotData(KIO::Job *, const TQByteArray &)));
connect(job, TQT_SIGNAL(result(KIO::Job *)), TQT_SLOT(slotResult(KIO::Job *)));
@@ -88,7 +88,7 @@ void XMLNewsSource::processData(const TQByteArray &data, bool okSoFar)
if (okSoFar) {
/*
* Some servers prepend whitespace before the <?xml...?> declaration.
- * Since QDom doesn't like that we strip this first.
+ * Since TQDom doesn't like that we strip this first.
*/
TQDomDocument domDoc;
@@ -104,21 +104,21 @@ void XMLNewsSource::processData(const TQByteArray &data, bool okSoFar)
tmpData.setRawData(charData, len);
if (validContent = domDoc.setContent(tmpData)) {
- TQDomNode channelNode = domDoc.documentElement().namedItem(TQString::fromLatin1("channel"));
+ TQDomNode channelNode = domDoc.documentElement().namedItem(TQString::tqfromLatin1("channel"));
- m_name = channelNode.namedItem(TQString::fromLatin1("title")).toElement().text().simplifyWhiteSpace();
+ m_name = channelNode.namedItem(TQString::tqfromLatin1("title")).toElement().text().simplifyWhiteSpace();
kdDebug(5005) << "XMLNewsSource::processData(): Successfully updated " << m_name << endl;
- m_link = channelNode.namedItem(TQString::fromLatin1("link")).toElement().text().simplifyWhiteSpace();
- m_description = channelNode.namedItem(TQString::fromLatin1("description")).toElement().text().simplifyWhiteSpace();
+ m_link = channelNode.namedItem(TQString::tqfromLatin1("link")).toElement().text().simplifyWhiteSpace();
+ m_description = channelNode.namedItem(TQString::tqfromLatin1("description")).toElement().text().simplifyWhiteSpace();
- TQDomNodeList items = domDoc.elementsByTagName(TQString::fromLatin1("item"));
+ TQDomNodeList items = domDoc.elementsByTagName(TQString::tqfromLatin1("item"));
m_articles.clear();
TQDomNode itemNode;
TQString headline, address;
for (unsigned int i = 0; i < items.count(); i++) {
itemNode = items.item(i);
- headline = KCharsets::resolveEntities(itemNode.namedItem(TQString::fromLatin1("title")).toElement().text().simplifyWhiteSpace());
- address = KCharsets::resolveEntities(itemNode.namedItem(TQString::fromLatin1("link")).toElement().text().simplifyWhiteSpace());
+ headline = KCharsets::resolveEntities(itemNode.namedItem(TQString::tqfromLatin1("title")).toElement().text().simplifyWhiteSpace());
+ address = KCharsets::resolveEntities(itemNode.namedItem(TQString::tqfromLatin1("link")).toElement().text().simplifyWhiteSpace());
m_articles.append(XMLNewsArticle(headline, KURL( address )));
}
}