summaryrefslogtreecommitdiffstats
path: root/librss
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 /librss
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 'librss')
-rw-r--r--librss/article.cpp20
-rw-r--r--librss/article.h10
-rw-r--r--librss/document.cpp286
-rw-r--r--librss/document.h8
-rw-r--r--librss/global.h2
-rw-r--r--librss/image.cpp12
-rw-r--r--librss/image.h7
-rw-r--r--librss/loader.cpp8
-rw-r--r--librss/loader.h18
-rw-r--r--librss/testlibrss.cpp6
-rw-r--r--librss/testlibrss.h7
-rw-r--r--librss/textinput.cpp8
-rw-r--r--librss/textinput.h6
-rw-r--r--librss/tools_p.cpp8
-rw-r--r--librss/tools_p.h2
15 files changed, 207 insertions, 201 deletions
diff --git a/librss/article.cpp b/librss/article.cpp
index 4161e0d5..8c6e8f91 100644
--- a/librss/article.cpp
+++ b/librss/article.cpp
@@ -43,13 +43,13 @@ Article::Article(const TQDomNode &node) : d(new Private)
{
TQString elemText;
- if (!(elemText = extractNode(node, TQString::fromLatin1("title"))).isNull())
+ if (!(elemText = extractNode(node, TQString::tqfromLatin1("title"))).isNull())
d->title = elemText;
- if (!(elemText = extractNode(node, TQString::fromLatin1("link"))).isNull())
+ if (!(elemText = extractNode(node, TQString::tqfromLatin1("link"))).isNull())
d->link = elemText;
- if (!(elemText = extractNode(node, TQString::fromLatin1("description"))).isNull())
+ if (!(elemText = extractNode(node, TQString::tqfromLatin1("description"))).isNull())
d->description = elemText;
- if (!(elemText = extractNode(node, TQString::fromLatin1("pubDate"))).isNull()) {
+ if (!(elemText = extractNode(node, TQString::tqfromLatin1("pubDate"))).isNull()) {
time_t _time = KRFCDate::parseDate(elemText);
/* \bug This isn't really the right way since it will set the date to
* Jan 1 1970, 1:00:00 if the passed date was invalid; this means that
@@ -57,7 +57,7 @@ Article::Article(const TQDomNode &node) : d(new Private)
*/
d->pubDate.setTime_t(_time);
}
- if (!(elemText = extractNode(node, TQString::fromLatin1("dc:date"))).isNull()) {
+ if (!(elemText = extractNode(node, TQString::tqfromLatin1("dc:date"))).isNull()) {
time_t _time = KRFCDate::parseDateISO8601(elemText);
/* \bug This isn't really the right way since it will set the date to
* Jan 1 1970, 1:00:00 if the passed date was invalid; this means that
@@ -66,12 +66,12 @@ Article::Article(const TQDomNode &node) : d(new Private)
d->pubDate.setTime_t(_time);
}
- TQDomNode n = node.namedItem(TQString::fromLatin1("guid"));
+ TQDomNode n = node.namedItem(TQString::tqfromLatin1("guid"));
if (!n.isNull()) {
d->guidIsPermaLink = 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, TQString::fromLatin1("guid"))).isNull())
+ if (!(elemText = extractNode(node, TQString::tqfromLatin1("guid"))).isNull())
d->guid = elemText;
}
}
@@ -112,9 +112,9 @@ const TQDateTime &Article::pubDate() const
return d->pubDate;
}
-KURLLabel *Article::widget(TQWidget *parent, const char *name) const
+KURLLabel *Article::widget(TQWidget *tqparent, const char *name) const
{
- KURLLabel *label = new KURLLabel(d->link.url(), d->title, parent, name);
+ KURLLabel *label = new KURLLabel(d->link.url(), d->title, tqparent, name);
label->setUseTips(true);
if (!d->description.isNull())
label->setTipText(d->description);
diff --git a/librss/article.h b/librss/article.h
index a05ddb34..0444e7f3 100644
--- a/librss/article.h
+++ b/librss/article.h
@@ -86,7 +86,7 @@ namespace RSS
/**
* RSS 0.90 and upwards
- * @return The headline of this article, or TQString::null if
+ * @return The headline of this article, or TQString() if
* no headline was available.
*/
TQString title() const;
@@ -102,7 +102,7 @@ namespace RSS
/**
* RSS 0.91 and upwards
- * @return A story synopsis, or TQString::null if no description
+ * @return A story synopsis, or TQString() if no description
* was available.
*/
TQString description() const;
@@ -115,7 +115,7 @@ namespace RSS
/**
* RSS 2.0 and upwards
- * @return If this article GUID is permalink. Has no meaning when guid() is TQString::null.
+ * @return If this article GUID is permalink. Has no meaning when guid() is TQString().
*/
bool guidIsPermaLink() const;
@@ -126,7 +126,7 @@ namespace RSS
const TQDateTime &pubDate() const;
/**
- * @param parent The parent widget for the KURLLabel.
+ * @param tqparent The tqparent widget for the KURLLabel.
* @param name A name for the widget which will be used internally.
* @return a widget (a KURLLabel in this case) for the Article.
* This makes building a user-interface which contains the
@@ -139,7 +139,7 @@ namespace RSS
* Note that you have to delete the KURLLabel object returned by
* this method yourself.
*/
- KURLLabel *widget(TQWidget *parent = 0, const char *name = 0) const;
+ KURLLabel *widget(TQWidget *tqparent = 0, const char *name = 0) const;
private:
struct Private;
diff --git a/librss/document.cpp b/librss/document.cpp
index f551716a..de5f81df 100644
--- a/librss/document.cpp
+++ b/librss/document.cpp
@@ -70,7 +70,7 @@ Document::Document(const TQDomDocument &doc) : d(new Private)
TQDomNode rootNode = doc.documentElement();
// Determine the version of the present RSS markup.
- TQString attr = rootNode.toElement().attribute(TQString::fromLatin1("xmlns"), TQString::null);
+ TQString attr = rootNode.toElement().attribute(TQString::tqfromLatin1("xmlns"), TQString());
if (!attr.isNull()) {
/*
* Hardcoding these URLs is actually a bad idea, since the DTD doesn't
@@ -80,256 +80,256 @@ Document::Document(const TQDomDocument &doc) : d(new Private)
* distinguish the RSS versions by analyzing the relationship between
* the nodes.
*/
- if (attr == TQString::fromLatin1("http://my.netscape.com/rdf/simple/0.9/"))
+ if (attr == TQString::tqfromLatin1("http://my.netscape.com/rdf/simple/0.9/"))
d->version = v0_90;
- else if (attr == TQString::fromLatin1("http://purl.org/rss/1.0/")) {
+ else if (attr == TQString::tqfromLatin1("http://purl.org/rss/1.0/")) {
d->version = v1_0;
}
} else {
- attr = rootNode.toElement().attribute(TQString::fromLatin1("version"), TQString::null);
+ attr = rootNode.toElement().attribute(TQString::tqfromLatin1("version"), TQString());
if (!attr.isNull()) {
- if (attr == TQString::fromLatin1("0.91"))
+ if (attr == TQString::tqfromLatin1("0.91"))
d->version = v0_91;
- else if (attr == TQString::fromLatin1("0.92"))
+ else if (attr == TQString::tqfromLatin1("0.92"))
d->version = v0_92;
- else if (attr == TQString::fromLatin1("0.93"))
+ else if (attr == TQString::tqfromLatin1("0.93"))
d->version = v0_93;
- else if (attr == TQString::fromLatin1("0.94"))
+ else if (attr == TQString::tqfromLatin1("0.94"))
d->version = v0_94;
- else if (attr == TQString::fromLatin1("2.0") || attr == TQString::fromLatin1("2"))
+ else if (attr == TQString::tqfromLatin1("2.0") || attr == TQString::tqfromLatin1("2"))
d->version = v2_0;
}
}
- TQDomNode channelNode = rootNode.namedItem(TQString::fromLatin1("channel"));
+ TQDomNode channelNode = rootNode.namedItem(TQString::tqfromLatin1("channel"));
- if (!(elemText = extractNode(channelNode, TQString::fromLatin1("title"))).isNull())
+ if (!(elemText = extractNode(channelNode, TQString::tqfromLatin1("title"))).isNull())
d->title = elemText;
- if (!(elemText = extractNode(channelNode, TQString::fromLatin1("description"))).isNull())
+ if (!(elemText = extractNode(channelNode, TQString::tqfromLatin1("description"))).isNull())
d->description = elemText;
- if (!(elemText = extractNode(channelNode, TQString::fromLatin1("link"))).isNull())
+ if (!(elemText = extractNode(channelNode, TQString::tqfromLatin1("link"))).isNull())
d->link = elemText;
- /* This is ugly but necessary since RSS 0.90 and 1.0 have a different parent
+ /* This is ugly but necessary since RSS 0.90 and 1.0 have a different tqparent
* node for <image>, <textinput> and <item> than RSS 0.91-0.94 and RSS 2.0.
*/
- TQDomNode parentNode;
+ TQDomNode tqparentNode;
if (d->version == v0_90 || d->version == v1_0)
- parentNode = rootNode;
+ tqparentNode = rootNode;
else
- parentNode = channelNode;
+ tqparentNode = channelNode;
- TQDomNode n = parentNode.namedItem(TQString::fromLatin1("image"));
+ TQDomNode n = tqparentNode.namedItem(TQString::tqfromLatin1("image"));
if (!n.isNull())
d->image = new Image(n);
- n = parentNode.namedItem(TQString::fromLatin1("textinput"));
+ n = tqparentNode.namedItem(TQString::tqfromLatin1("textinput"));
if (!n.isNull())
d->textInput = new TextInput(n);
// Our (hopefully faster) version of elementsByTagName()
- for (n = parentNode.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ for (n = tqparentNode.firstChild(); !n.isNull(); n = n.nextSibling()) {
const TQDomElement e = n.toElement();
- if (e.tagName() == TQString::fromLatin1("item"))
+ if (e.tagName() == TQString::tqfromLatin1("item"))
d->articles.append(Article(e));
}
- if (!(elemText = extractNode(channelNode, TQString::fromLatin1("copyright"))).isNull())
+ if (!(elemText = extractNode(channelNode, TQString::tqfromLatin1("copyright"))).isNull())
d->copyright = elemText;
- if (!(elemText = extractNode(channelNode, TQString::fromLatin1("language"))).isNull()) {
- if (elemText == TQString::fromLatin1("af"))
+ if (!(elemText = extractNode(channelNode, TQString::tqfromLatin1("language"))).isNull()) {
+ if (elemText == TQString::tqfromLatin1("af"))
d->language = af;
- else if (elemText == TQString::fromLatin1("sq"))
+ else if (elemText == TQString::tqfromLatin1("sq"))
d->language = sq;
- else if (elemText == TQString::fromLatin1("eu"))
+ else if (elemText == TQString::tqfromLatin1("eu"))
d->language = eu;
- else if (elemText == TQString::fromLatin1("be"))
+ else if (elemText == TQString::tqfromLatin1("be"))
d->language = be;
- else if (elemText == TQString::fromLatin1("bg"))
+ else if (elemText == TQString::tqfromLatin1("bg"))
d->language = bg;
- else if (elemText == TQString::fromLatin1("ca"))
+ else if (elemText == TQString::tqfromLatin1("ca"))
d->language = ca;
- else if (elemText == TQString::fromLatin1("zh-cn"))
+ else if (elemText == TQString::tqfromLatin1("zh-cn"))
d->language = zh_cn;
- else if (elemText == TQString::fromLatin1("zh-tw"))
+ else if (elemText == TQString::tqfromLatin1("zh-tw"))
d->language = zh_tw;
- else if (elemText == TQString::fromLatin1("hr"))
+ else if (elemText == TQString::tqfromLatin1("hr"))
d->language = hr;
- else if (elemText == TQString::fromLatin1("cs"))
+ else if (elemText == TQString::tqfromLatin1("cs"))
d->language = cs;
- else if (elemText == TQString::fromLatin1("da"))
+ else if (elemText == TQString::tqfromLatin1("da"))
d->language = da;
- else if (elemText == TQString::fromLatin1("nl"))
+ else if (elemText == TQString::tqfromLatin1("nl"))
d->language = nl;
- else if (elemText == TQString::fromLatin1("nl-be"))
+ else if (elemText == TQString::tqfromLatin1("nl-be"))
d->language = nl_be;
- else if (elemText == TQString::fromLatin1("nl-nl"))
+ else if (elemText == TQString::tqfromLatin1("nl-nl"))
d->language = nl_nl;
- else if (elemText == TQString::fromLatin1("en"))
+ else if (elemText == TQString::tqfromLatin1("en"))
d->language = en;
- else if (elemText == TQString::fromLatin1("en-au"))
+ else if (elemText == TQString::tqfromLatin1("en-au"))
d->language = en_au;
- else if (elemText == TQString::fromLatin1("en-bz"))
+ else if (elemText == TQString::tqfromLatin1("en-bz"))
d->language = en_bz;
- else if (elemText == TQString::fromLatin1("en-ca"))
+ else if (elemText == TQString::tqfromLatin1("en-ca"))
d->language = en_ca;
- else if (elemText == TQString::fromLatin1("en-ie"))
+ else if (elemText == TQString::tqfromLatin1("en-ie"))
d->language = en_ie;
- else if (elemText == TQString::fromLatin1("en-jm"))
+ else if (elemText == TQString::tqfromLatin1("en-jm"))
d->language = en_jm;
- else if (elemText == TQString::fromLatin1("en-nz"))
+ else if (elemText == TQString::tqfromLatin1("en-nz"))
d->language = en_nz;
- else if (elemText == TQString::fromLatin1("en-ph"))
+ else if (elemText == TQString::tqfromLatin1("en-ph"))
d->language = en_ph;
- else if (elemText == TQString::fromLatin1("en-za"))
+ else if (elemText == TQString::tqfromLatin1("en-za"))
d->language = en_za;
- else if (elemText == TQString::fromLatin1("en-tt"))
+ else if (elemText == TQString::tqfromLatin1("en-tt"))
d->language = en_tt;
- else if (elemText == TQString::fromLatin1("en-gb"))
+ else if (elemText == TQString::tqfromLatin1("en-gb"))
d->language = en_gb;
- else if (elemText == TQString::fromLatin1("en-us"))
+ else if (elemText == TQString::tqfromLatin1("en-us"))
d->language = en_us;
- else if (elemText == TQString::fromLatin1("en-zw"))
+ else if (elemText == TQString::tqfromLatin1("en-zw"))
d->language = en_zw;
- else if (elemText == TQString::fromLatin1("fo"))
+ else if (elemText == TQString::tqfromLatin1("fo"))
d->language = fo;
- else if (elemText == TQString::fromLatin1("fi"))
+ else if (elemText == TQString::tqfromLatin1("fi"))
d->language = fi;
- else if (elemText == TQString::fromLatin1("fr"))
+ else if (elemText == TQString::tqfromLatin1("fr"))
d->language = fr;
- else if (elemText == TQString::fromLatin1("fr-be"))
+ else if (elemText == TQString::tqfromLatin1("fr-be"))
d->language = fr_be;
- else if (elemText == TQString::fromLatin1("fr-ca"))
+ else if (elemText == TQString::tqfromLatin1("fr-ca"))
d->language = fr_ca;
- else if (elemText == TQString::fromLatin1("fr-fr"))
+ else if (elemText == TQString::tqfromLatin1("fr-fr"))
d->language = fr_fr;
- else if (elemText == TQString::fromLatin1("fr-lu"))
+ else if (elemText == TQString::tqfromLatin1("fr-lu"))
d->language = fr_lu;
- else if (elemText == TQString::fromLatin1("fr-mc"))
+ else if (elemText == TQString::tqfromLatin1("fr-mc"))
d->language = fr_mc;
- else if (elemText == TQString::fromLatin1("fr-ch"))
+ else if (elemText == TQString::tqfromLatin1("fr-ch"))
d->language = fr_ch;
- else if (elemText == TQString::fromLatin1("gl"))
+ else if (elemText == TQString::tqfromLatin1("gl"))
d->language = gl;
- else if (elemText == TQString::fromLatin1("gd"))
+ else if (elemText == TQString::tqfromLatin1("gd"))
d->language = gd;
- else if (elemText == TQString::fromLatin1("de"))
+ else if (elemText == TQString::tqfromLatin1("de"))
d->language = de;
- else if (elemText == TQString::fromLatin1("de-at"))
+ else if (elemText == TQString::tqfromLatin1("de-at"))
d->language = de_at;
- else if (elemText == TQString::fromLatin1("de-de"))
+ else if (elemText == TQString::tqfromLatin1("de-de"))
d->language = de_de;
- else if (elemText == TQString::fromLatin1("de-li"))
+ else if (elemText == TQString::tqfromLatin1("de-li"))
d->language = de_li;
- else if (elemText == TQString::fromLatin1("de-lu"))
+ else if (elemText == TQString::tqfromLatin1("de-lu"))
d->language = de_lu;
- else if (elemText == TQString::fromLatin1("de-ch"))
+ else if (elemText == TQString::tqfromLatin1("de-ch"))
d->language = de_ch;
- else if (elemText == TQString::fromLatin1("el"))
+ else if (elemText == TQString::tqfromLatin1("el"))
d->language = el;
- else if (elemText == TQString::fromLatin1("hu"))
+ else if (elemText == TQString::tqfromLatin1("hu"))
d->language = hu;
- else if (elemText == TQString::fromLatin1("is"))
+ else if (elemText == TQString::tqfromLatin1("is"))
d->language = is;
- else if (elemText == TQString::fromLatin1("id"))
+ else if (elemText == TQString::tqfromLatin1("id"))
d->language = id;
- else if (elemText == TQString::fromLatin1("ga"))
+ else if (elemText == TQString::tqfromLatin1("ga"))
d->language = ga;
- else if (elemText == TQString::fromLatin1("it"))
+ else if (elemText == TQString::tqfromLatin1("it"))
d->language = it;
- else if (elemText == TQString::fromLatin1("it-it"))
+ else if (elemText == TQString::tqfromLatin1("it-it"))
d->language = it_it;
- else if (elemText == TQString::fromLatin1("it-ch"))
+ else if (elemText == TQString::tqfromLatin1("it-ch"))
d->language = it_ch;
- else if (elemText == TQString::fromLatin1("ja"))
+ else if (elemText == TQString::tqfromLatin1("ja"))
d->language = ja;
- else if (elemText == TQString::fromLatin1("ko"))
+ else if (elemText == TQString::tqfromLatin1("ko"))
d->language = ko;
- else if (elemText == TQString::fromLatin1("mk"))
+ else if (elemText == TQString::tqfromLatin1("mk"))
d->language = mk;
- else if (elemText == TQString::fromLatin1("no"))
+ else if (elemText == TQString::tqfromLatin1("no"))
d->language = no;
- else if (elemText == TQString::fromLatin1("pl"))
+ else if (elemText == TQString::tqfromLatin1("pl"))
d->language = pl;
- else if (elemText == TQString::fromLatin1("pt"))
+ else if (elemText == TQString::tqfromLatin1("pt"))
d->language = pt;
- else if (elemText == TQString::fromLatin1("pt-br"))
+ else if (elemText == TQString::tqfromLatin1("pt-br"))
d->language = pt_br;
- else if (elemText == TQString::fromLatin1("pt-pt"))
+ else if (elemText == TQString::tqfromLatin1("pt-pt"))
d->language = pt_pt;
- else if (elemText == TQString::fromLatin1("ro"))
+ else if (elemText == TQString::tqfromLatin1("ro"))
d->language = ro;
- else if (elemText == TQString::fromLatin1("ro-mo"))
+ else if (elemText == TQString::tqfromLatin1("ro-mo"))
d->language = ro_mo;
- else if (elemText == TQString::fromLatin1("ro-ro"))
+ else if (elemText == TQString::tqfromLatin1("ro-ro"))
d->language = ro_ro;
- else if (elemText == TQString::fromLatin1("ru"))
+ else if (elemText == TQString::tqfromLatin1("ru"))
d->language = ru;
- else if (elemText == TQString::fromLatin1("ru-mo"))
+ else if (elemText == TQString::tqfromLatin1("ru-mo"))
d->language = ru_mo;
- else if (elemText == TQString::fromLatin1("ru-ru"))
+ else if (elemText == TQString::tqfromLatin1("ru-ru"))
d->language = ru_ru;
- else if (elemText == TQString::fromLatin1("sr"))
+ else if (elemText == TQString::tqfromLatin1("sr"))
d->language = sr;
- else if (elemText == TQString::fromLatin1("sk"))
+ else if (elemText == TQString::tqfromLatin1("sk"))
d->language = sk;
- else if (elemText == TQString::fromLatin1("sl"))
+ else if (elemText == TQString::tqfromLatin1("sl"))
d->language = sl;
- else if (elemText == TQString::fromLatin1("es"))
+ else if (elemText == TQString::tqfromLatin1("es"))
d->language = es;
- else if (elemText == TQString::fromLatin1("es-ar"))
+ else if (elemText == TQString::tqfromLatin1("es-ar"))
d->language = es_ar;
- else if (elemText == TQString::fromLatin1("es-bo"))
+ else if (elemText == TQString::tqfromLatin1("es-bo"))
d->language = es_bo;
- else if (elemText == TQString::fromLatin1("es-cl"))
+ else if (elemText == TQString::tqfromLatin1("es-cl"))
d->language = es_cl;
- else if (elemText == TQString::fromLatin1("es-co"))
+ else if (elemText == TQString::tqfromLatin1("es-co"))
d->language = es_co;
- else if (elemText == TQString::fromLatin1("es-cr"))
+ else if (elemText == TQString::tqfromLatin1("es-cr"))
d->language = es_cr;
- else if (elemText == TQString::fromLatin1("es-do"))
+ else if (elemText == TQString::tqfromLatin1("es-do"))
d->language = es_do;
- else if (elemText == TQString::fromLatin1("es-ec"))
+ else if (elemText == TQString::tqfromLatin1("es-ec"))
d->language = es_ec;
- else if (elemText == TQString::fromLatin1("es-sv"))
+ else if (elemText == TQString::tqfromLatin1("es-sv"))
d->language = es_sv;
- else if (elemText == TQString::fromLatin1("es-gt"))
+ else if (elemText == TQString::tqfromLatin1("es-gt"))
d->language = es_gt;
- else if (elemText == TQString::fromLatin1("es-hn"))
+ else if (elemText == TQString::tqfromLatin1("es-hn"))
d->language = es_hn;
- else if (elemText == TQString::fromLatin1("es-mx"))
+ else if (elemText == TQString::tqfromLatin1("es-mx"))
d->language = es_mx;
- else if (elemText == TQString::fromLatin1("es-ni"))
+ else if (elemText == TQString::tqfromLatin1("es-ni"))
d->language = es_ni;
- else if (elemText == TQString::fromLatin1("es-pa"))
+ else if (elemText == TQString::tqfromLatin1("es-pa"))
d->language = es_pa;
- else if (elemText == TQString::fromLatin1("es-py"))
+ else if (elemText == TQString::tqfromLatin1("es-py"))
d->language = es_py;
- else if (elemText == TQString::fromLatin1("es-pe"))
+ else if (elemText == TQString::tqfromLatin1("es-pe"))
d->language = es_pe;
- else if (elemText == TQString::fromLatin1("es-pr"))
+ else if (elemText == TQString::tqfromLatin1("es-pr"))
d->language = es_pr;
- else if (elemText == TQString::fromLatin1("es-es"))
+ else if (elemText == TQString::tqfromLatin1("es-es"))
d->language = es_es;
- else if (elemText == TQString::fromLatin1("es-uy"))
+ else if (elemText == TQString::tqfromLatin1("es-uy"))
d->language = es_uy;
- else if (elemText == TQString::fromLatin1("es-ve"))
+ else if (elemText == TQString::tqfromLatin1("es-ve"))
d->language = es_ve;
- else if (elemText == TQString::fromLatin1("sv"))
+ else if (elemText == TQString::tqfromLatin1("sv"))
d->language = sv;
- else if (elemText == TQString::fromLatin1("sv-fi"))
+ else if (elemText == TQString::tqfromLatin1("sv-fi"))
d->language = sv_fi;
- else if (elemText == TQString::fromLatin1("sv-se"))
+ else if (elemText == TQString::tqfromLatin1("sv-se"))
d->language = sv_se;
- else if (elemText == TQString::fromLatin1("tr"))
+ else if (elemText == TQString::tqfromLatin1("tr"))
d->language = tr;
- else if (elemText == TQString::fromLatin1("uk"))
+ else if (elemText == TQString::tqfromLatin1("uk"))
d->language = uk;
else
d->language = UndefinedLanguage;
}
- if (!(elemText = extractNode(channelNode, TQString::fromLatin1("pubDate"))).isNull()) {
+ if (!(elemText = extractNode(channelNode, TQString::tqfromLatin1("pubDate"))).isNull()) {
time_t _time = KRFCDate::parseDate(elemText);
/* \bug This isn't really the right way since it will set the date to
* Jan 1 1970, 1:00:00 if the passed date was invalid; this means that
@@ -338,7 +338,7 @@ Document::Document(const TQDomDocument &doc) : d(new Private)
d->pubDate.setTime_t(_time);
}
- if (!(elemText = extractNode(channelNode, TQString::fromLatin1("dc:date"))).isNull()) {
+ if (!(elemText = extractNode(channelNode, TQString::tqfromLatin1("dc:date"))).isNull()) {
time_t _time = KRFCDate::parseDateISO8601(elemText);
/* \bug This isn't really the right way since it will set the date to
* Jan 1 1970, 1:00:00 if the passed date was invalid; this means that
@@ -347,46 +347,46 @@ Document::Document(const TQDomDocument &doc) : d(new Private)
d->pubDate.setTime_t(_time);
}
- if (!(elemText = extractNode(channelNode, TQString::fromLatin1("lastBuildDate"))).isNull()) {
+ if (!(elemText = extractNode(channelNode, TQString::tqfromLatin1("lastBuildDate"))).isNull()) {
time_t _time = KRFCDate::parseDate(elemText);
d->lastBuildDate.setTime_t(_time);
}
- if (!(elemText = extractNode(channelNode, TQString::fromLatin1("rating"))).isNull())
+ if (!(elemText = extractNode(channelNode, TQString::tqfromLatin1("rating"))).isNull())
d->rating = elemText;
- if (!(elemText = extractNode(channelNode, TQString::fromLatin1("docs"))).isNull())
+ if (!(elemText = extractNode(channelNode, TQString::tqfromLatin1("docs"))).isNull())
d->docs = elemText;
- if (!(elemText = extractNode(channelNode, TQString::fromLatin1("managingEditor"))).isNull())
+ if (!(elemText = extractNode(channelNode, TQString::tqfromLatin1("managingEditor"))).isNull())
d->managingEditor = elemText;
- if (!(elemText = extractNode(channelNode, TQString::fromLatin1("webMaster"))).isNull())
+ if (!(elemText = extractNode(channelNode, TQString::tqfromLatin1("webMaster"))).isNull())
d->webMaster = elemText;
- n = channelNode.namedItem(TQString::fromLatin1("skipHours"));
+ n = channelNode.namedItem(TQString::tqfromLatin1("skipHours"));
if (!n.isNull())
for (TQDomElement e = n.firstChild().toElement(); !e.isNull(); e = e.nextSibling().toElement())
- if (e.tagName() == TQString::fromLatin1("hour"))
+ if (e.tagName() == TQString::tqfromLatin1("hour"))
d->skipHours.append(e.text().toUInt());
- n = channelNode.namedItem(TQString::fromLatin1("skipDays"));
+ n = channelNode.namedItem(TQString::tqfromLatin1("skipDays"));
if (!n.isNull()) {
Day day;
TQString elemText;
for (TQDomElement e = n.firstChild().toElement(); !e.isNull(); e = e.nextSibling().toElement())
- if (e.tagName() == TQString::fromLatin1("day")) {
+ if (e.tagName() == TQString::tqfromLatin1("day")) {
elemText = e.text().lower();
- if (elemText == TQString::fromLatin1("monday"))
+ if (elemText == TQString::tqfromLatin1("monday"))
day = Monday;
- else if (elemText == TQString::fromLatin1("tuesday"))
+ else if (elemText == TQString::tqfromLatin1("tuesday"))
day = Tuesday;
- else if (elemText == TQString::fromLatin1("wednesday"))
+ else if (elemText == TQString::tqfromLatin1("wednesday"))
day = Wednesday;
- else if (elemText == TQString::fromLatin1("thursday"))
+ else if (elemText == TQString::tqfromLatin1("thursday"))
day = Thursday;
- else if (elemText == TQString::fromLatin1("friday"))
+ else if (elemText == TQString::tqfromLatin1("friday"))
day = Friday;
- else if (elemText == TQString::fromLatin1("saturday"))
+ else if (elemText == TQString::tqfromLatin1("saturday"))
day = Saturday;
- else if (elemText == TQString::fromLatin1("sunday"))
+ else if (elemText == TQString::tqfromLatin1("sunday"))
day = Sunday;
else
day = UndefinedDay;
@@ -410,15 +410,15 @@ Version Document::version() const
TQString Document::verbVersion() const
{
switch (d->version) {
- case v0_90: return TQString::fromLatin1("0.90");
- case v0_91: return TQString::fromLatin1("0.91");
- case v0_92: return TQString::fromLatin1("0.92");
- case v0_93: return TQString::fromLatin1("0.93");
- case v0_94: return TQString::fromLatin1("0.94");
- case v1_0: return TQString::fromLatin1("1.0");
- case v2_0: return TQString::fromLatin1("2.0");
+ case v0_90: return TQString::tqfromLatin1("0.90");
+ case v0_91: return TQString::tqfromLatin1("0.91");
+ case v0_92: return TQString::tqfromLatin1("0.92");
+ case v0_93: return TQString::tqfromLatin1("0.93");
+ case v0_94: return TQString::tqfromLatin1("0.94");
+ case v1_0: return TQString::tqfromLatin1("1.0");
+ case v2_0: return TQString::tqfromLatin1("2.0");
}
- return TQString::null;
+ return TQString();
}
TQString Document::title() const
diff --git a/librss/document.h b/librss/document.h
index 70a90bc1..d7660d12 100644
--- a/librss/document.h
+++ b/librss/document.h
@@ -78,7 +78,7 @@ namespace RSS
/**
* RSS 0.90 and upwards
- * @return The title of the RSS document, or TQString::null if no
+ * @return The title of the RSS document, or TQString() if no
* title was available. This is often the name of the news source
* from which the RSS document was retrieved.
*/
@@ -86,7 +86,7 @@ namespace RSS
/**
* RSS 0.90 and upwards
- * @return The description of the RSS document, or TQString::null
+ * @return The description of the RSS document, or TQString()
* if no description was available. This is usually a short slogan
* or description of the news source from which the RSS document
* was retrieved.
@@ -153,7 +153,7 @@ namespace RSS
/**
* RSS 0.91 and upwards
* @return A copyright of the information contained in the RSS
- * document, or TQString::null if no copyright is available.
+ * document, or TQString() if no copyright is available.
*/
TQString copyright() const;
@@ -198,7 +198,7 @@ namespace RSS
* RSS 0.91 and upwards
* @return The email address of the webmaster for the site, the
* person to contact if there are technical problems with the
- * channel, or TQString::null if this information isn't available.
+ * channel, or TQString() if this information isn't available.
* @see managingEditor()
*/
TQString webMaster() const;
diff --git a/librss/global.h b/librss/global.h
index c7e4cdeb..95ca433f 100644
--- a/librss/global.h
+++ b/librss/global.h
@@ -40,7 +40,7 @@ namespace RSS
* Possible status values returned by the signal
* Loader::loadingComplete().
*/
- enum Status {
+ enum tqStatus {
Success, /**
* Nothing went wrong so far, but you still have to check
* what values are returned by the classes since it's not
diff --git a/librss/image.cpp b/librss/image.cpp
index 242c65aa..a1fe032c 100644
--- a/librss/image.cpp
+++ b/librss/image.cpp
@@ -47,17 +47,17 @@ Image::Image(const TQDomNode &node) : TQObject(), d(new Private)
{
TQString elemText;
- if (!(elemText = extractNode(node, TQString::fromLatin1("title"))).isNull())
+ if (!(elemText = extractNode(node, TQString::tqfromLatin1("title"))).isNull())
d->title = elemText;
- if (!(elemText = extractNode(node, TQString::fromLatin1("url"))).isNull())
+ if (!(elemText = extractNode(node, TQString::tqfromLatin1("url"))).isNull())
d->url = elemText;
- if (!(elemText = extractNode(node, TQString::fromLatin1("link"))).isNull())
+ if (!(elemText = extractNode(node, TQString::tqfromLatin1("link"))).isNull())
d->link = elemText;
- if (!(elemText = extractNode(node, TQString::fromLatin1("description"))).isNull())
+ if (!(elemText = extractNode(node, TQString::tqfromLatin1("description"))).isNull())
d->description = elemText;
- if (!(elemText = extractNode(node, TQString::fromLatin1("height"))).isNull())
+ if (!(elemText = extractNode(node, TQString::tqfromLatin1("height"))).isNull())
d->height = elemText.toUInt();
- if (!(elemText = extractNode(node, TQString::fromLatin1("width"))).isNull())
+ if (!(elemText = extractNode(node, TQString::tqfromLatin1("width"))).isNull())
d->width = elemText.toUInt();
}
diff --git a/librss/image.h b/librss/image.h
index d59a0e6a..1c7b9510 100644
--- a/librss/image.h
+++ b/librss/image.h
@@ -31,9 +31,10 @@ namespace RSS
* is via Document::image().
* @see Document::image()
*/
- class LIBRSS_EXPORT Image : public QObject
+ class LIBRSS_EXPORT Image : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Default constructor.
@@ -83,7 +84,7 @@ namespace RSS
/**
* RSS 0.90 and upwards
- * @return The 'caption' of this image, or TQString::null if no
+ * @return The 'caption' of this image, or TQString() if no
* caption is available.
*/
TQString title() const;
@@ -112,7 +113,7 @@ namespace RSS
/**
* RSS 0.91 and upwards
* @return A description of what this picture shows, or
- * TQString::null if no description is available. Useful for
+ * TQString() if no description is available. Useful for
* people who deactivated images but want or need to know what is
* shown.
*/
diff --git a/librss/loader.cpp b/librss/loader.cpp
index 5eecda1c..b16c3d1e 100644
--- a/librss/loader.cpp
+++ b/librss/loader.cpp
@@ -197,7 +197,7 @@ Loader *Loader::create()
Loader *Loader::create(TQObject *object, const char *slot)
{
Loader *loader = create();
- connect(loader, TQT_SIGNAL(loadingComplete(Loader *, Document, Status)),
+ connect(loader, TQT_SIGNAL(loadingComplete(Loader *, Document, tqStatus)),
object, slot);
return loader;
}
@@ -237,13 +237,13 @@ void Loader::slotRetrieverDone(const TQByteArray &data, bool success)
d->retriever = NULL;
Document rssDoc;
- Status status = Success;
+ tqStatus status = Success;
if (success) {
TQDomDocument doc;
/* Some servers insert whitespace before the <?xml...?> declaration.
- * QDom doesn't tolerate that (and it's right, that's invalid XML),
+ * TQDom doesn't tolerate that (and it's right, that's invalid XML),
* so we strip that.
*/
@@ -256,7 +256,7 @@ void Loader::slotRetrieverDone(const TQByteArray &data, bool success)
}
/* It seems that some Microsoft-developed code generates UTF-8 files
- * with the three leading unicode characters 0357, 0273, 0277. For
+ * with the three leading tqunicode characters 0357, 0273, 0277. For
* an example, check http://msdn.microsoft.com/rss.xml
*/
if (len > 3 && TQChar(*charData) == TQChar(0357)) {
diff --git a/librss/loader.h b/librss/loader.h
index 8c4fcb4d..8eca6643 100644
--- a/librss/loader.h
+++ b/librss/loader.h
@@ -32,9 +32,10 @@ namespace RSS
* a new retrieval algorithm which can then be plugged into the RSS loader.
* @see Loader, FileRetriever, OutputRetriever
*/
- class DataRetriever : public QObject
+ class DataRetriever : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Default constructor.
@@ -88,6 +89,7 @@ namespace RSS
class LIBRSS_EXPORT FileRetriever : public DataRetriever
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Default constructor.
@@ -148,6 +150,7 @@ namespace RSS
class OutputRetriever : public DataRetriever
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Default constructor.
@@ -194,8 +197,8 @@ namespace RSS
*
* \code
* Loader *loader = Loader::create();
- * connect(loader, TQT_SIGNAL(loadingComplete(Loader *, Document, Status)),
- * this, TQT_SLOT(slotLoadingComplete(Loader *, Document, Status)));
+ * connect(loader, TQT_SIGNAL(loadingComplete(Loader *, Document, tqStatus)),
+ * this, TQT_SLOT(slotLoadingComplete(Loader *, Document, tqStatus)));
* loader->loadFrom("http://www.blah.org/foobar.rdf", new FileRetriever);
* \endcode
*
@@ -219,7 +222,7 @@ namespace RSS
* 'slotLoadingComplete' method might look like this:
*
* \code
- * void MyClass::slotLoadingComplete(Loader *loader, Document doc, Status status)
+ * void MyClass::slotLoadingComplete(Loader *loader, Document doc, tqStatus status)
* {
* // Note that Loader::~Loader() is private, so you cannot delete Loader instances.
* // You don't need to do that anyway since Loader instances delete themselves.
@@ -237,9 +240,10 @@ namespace RSS
* loadingComplete signal goes out of scope. This is e.g. the case if you
* intend to call getPixmap() on Document::image()!
*/
- class LIBRSS_EXPORT Loader : public QObject
+ class LIBRSS_EXPORT Loader : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
friend class someClassWhichDoesNotExist;
public:
/**
@@ -300,9 +304,9 @@ namespace RSS
* the case if you intend to call getPixmap() on Document::image()!
* @param status A status byte telling whether there were any problems
* while retrieving or parsing the data.
- * @see Document, Status
+ * @see Document, tqStatus
*/
- void loadingComplete(Loader *loader, Document doc, Status status);
+ void loadingComplete(Loader *loader, Document doc, tqStatus status);
private slots:
void slotRetrieverDone(const TQByteArray &data, bool success);
diff --git a/librss/testlibrss.cpp b/librss/testlibrss.cpp
index 2cbbe913..d513b003 100644
--- a/librss/testlibrss.cpp
+++ b/librss/testlibrss.cpp
@@ -10,12 +10,12 @@ using namespace RSS;
void Tester::test()
{
Loader *loader = Loader::create();
- connect( loader, TQT_SIGNAL( loadingComplete( Loader *, Document, Status ) ),
- this, TQT_SLOT( slotLoadingComplete( Loader *, Document, Status ) ) );
+ connect( loader, TQT_SIGNAL( loadingComplete( Loader *, Document, tqStatus ) ),
+ this, TQT_SLOT( slotLoadingComplete( Loader *, Document, tqStatus ) ) );
loader->loadFrom( "http://sourceforge.net/export/rss2_projnews.php?group_id=29057&rss_fulltext=1", new FileRetriever );
}
-void Tester::slotLoadingComplete( Loader *loader, Document doc, Status status )
+void Tester::slotLoadingComplete( Loader *loader, Document doc, tqStatus status )
{
if ( status == Success )
kdDebug() << "Successfully retrieverd '" << doc.title() << "'" << endl;
diff --git a/librss/testlibrss.h b/librss/testlibrss.h
index fda0b0a7..9ec92ec7 100644
--- a/librss/testlibrss.h
+++ b/librss/testlibrss.h
@@ -9,16 +9,17 @@
using RSS::Loader;
using RSS::Document;
-using RSS::Status;
+using RSS::tqStatus;
-class Tester : public QObject
+class Tester : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
void test();
private slots:
- void slotLoadingComplete( Loader *loader, Document doc, Status status );
+ void slotLoadingComplete( Loader *loader, Document doc, tqStatus status );
};
#endif
diff --git a/librss/textinput.cpp b/librss/textinput.cpp
index f2af0940..265c93ed 100644
--- a/librss/textinput.cpp
+++ b/librss/textinput.cpp
@@ -38,13 +38,13 @@ TextInput::TextInput(const TQDomNode &node) : d(new Private)
{
TQString elemText;
- if (!(elemText = extractNode(node, TQString::fromLatin1("title"))).isNull())
+ if (!(elemText = extractNode(node, TQString::tqfromLatin1("title"))).isNull())
d->title = elemText;
- if (!(elemText = extractNode(node, TQString::fromLatin1("description"))).isNull())
+ if (!(elemText = extractNode(node, TQString::tqfromLatin1("description"))).isNull())
d->description = elemText;
- if (!(elemText = extractNode(node, TQString::fromLatin1("name"))))
+ if (!(elemText = extractNode(node, TQString::tqfromLatin1("name"))))
d->name = elemText;
- if (!(elemText = extractNode(node, TQString::fromLatin1("link"))).isNull())
+ if (!(elemText = extractNode(node, TQString::tqfromLatin1("link"))).isNull())
d->link = elemText;
}
diff --git a/librss/textinput.h b/librss/textinput.h
index 44ade004..ba2d331a 100644
--- a/librss/textinput.h
+++ b/librss/textinput.h
@@ -79,7 +79,7 @@ namespace RSS
/**
* RSS 0.90 and upwards
* @return The title (often a label to be used for the input field)
- * of the text input, or TQString::null if no title is available.
+ * of the text input, or TQString() if no title is available.
*/
TQString title() const;
@@ -87,7 +87,7 @@ namespace RSS
* RSS 0.90 and upwards
* @return The description (usually used as a tooltip which appears
* if the mouse hovers above the input field for a short time) of
- * the text input, or TQString::null if no description is
+ * the text input, or TQString() if no description is
* available.
*/
TQString description() const;
@@ -95,7 +95,7 @@ namespace RSS
/**
* RSS 0.90 and upwards
* @return The name of the text input (what's this for?) of the
- * text input, or TQString::null, if no name is available.
+ * text input, or TQString(), if no name is available.
*/
TQString name() const;
diff --git a/librss/tools_p.cpp b/librss/tools_p.cpp
index 1c043849..01a4f36d 100644
--- a/librss/tools_p.cpp
+++ b/librss/tools_p.cpp
@@ -12,15 +12,15 @@
#include <tqdom.h>
-TQString RSS::extractNode(const TQDomNode &parent, const TQString &elemName)
+TQString RSS::extractNode(const TQDomNode &tqparent, const TQString &elemName)
{
- TQDomNode node = parent.namedItem(elemName);
+ TQDomNode node = tqparent.namedItem(elemName);
if (node.isNull())
- return TQString::null;
+ return TQString();
TQString result = node.toElement().text().simplifyWhiteSpace();
if (result.isEmpty())
- return TQString::null;
+ return TQString();
return result;
}
diff --git a/librss/tools_p.h b/librss/tools_p.h
index da67251f..bfa418ce 100644
--- a/librss/tools_p.h
+++ b/librss/tools_p.h
@@ -24,7 +24,7 @@ namespace RSS
unsigned int count;
};
- TQString extractNode(const TQDomNode &parent, const TQString &elemName);
+ TQString extractNode(const TQDomNode &tqparent, const TQString &elemName);
}
#endif // LIBRSS_TOOLS_P_H