diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:48:06 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:48:06 +0000 |
commit | 47c8a359c5276062c4bc17f0e82410f29081b502 (patch) | |
tree | 2d54a5f60a5b74067632f9ef6df58c2bc38155e6 /librss | |
parent | 6f82532777a35e0e60bbd2b290b2e93e646f349b (diff) | |
download | tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.tar.gz tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'librss')
-rw-r--r-- | librss/article.cpp | 42 | ||||
-rw-r--r-- | librss/article.h | 24 | ||||
-rw-r--r-- | librss/document.cpp | 332 | ||||
-rw-r--r-- | librss/document.h | 30 | ||||
-rw-r--r-- | librss/global.h | 4 | ||||
-rw-r--r-- | librss/image.cpp | 48 | ||||
-rw-r--r-- | librss/image.h | 22 | ||||
-rw-r--r-- | librss/loader.cpp | 52 | ||||
-rw-r--r-- | librss/loader.h | 18 | ||||
-rw-r--r-- | librss/testlibrss.cpp | 4 | ||||
-rw-r--r-- | librss/testlibrss.h | 2 | ||||
-rw-r--r-- | librss/textinput.cpp | 26 | ||||
-rw-r--r-- | librss/textinput.h | 16 | ||||
-rw-r--r-- | librss/tools_p.cpp | 12 | ||||
-rw-r--r-- | librss/tools_p.h | 2 |
15 files changed, 317 insertions, 317 deletions
diff --git a/librss/article.cpp b/librss/article.cpp index e283b5c5..4161e0d5 100644 --- a/librss/article.cpp +++ b/librss/article.cpp @@ -15,18 +15,18 @@ #include <kurl.h> #include <kurllabel.h> -#include <qdatetime.h> -#include <qdom.h> +#include <tqdatetime.h> +#include <tqdom.h> using namespace RSS; struct Article::Private : public Shared { - QString title; + TQString title; KURL link; - QString description; - QDateTime pubDate; - QString guid; + TQString description; + TQDateTime pubDate; + TQString guid; bool guidIsPermaLink; }; @@ -39,17 +39,17 @@ Article::Article(const Article &other) : d(0) *this = other; } -Article::Article(const QDomNode &node) : d(new Private) +Article::Article(const TQDomNode &node) : d(new Private) { - QString elemText; + TQString elemText; - if (!(elemText = extractNode(node, QString::fromLatin1("title"))).isNull()) + if (!(elemText = extractNode(node, TQString::fromLatin1("title"))).isNull()) d->title = elemText; - if (!(elemText = extractNode(node, QString::fromLatin1("link"))).isNull()) + if (!(elemText = extractNode(node, TQString::fromLatin1("link"))).isNull()) d->link = elemText; - if (!(elemText = extractNode(node, QString::fromLatin1("description"))).isNull()) + if (!(elemText = extractNode(node, TQString::fromLatin1("description"))).isNull()) d->description = elemText; - if (!(elemText = extractNode(node, QString::fromLatin1("pubDate"))).isNull()) { + if (!(elemText = extractNode(node, TQString::fromLatin1("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 QDomNode &node) : d(new Private) */ d->pubDate.setTime_t(_time); } - if (!(elemText = extractNode(node, QString::fromLatin1("dc:date"))).isNull()) { + if (!(elemText = extractNode(node, TQString::fromLatin1("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 QDomNode &node) : d(new Private) d->pubDate.setTime_t(_time); } - QDomNode n = node.namedItem(QString::fromLatin1("guid")); + TQDomNode n = node.namedItem(TQString::fromLatin1("guid")); if (!n.isNull()) { d->guidIsPermaLink = true; - if (n.toElement().attribute(QString::fromLatin1("isPermaLink"), "true") == "false") d->guidIsPermaLink = false; + if (n.toElement().attribute(TQString::fromLatin1("isPermaLink"), "true") == "false") d->guidIsPermaLink = false; - if (!(elemText = extractNode(node, QString::fromLatin1("guid"))).isNull()) + if (!(elemText = extractNode(node, TQString::fromLatin1("guid"))).isNull()) d->guid = elemText; } } @@ -82,7 +82,7 @@ Article::~Article() delete d; } -QString Article::title() const +TQString Article::title() const { return d->title; } @@ -92,12 +92,12 @@ const KURL &Article::link() const return d->link; } -QString Article::description() const +TQString Article::description() const { return d->description; } -QString Article::guid() const +TQString Article::guid() const { return d->guid; } @@ -107,12 +107,12 @@ bool Article::guidIsPermaLink() const return d->guidIsPermaLink; } -const QDateTime &Article::pubDate() const +const TQDateTime &Article::pubDate() const { return d->pubDate; } -KURLLabel *Article::widget(QWidget *parent, const char *name) const +KURLLabel *Article::widget(TQWidget *parent, const char *name) const { KURLLabel *label = new KURLLabel(d->link.url(), d->title, parent, name); label->setUseTips(true); diff --git a/librss/article.h b/librss/article.h index 865a6bbc..d6c4a937 100644 --- a/librss/article.h +++ b/librss/article.h @@ -36,7 +36,7 @@ namespace RSS /** * A list of articles. */ - typedef QValueList<Article> List; + typedef TQValueList<Article> List; /** * Default constructor. @@ -51,10 +51,10 @@ namespace RSS /** * Constructs an Article from a piece of RSS markup. - * @param node A QDomNode which references the DOM leaf to be used + * @param node A TQDomNode which references the DOM leaf to be used * for constructing the Article. */ - Article(const QDomNode &node); + Article(const TQDomNode &node); /** * Assignment operator. @@ -86,10 +86,10 @@ namespace RSS /** * RSS 0.90 and upwards - * @return The headline of this article, or QString::null if + * @return The headline of this article, or TQString::null if * no headline was available. */ - QString title() const; + TQString title() const; /** * RSS 0.90 and upwards @@ -102,20 +102,20 @@ namespace RSS /** * RSS 0.91 and upwards - * @return A story synopsis, or QString::null if no description + * @return A story synopsis, or TQString::null if no description * was available. */ - QString description() const; + TQString description() const; /** * RSS 2.0 and upwards * @return An article GUID (globally unique identifier). */ - QString guid() const; + TQString guid() const; /** * RSS 2.0 and upwards - * @return If this article GUID is permalink. Has no meaning when guid() is QString::null. + * @return If this article GUID is permalink. Has no meaning when guid() is TQString::null. */ bool guidIsPermaLink() const; @@ -123,7 +123,7 @@ namespace RSS * RSS 2.0 and upwards * @return The date when the article was published. */ - const QDateTime &pubDate() const; + const TQDateTime &pubDate() const; /** * @param parent The parent widget for the KURLLabel. @@ -132,14 +132,14 @@ namespace RSS * This makes building a user-interface which contains the * information in this Article object more convenient. * The returned KURLLabel's caption will be the title(), clicking - * on it will emit the URL link(), and it has a QToolTip attached + * on it will emit the URL link(), and it has a TQToolTip attached * to it which displays the description() (in case it has one, * if there is no description, the URL which the label links to * will be used). * Note that you have to delete the KURLLabel object returned by * this method yourself. */ - KURLLabel *widget(QWidget *parent = 0, const char *name = 0) const; + KURLLabel *widget(TQWidget *parent = 0, const char *name = 0) const; private: struct Private; diff --git a/librss/document.cpp b/librss/document.cpp index 92f4093e..f551716a 100644 --- a/librss/document.cpp +++ b/librss/document.cpp @@ -18,9 +18,9 @@ #include <krfcdate.h> #include <kurl.h> -#include <qdatetime.h> -#include <qdom.h> -#include <qptrlist.h> +#include <tqdatetime.h> +#include <tqdom.h> +#include <tqptrlist.h> using namespace RSS; @@ -37,20 +37,20 @@ struct Document::Private : public Shared } Version version; - QString title; - QString description; + TQString title; + TQString description; KURL link; Image *image; TextInput *textInput; Article::List articles; Language language; - QString copyright; - QDateTime pubDate; - QDateTime lastBuildDate; - QString rating; + TQString copyright; + TQDateTime pubDate; + TQDateTime lastBuildDate; + TQString rating; KURL docs; - QString managingEditor; - QString webMaster; + TQString managingEditor; + TQString webMaster; HourList skipHours; DayList skipDays; }; @@ -64,13 +64,13 @@ Document::Document(const Document &other) : d(0) *this = other; } -Document::Document(const QDomDocument &doc) : d(new Private) +Document::Document(const TQDomDocument &doc) : d(new Private) { - QString elemText; - QDomNode rootNode = doc.documentElement(); + TQString elemText; + TQDomNode rootNode = doc.documentElement(); // Determine the version of the present RSS markup. - QString attr = rootNode.toElement().attribute(QString::fromLatin1("xmlns"), QString::null); + TQString attr = rootNode.toElement().attribute(TQString::fromLatin1("xmlns"), TQString::null); if (!attr.isNull()) { /* * Hardcoding these URLs is actually a bad idea, since the DTD doesn't @@ -80,256 +80,256 @@ Document::Document(const QDomDocument &doc) : d(new Private) * distinguish the RSS versions by analyzing the relationship between * the nodes. */ - if (attr == QString::fromLatin1("http://my.netscape.com/rdf/simple/0.9/")) + if (attr == TQString::fromLatin1("http://my.netscape.com/rdf/simple/0.9/")) d->version = v0_90; - else if (attr == QString::fromLatin1("http://purl.org/rss/1.0/")) { + else if (attr == TQString::fromLatin1("http://purl.org/rss/1.0/")) { d->version = v1_0; } } else { - attr = rootNode.toElement().attribute(QString::fromLatin1("version"), QString::null); + attr = rootNode.toElement().attribute(TQString::fromLatin1("version"), TQString::null); if (!attr.isNull()) { - if (attr == QString::fromLatin1("0.91")) + if (attr == TQString::fromLatin1("0.91")) d->version = v0_91; - else if (attr == QString::fromLatin1("0.92")) + else if (attr == TQString::fromLatin1("0.92")) d->version = v0_92; - else if (attr == QString::fromLatin1("0.93")) + else if (attr == TQString::fromLatin1("0.93")) d->version = v0_93; - else if (attr == QString::fromLatin1("0.94")) + else if (attr == TQString::fromLatin1("0.94")) d->version = v0_94; - else if (attr == QString::fromLatin1("2.0") || attr == QString::fromLatin1("2")) + else if (attr == TQString::fromLatin1("2.0") || attr == TQString::fromLatin1("2")) d->version = v2_0; } } - QDomNode channelNode = rootNode.namedItem(QString::fromLatin1("channel")); + TQDomNode channelNode = rootNode.namedItem(TQString::fromLatin1("channel")); - if (!(elemText = extractNode(channelNode, QString::fromLatin1("title"))).isNull()) + if (!(elemText = extractNode(channelNode, TQString::fromLatin1("title"))).isNull()) d->title = elemText; - if (!(elemText = extractNode(channelNode, QString::fromLatin1("description"))).isNull()) + if (!(elemText = extractNode(channelNode, TQString::fromLatin1("description"))).isNull()) d->description = elemText; - if (!(elemText = extractNode(channelNode, QString::fromLatin1("link"))).isNull()) + if (!(elemText = extractNode(channelNode, TQString::fromLatin1("link"))).isNull()) d->link = elemText; /* This is ugly but necessary since RSS 0.90 and 1.0 have a different parent * node for <image>, <textinput> and <item> than RSS 0.91-0.94 and RSS 2.0. */ - QDomNode parentNode; + TQDomNode parentNode; if (d->version == v0_90 || d->version == v1_0) parentNode = rootNode; else parentNode = channelNode; - QDomNode n = parentNode.namedItem(QString::fromLatin1("image")); + TQDomNode n = parentNode.namedItem(TQString::fromLatin1("image")); if (!n.isNull()) d->image = new Image(n); - n = parentNode.namedItem(QString::fromLatin1("textinput")); + n = parentNode.namedItem(TQString::fromLatin1("textinput")); if (!n.isNull()) d->textInput = new TextInput(n); // Our (hopefully faster) version of elementsByTagName() for (n = parentNode.firstChild(); !n.isNull(); n = n.nextSibling()) { - const QDomElement e = n.toElement(); - if (e.tagName() == QString::fromLatin1("item")) + const TQDomElement e = n.toElement(); + if (e.tagName() == TQString::fromLatin1("item")) d->articles.append(Article(e)); } - if (!(elemText = extractNode(channelNode, QString::fromLatin1("copyright"))).isNull()) + if (!(elemText = extractNode(channelNode, TQString::fromLatin1("copyright"))).isNull()) d->copyright = elemText; - if (!(elemText = extractNode(channelNode, QString::fromLatin1("language"))).isNull()) { - if (elemText == QString::fromLatin1("af")) + if (!(elemText = extractNode(channelNode, TQString::fromLatin1("language"))).isNull()) { + if (elemText == TQString::fromLatin1("af")) d->language = af; - else if (elemText == QString::fromLatin1("sq")) + else if (elemText == TQString::fromLatin1("sq")) d->language = sq; - else if (elemText == QString::fromLatin1("eu")) + else if (elemText == TQString::fromLatin1("eu")) d->language = eu; - else if (elemText == QString::fromLatin1("be")) + else if (elemText == TQString::fromLatin1("be")) d->language = be; - else if (elemText == QString::fromLatin1("bg")) + else if (elemText == TQString::fromLatin1("bg")) d->language = bg; - else if (elemText == QString::fromLatin1("ca")) + else if (elemText == TQString::fromLatin1("ca")) d->language = ca; - else if (elemText == QString::fromLatin1("zh-cn")) + else if (elemText == TQString::fromLatin1("zh-cn")) d->language = zh_cn; - else if (elemText == QString::fromLatin1("zh-tw")) + else if (elemText == TQString::fromLatin1("zh-tw")) d->language = zh_tw; - else if (elemText == QString::fromLatin1("hr")) + else if (elemText == TQString::fromLatin1("hr")) d->language = hr; - else if (elemText == QString::fromLatin1("cs")) + else if (elemText == TQString::fromLatin1("cs")) d->language = cs; - else if (elemText == QString::fromLatin1("da")) + else if (elemText == TQString::fromLatin1("da")) d->language = da; - else if (elemText == QString::fromLatin1("nl")) + else if (elemText == TQString::fromLatin1("nl")) d->language = nl; - else if (elemText == QString::fromLatin1("nl-be")) + else if (elemText == TQString::fromLatin1("nl-be")) d->language = nl_be; - else if (elemText == QString::fromLatin1("nl-nl")) + else if (elemText == TQString::fromLatin1("nl-nl")) d->language = nl_nl; - else if (elemText == QString::fromLatin1("en")) + else if (elemText == TQString::fromLatin1("en")) d->language = en; - else if (elemText == QString::fromLatin1("en-au")) + else if (elemText == TQString::fromLatin1("en-au")) d->language = en_au; - else if (elemText == QString::fromLatin1("en-bz")) + else if (elemText == TQString::fromLatin1("en-bz")) d->language = en_bz; - else if (elemText == QString::fromLatin1("en-ca")) + else if (elemText == TQString::fromLatin1("en-ca")) d->language = en_ca; - else if (elemText == QString::fromLatin1("en-ie")) + else if (elemText == TQString::fromLatin1("en-ie")) d->language = en_ie; - else if (elemText == QString::fromLatin1("en-jm")) + else if (elemText == TQString::fromLatin1("en-jm")) d->language = en_jm; - else if (elemText == QString::fromLatin1("en-nz")) + else if (elemText == TQString::fromLatin1("en-nz")) d->language = en_nz; - else if (elemText == QString::fromLatin1("en-ph")) + else if (elemText == TQString::fromLatin1("en-ph")) d->language = en_ph; - else if (elemText == QString::fromLatin1("en-za")) + else if (elemText == TQString::fromLatin1("en-za")) d->language = en_za; - else if (elemText == QString::fromLatin1("en-tt")) + else if (elemText == TQString::fromLatin1("en-tt")) d->language = en_tt; - else if (elemText == QString::fromLatin1("en-gb")) + else if (elemText == TQString::fromLatin1("en-gb")) d->language = en_gb; - else if (elemText == QString::fromLatin1("en-us")) + else if (elemText == TQString::fromLatin1("en-us")) d->language = en_us; - else if (elemText == QString::fromLatin1("en-zw")) + else if (elemText == TQString::fromLatin1("en-zw")) d->language = en_zw; - else if (elemText == QString::fromLatin1("fo")) + else if (elemText == TQString::fromLatin1("fo")) d->language = fo; - else if (elemText == QString::fromLatin1("fi")) + else if (elemText == TQString::fromLatin1("fi")) d->language = fi; - else if (elemText == QString::fromLatin1("fr")) + else if (elemText == TQString::fromLatin1("fr")) d->language = fr; - else if (elemText == QString::fromLatin1("fr-be")) + else if (elemText == TQString::fromLatin1("fr-be")) d->language = fr_be; - else if (elemText == QString::fromLatin1("fr-ca")) + else if (elemText == TQString::fromLatin1("fr-ca")) d->language = fr_ca; - else if (elemText == QString::fromLatin1("fr-fr")) + else if (elemText == TQString::fromLatin1("fr-fr")) d->language = fr_fr; - else if (elemText == QString::fromLatin1("fr-lu")) + else if (elemText == TQString::fromLatin1("fr-lu")) d->language = fr_lu; - else if (elemText == QString::fromLatin1("fr-mc")) + else if (elemText == TQString::fromLatin1("fr-mc")) d->language = fr_mc; - else if (elemText == QString::fromLatin1("fr-ch")) + else if (elemText == TQString::fromLatin1("fr-ch")) d->language = fr_ch; - else if (elemText == QString::fromLatin1("gl")) + else if (elemText == TQString::fromLatin1("gl")) d->language = gl; - else if (elemText == QString::fromLatin1("gd")) + else if (elemText == TQString::fromLatin1("gd")) d->language = gd; - else if (elemText == QString::fromLatin1("de")) + else if (elemText == TQString::fromLatin1("de")) d->language = de; - else if (elemText == QString::fromLatin1("de-at")) + else if (elemText == TQString::fromLatin1("de-at")) d->language = de_at; - else if (elemText == QString::fromLatin1("de-de")) + else if (elemText == TQString::fromLatin1("de-de")) d->language = de_de; - else if (elemText == QString::fromLatin1("de-li")) + else if (elemText == TQString::fromLatin1("de-li")) d->language = de_li; - else if (elemText == QString::fromLatin1("de-lu")) + else if (elemText == TQString::fromLatin1("de-lu")) d->language = de_lu; - else if (elemText == QString::fromLatin1("de-ch")) + else if (elemText == TQString::fromLatin1("de-ch")) d->language = de_ch; - else if (elemText == QString::fromLatin1("el")) + else if (elemText == TQString::fromLatin1("el")) d->language = el; - else if (elemText == QString::fromLatin1("hu")) + else if (elemText == TQString::fromLatin1("hu")) d->language = hu; - else if (elemText == QString::fromLatin1("is")) + else if (elemText == TQString::fromLatin1("is")) d->language = is; - else if (elemText == QString::fromLatin1("id")) + else if (elemText == TQString::fromLatin1("id")) d->language = id; - else if (elemText == QString::fromLatin1("ga")) + else if (elemText == TQString::fromLatin1("ga")) d->language = ga; - else if (elemText == QString::fromLatin1("it")) + else if (elemText == TQString::fromLatin1("it")) d->language = it; - else if (elemText == QString::fromLatin1("it-it")) + else if (elemText == TQString::fromLatin1("it-it")) d->language = it_it; - else if (elemText == QString::fromLatin1("it-ch")) + else if (elemText == TQString::fromLatin1("it-ch")) d->language = it_ch; - else if (elemText == QString::fromLatin1("ja")) + else if (elemText == TQString::fromLatin1("ja")) d->language = ja; - else if (elemText == QString::fromLatin1("ko")) + else if (elemText == TQString::fromLatin1("ko")) d->language = ko; - else if (elemText == QString::fromLatin1("mk")) + else if (elemText == TQString::fromLatin1("mk")) d->language = mk; - else if (elemText == QString::fromLatin1("no")) + else if (elemText == TQString::fromLatin1("no")) d->language = no; - else if (elemText == QString::fromLatin1("pl")) + else if (elemText == TQString::fromLatin1("pl")) d->language = pl; - else if (elemText == QString::fromLatin1("pt")) + else if (elemText == TQString::fromLatin1("pt")) d->language = pt; - else if (elemText == QString::fromLatin1("pt-br")) + else if (elemText == TQString::fromLatin1("pt-br")) d->language = pt_br; - else if (elemText == QString::fromLatin1("pt-pt")) + else if (elemText == TQString::fromLatin1("pt-pt")) d->language = pt_pt; - else if (elemText == QString::fromLatin1("ro")) + else if (elemText == TQString::fromLatin1("ro")) d->language = ro; - else if (elemText == QString::fromLatin1("ro-mo")) + else if (elemText == TQString::fromLatin1("ro-mo")) d->language = ro_mo; - else if (elemText == QString::fromLatin1("ro-ro")) + else if (elemText == TQString::fromLatin1("ro-ro")) d->language = ro_ro; - else if (elemText == QString::fromLatin1("ru")) + else if (elemText == TQString::fromLatin1("ru")) d->language = ru; - else if (elemText == QString::fromLatin1("ru-mo")) + else if (elemText == TQString::fromLatin1("ru-mo")) d->language = ru_mo; - else if (elemText == QString::fromLatin1("ru-ru")) + else if (elemText == TQString::fromLatin1("ru-ru")) d->language = ru_ru; - else if (elemText == QString::fromLatin1("sr")) + else if (elemText == TQString::fromLatin1("sr")) d->language = sr; - else if (elemText == QString::fromLatin1("sk")) + else if (elemText == TQString::fromLatin1("sk")) d->language = sk; - else if (elemText == QString::fromLatin1("sl")) + else if (elemText == TQString::fromLatin1("sl")) d->language = sl; - else if (elemText == QString::fromLatin1("es")) + else if (elemText == TQString::fromLatin1("es")) d->language = es; - else if (elemText == QString::fromLatin1("es-ar")) + else if (elemText == TQString::fromLatin1("es-ar")) d->language = es_ar; - else if (elemText == QString::fromLatin1("es-bo")) + else if (elemText == TQString::fromLatin1("es-bo")) d->language = es_bo; - else if (elemText == QString::fromLatin1("es-cl")) + else if (elemText == TQString::fromLatin1("es-cl")) d->language = es_cl; - else if (elemText == QString::fromLatin1("es-co")) + else if (elemText == TQString::fromLatin1("es-co")) d->language = es_co; - else if (elemText == QString::fromLatin1("es-cr")) + else if (elemText == TQString::fromLatin1("es-cr")) d->language = es_cr; - else if (elemText == QString::fromLatin1("es-do")) + else if (elemText == TQString::fromLatin1("es-do")) d->language = es_do; - else if (elemText == QString::fromLatin1("es-ec")) + else if (elemText == TQString::fromLatin1("es-ec")) d->language = es_ec; - else if (elemText == QString::fromLatin1("es-sv")) + else if (elemText == TQString::fromLatin1("es-sv")) d->language = es_sv; - else if (elemText == QString::fromLatin1("es-gt")) + else if (elemText == TQString::fromLatin1("es-gt")) d->language = es_gt; - else if (elemText == QString::fromLatin1("es-hn")) + else if (elemText == TQString::fromLatin1("es-hn")) d->language = es_hn; - else if (elemText == QString::fromLatin1("es-mx")) + else if (elemText == TQString::fromLatin1("es-mx")) d->language = es_mx; - else if (elemText == QString::fromLatin1("es-ni")) + else if (elemText == TQString::fromLatin1("es-ni")) d->language = es_ni; - else if (elemText == QString::fromLatin1("es-pa")) + else if (elemText == TQString::fromLatin1("es-pa")) d->language = es_pa; - else if (elemText == QString::fromLatin1("es-py")) + else if (elemText == TQString::fromLatin1("es-py")) d->language = es_py; - else if (elemText == QString::fromLatin1("es-pe")) + else if (elemText == TQString::fromLatin1("es-pe")) d->language = es_pe; - else if (elemText == QString::fromLatin1("es-pr")) + else if (elemText == TQString::fromLatin1("es-pr")) d->language = es_pr; - else if (elemText == QString::fromLatin1("es-es")) + else if (elemText == TQString::fromLatin1("es-es")) d->language = es_es; - else if (elemText == QString::fromLatin1("es-uy")) + else if (elemText == TQString::fromLatin1("es-uy")) d->language = es_uy; - else if (elemText == QString::fromLatin1("es-ve")) + else if (elemText == TQString::fromLatin1("es-ve")) d->language = es_ve; - else if (elemText == QString::fromLatin1("sv")) + else if (elemText == TQString::fromLatin1("sv")) d->language = sv; - else if (elemText == QString::fromLatin1("sv-fi")) + else if (elemText == TQString::fromLatin1("sv-fi")) d->language = sv_fi; - else if (elemText == QString::fromLatin1("sv-se")) + else if (elemText == TQString::fromLatin1("sv-se")) d->language = sv_se; - else if (elemText == QString::fromLatin1("tr")) + else if (elemText == TQString::fromLatin1("tr")) d->language = tr; - else if (elemText == QString::fromLatin1("uk")) + else if (elemText == TQString::fromLatin1("uk")) d->language = uk; else d->language = UndefinedLanguage; } - if (!(elemText = extractNode(channelNode, QString::fromLatin1("pubDate"))).isNull()) { + if (!(elemText = extractNode(channelNode, TQString::fromLatin1("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 QDomDocument &doc) : d(new Private) d->pubDate.setTime_t(_time); } - if (!(elemText = extractNode(channelNode, QString::fromLatin1("dc:date"))).isNull()) { + if (!(elemText = extractNode(channelNode, TQString::fromLatin1("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 QDomDocument &doc) : d(new Private) d->pubDate.setTime_t(_time); } - if (!(elemText = extractNode(channelNode, QString::fromLatin1("lastBuildDate"))).isNull()) { + if (!(elemText = extractNode(channelNode, TQString::fromLatin1("lastBuildDate"))).isNull()) { time_t _time = KRFCDate::parseDate(elemText); d->lastBuildDate.setTime_t(_time); } - if (!(elemText = extractNode(channelNode, QString::fromLatin1("rating"))).isNull()) + if (!(elemText = extractNode(channelNode, TQString::fromLatin1("rating"))).isNull()) d->rating = elemText; - if (!(elemText = extractNode(channelNode, QString::fromLatin1("docs"))).isNull()) + if (!(elemText = extractNode(channelNode, TQString::fromLatin1("docs"))).isNull()) d->docs = elemText; - if (!(elemText = extractNode(channelNode, QString::fromLatin1("managingEditor"))).isNull()) + if (!(elemText = extractNode(channelNode, TQString::fromLatin1("managingEditor"))).isNull()) d->managingEditor = elemText; - if (!(elemText = extractNode(channelNode, QString::fromLatin1("webMaster"))).isNull()) + if (!(elemText = extractNode(channelNode, TQString::fromLatin1("webMaster"))).isNull()) d->webMaster = elemText; - n = channelNode.namedItem(QString::fromLatin1("skipHours")); + n = channelNode.namedItem(TQString::fromLatin1("skipHours")); if (!n.isNull()) - for (QDomElement e = n.firstChild().toElement(); !e.isNull(); e = e.nextSibling().toElement()) - if (e.tagName() == QString::fromLatin1("hour")) + for (TQDomElement e = n.firstChild().toElement(); !e.isNull(); e = e.nextSibling().toElement()) + if (e.tagName() == TQString::fromLatin1("hour")) d->skipHours.append(e.text().toUInt()); - n = channelNode.namedItem(QString::fromLatin1("skipDays")); + n = channelNode.namedItem(TQString::fromLatin1("skipDays")); if (!n.isNull()) { Day day; - QString elemText; - for (QDomElement e = n.firstChild().toElement(); !e.isNull(); e = e.nextSibling().toElement()) - if (e.tagName() == QString::fromLatin1("day")) { + TQString elemText; + for (TQDomElement e = n.firstChild().toElement(); !e.isNull(); e = e.nextSibling().toElement()) + if (e.tagName() == TQString::fromLatin1("day")) { elemText = e.text().lower(); - if (elemText == QString::fromLatin1("monday")) + if (elemText == TQString::fromLatin1("monday")) day = Monday; - else if (elemText == QString::fromLatin1("tuesday")) + else if (elemText == TQString::fromLatin1("tuesday")) day = Tuesday; - else if (elemText == QString::fromLatin1("wednesday")) + else if (elemText == TQString::fromLatin1("wednesday")) day = Wednesday; - else if (elemText == QString::fromLatin1("thursday")) + else if (elemText == TQString::fromLatin1("thursday")) day = Thursday; - else if (elemText == QString::fromLatin1("friday")) + else if (elemText == TQString::fromLatin1("friday")) day = Friday; - else if (elemText == QString::fromLatin1("saturday")) + else if (elemText == TQString::fromLatin1("saturday")) day = Saturday; - else if (elemText == QString::fromLatin1("sunday")) + else if (elemText == TQString::fromLatin1("sunday")) day = Sunday; else day = UndefinedDay; @@ -407,26 +407,26 @@ Version Document::version() const return d->version; } -QString Document::verbVersion() const +TQString Document::verbVersion() const { switch (d->version) { - case v0_90: return QString::fromLatin1("0.90"); - case v0_91: return QString::fromLatin1("0.91"); - case v0_92: return QString::fromLatin1("0.92"); - case v0_93: return QString::fromLatin1("0.93"); - case v0_94: return QString::fromLatin1("0.94"); - case v1_0: return QString::fromLatin1("1.0"); - case v2_0: return QString::fromLatin1("2.0"); + 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"); } - return QString::null; + return TQString::null; } -QString Document::title() const +TQString Document::title() const { return d->title; } -QString Document::description() const +TQString Document::description() const { return d->description; } @@ -466,22 +466,22 @@ Language Document::language() const return d->language; } -QString Document::copyright() const +TQString Document::copyright() const { return d->copyright; } -const QDateTime &Document::pubDate() const +const TQDateTime &Document::pubDate() const { return d->pubDate; } -const QDateTime &Document::lastBuildDate() const +const TQDateTime &Document::lastBuildDate() const { return d->lastBuildDate; } -QString Document::rating() const +TQString Document::rating() const { return d->rating; } @@ -491,12 +491,12 @@ const KURL &Document::docs() const return d->docs; } -QString Document::managingEditor() const +TQString Document::managingEditor() const { return d->managingEditor; } -QString Document::webMaster() const +TQString Document::webMaster() const { return d->webMaster; } diff --git a/librss/document.h b/librss/document.h index 90359871..fb02feb5 100644 --- a/librss/document.h +++ b/librss/document.h @@ -45,7 +45,7 @@ namespace RSS /** * Constructs a Document from a piece of XML markup. */ - Document(const QDomDocument &doc); + Document(const TQDomDocument &doc); /** * Assignment operator. @@ -70,28 +70,28 @@ namespace RSS /** * Convenience method. Differs from version() only in how the result * is returned. - * @return A QString representing the verbose version of the + * @return A TQString representing the verbose version of the * document. * @see version() */ - QString verbVersion() const; + TQString verbVersion() const; /** * RSS 0.90 and upwards - * @return The title of the RSS document, or QString::null if no + * @return The title of the RSS document, or TQString::null if no * title was available. This is often the name of the news source * from which the RSS document was retrieved. */ - QString title() const; + TQString title() const; /** * RSS 0.90 and upwards - * @return The description of the RSS document, or QString::null + * @return The description of the RSS document, or TQString::null * if no description was available. This is usually a short slogan * or description of the news source from which the RSS document * was retrieved. */ - QString description() const; + TQString description() const; /** * RSS 0.90 and upwards @@ -153,28 +153,28 @@ namespace RSS /** * RSS 0.91 and upwards * @return A copyright of the information contained in the RSS - * document, or QString::null if no copyright is available. + * document, or TQString::null if no copyright is available. */ - QString copyright() const; + TQString copyright() const; /** * RSS 0.91 and upwards * @return The date when the RSS document was published. */ - const QDateTime &pubDate() const; + const TQDateTime &pubDate() const; /** * RSS 0.91 and upwards. * @return The last time the channel was modified. */ - const QDateTime &lastBuildDate() const; + const TQDateTime &lastBuildDate() const; /** * RSS 0.91 and upwards * @return A <a href="http://www.w3.org/PICS/#Specs">PICS</a> * rating for this page. */ - QString rating() const; + TQString rating() const; /** * RSS 0.91 and upwards @@ -192,16 +192,16 @@ namespace RSS * bull@mancuso.com (Bull Mancuso). * @see webMaster() */ - QString managingEditor() const; + TQString managingEditor() const; /** * 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 QString::null if this information isn't available. + * channel, or TQString::null if this information isn't available. * @see managingEditor() */ - QString webMaster() const; + TQString webMaster() const; /** * RSS 0.91 and upwards diff --git a/librss/global.h b/librss/global.h index 26c34d7e..ca929af0 100644 --- a/librss/global.h +++ b/librss/global.h @@ -126,12 +126,12 @@ namespace RSS /** * This type is used by Document::skipDays(). */ - typedef QValueList<Day> DayList; + typedef TQValueList<Day> DayList; /** * This type is used by Document::skipHours(). */ - typedef QValueList<unsigned short> HourList; + typedef TQValueList<unsigned short> HourList; } #endif // LIBRSS_GLOBAL_H diff --git a/librss/image.cpp b/librss/image.cpp index 66e3e135..4ab66698 100644 --- a/librss/image.cpp +++ b/librss/image.cpp @@ -14,9 +14,9 @@ #include <kio/job.h> #include <kurl.h> -#include <qbuffer.h> -#include <qdom.h> -#include <qpixmap.h> +#include <tqbuffer.h> +#include <tqdom.h> +#include <tqpixmap.h> using namespace RSS; @@ -25,39 +25,39 @@ struct Image::Private : public Shared Private() : height(31), width(88), pixmapBuffer(NULL) { } - QString title; + TQString title; KURL url; KURL link; - QString description; + TQString description; unsigned int height; unsigned int width; - QBuffer *pixmapBuffer; + TQBuffer *pixmapBuffer; }; -Image::Image() : QObject(), d(new Private) +Image::Image() : TQObject(), d(new Private) { } -Image::Image(const Image &other) : QObject(), d(0) +Image::Image(const Image &other) : TQObject(), d(0) { *this = other; } -Image::Image(const QDomNode &node) : QObject(), d(new Private) +Image::Image(const TQDomNode &node) : TQObject(), d(new Private) { - QString elemText; + TQString elemText; - if (!(elemText = extractNode(node, QString::fromLatin1("title"))).isNull()) + if (!(elemText = extractNode(node, TQString::fromLatin1("title"))).isNull()) d->title = elemText; - if (!(elemText = extractNode(node, QString::fromLatin1("url"))).isNull()) + if (!(elemText = extractNode(node, TQString::fromLatin1("url"))).isNull()) d->url = elemText; - if (!(elemText = extractNode(node, QString::fromLatin1("link"))).isNull()) + if (!(elemText = extractNode(node, TQString::fromLatin1("link"))).isNull()) d->link = elemText; - if (!(elemText = extractNode(node, QString::fromLatin1("description"))).isNull()) + if (!(elemText = extractNode(node, TQString::fromLatin1("description"))).isNull()) d->description = elemText; - if (!(elemText = extractNode(node, QString::fromLatin1("height"))).isNull()) + if (!(elemText = extractNode(node, TQString::fromLatin1("height"))).isNull()) d->height = elemText.toUInt(); - if (!(elemText = extractNode(node, QString::fromLatin1("width"))).isNull()) + if (!(elemText = extractNode(node, TQString::fromLatin1("width"))).isNull()) d->width = elemText.toUInt(); } @@ -71,7 +71,7 @@ Image::~Image() } } -QString Image::title() const +TQString Image::title() const { return d->title; } @@ -86,7 +86,7 @@ const KURL &Image::link() const return d->link; } -QString Image::description() const +TQString Image::description() const { return d->description; } @@ -111,21 +111,21 @@ void Image::getPixmap() d->pixmapBuffer->open(IO_WriteOnly); KIO::Job *job = KIO::get(d->url, false, false); - connect(job, SIGNAL(data(KIO::Job *, const QByteArray &)), - this, SLOT(slotData(KIO::Job *, const QByteArray &))); - connect(job, SIGNAL(result(KIO::Job *)), this, SLOT(slotResult(KIO::Job *))); + connect(job, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)), + this, TQT_SLOT(slotData(KIO::Job *, const TQByteArray &))); + connect(job, TQT_SIGNAL(result(KIO::Job *)), this, TQT_SLOT(slotResult(KIO::Job *))); } -void Image::slotData(KIO::Job *, const QByteArray &data) +void Image::slotData(KIO::Job *, const TQByteArray &data) { d->pixmapBuffer->writeBlock(data.data(), data.size()); } void Image::slotResult(KIO::Job *job) { - QPixmap pixmap; + TQPixmap pixmap; if (!job->error()) - pixmap = QPixmap(d->pixmapBuffer->buffer()); + pixmap = TQPixmap(d->pixmapBuffer->buffer()); emit gotPixmap(pixmap); delete d->pixmapBuffer; diff --git a/librss/image.h b/librss/image.h index d93c3230..eeef8222 100644 --- a/librss/image.h +++ b/librss/image.h @@ -13,7 +13,7 @@ #include "global.h" -#include <qobject.h> +#include <tqobject.h> class QDomNode; @@ -48,10 +48,10 @@ namespace RSS /** * Constructs an Image from a piece of RSS markup. - * @param node A QDomNode which references the DOM leaf to be used + * @param node A TQDomNode which references the DOM leaf to be used * for constructing the Image. */ - Image(const QDomNode &node); + Image(const TQDomNode &node); /** * Assignment operator. @@ -83,10 +83,10 @@ namespace RSS /** * RSS 0.90 and upwards - * @return The 'caption' of this image, or QString::null if no + * @return The 'caption' of this image, or TQString::null if no * caption is available. */ - QString title() const; + TQString title() const; /** * RSS 0.90 and upwards @@ -112,11 +112,11 @@ namespace RSS /** * RSS 0.91 and upwards * @return A description of what this picture shows, or - * QString::null if no description is available. Useful for + * TQString::null if no description is available. Useful for * people who deactivated images but want or need to know what is * shown. */ - QString description() const; + TQString description() const; /** * RSS 0.91 and upwards @@ -125,7 +125,7 @@ namespace RSS * this value to be between 1 and 400. * '0' if this information isn't available. This is merely provided * for completeness, you should not rely on this value but rather - * check what height the QPixmap as returned by gotPixmap() + * check what height the TQPixmap as returned by gotPixmap() * reports. */ unsigned int height() const; @@ -136,7 +136,7 @@ namespace RSS * default value is 88 pixels. The RSS 0.91 Specification requires * this value to be between 1 and 144. * This is merely provided for completeness, you should not rely - * on this value but rather check what width the QPixmap as + * on this value but rather check what width the TQPixmap as * returned by gotPixmap() reports. */ unsigned int width() const; @@ -156,10 +156,10 @@ namespace RSS * @param pixmap The pixmap as constructed from the data referenced * by the URL returned by link(). */ - void gotPixmap(const QPixmap &pixmap); + void gotPixmap(const TQPixmap &pixmap); private slots: - void slotData(KIO::Job *job, const QByteArray &data); + void slotData(KIO::Job *job, const TQByteArray &data); void slotResult(KIO::Job *job); private: diff --git a/librss/loader.cpp b/librss/loader.cpp index c38400f4..696d4f86 100644 --- a/librss/loader.cpp +++ b/librss/loader.cpp @@ -15,9 +15,9 @@ #include <kprocess.h> #include <kurl.h> -#include <qdom.h> -#include <qbuffer.h> -#include <qregexp.h> +#include <tqdom.h> +#include <tqbuffer.h> +#include <tqregexp.h> using namespace RSS; @@ -42,7 +42,7 @@ struct FileRetriever::Private delete buffer; } - QBuffer *buffer; + TQBuffer *buffer; int lastError; }; @@ -65,11 +65,11 @@ void FileRetriever::retrieveData(const KURL &url) d->buffer->open(IO_WriteOnly); KIO::Job *job = KIO::get(url, false, false); - connect(job, SIGNAL(data(KIO::Job *, const QByteArray &)), - SLOT(slotData(KIO::Job *, const QByteArray &))); - connect(job, SIGNAL(result(KIO::Job *)), SLOT(slotResult(KIO::Job *))); - connect(job, SIGNAL(permanentRedirection(KIO::Job *, const KURL &, const KURL &)), - SLOT(slotPermanentRedirection(KIO::Job *, const KURL &, const KURL &))); + 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 *))); + connect(job, TQT_SIGNAL(permanentRedirection(KIO::Job *, const KURL &, const KURL &)), + TQT_SLOT(slotPermanentRedirection(KIO::Job *, const KURL &, const KURL &))); } int FileRetriever::errorCode() const @@ -77,14 +77,14 @@ int FileRetriever::errorCode() const return d->lastError; } -void FileRetriever::slotData(KIO::Job *, const QByteArray &data) +void FileRetriever::slotData(KIO::Job *, const TQByteArray &data) { d->buffer->writeBlock(data.data(), data.size()); } void FileRetriever::slotResult(KIO::Job *job) { - QByteArray data = d->buffer->buffer(); + TQByteArray data = d->buffer->buffer(); data.detach(); delete d->buffer; @@ -114,7 +114,7 @@ struct OutputRetriever::Private } KShellProcess *process; - QBuffer *buffer; + TQBuffer *buffer; int lastError; }; @@ -138,10 +138,10 @@ void OutputRetriever::retrieveData(const KURL &url) d->buffer->open(IO_WriteOnly); d->process = new KShellProcess(); - connect(d->process, SIGNAL(processExited(KProcess *)), - SLOT(slotExited(KProcess *))); - connect(d->process, SIGNAL(receivedStdout(KProcess *, char *, int)), - SLOT(slotOutput(KProcess *, char *, int))); + connect(d->process, TQT_SIGNAL(processExited(KProcess *)), + TQT_SLOT(slotExited(KProcess *))); + connect(d->process, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), + TQT_SLOT(slotOutput(KProcess *, char *, int))); *d->process << url.path(); d->process->start(KProcess::NotifyOnExit, KProcess::Stdout); } @@ -161,7 +161,7 @@ void OutputRetriever::slotExited(KProcess *p) if (!p->normalExit()) d->lastError = p->exitStatus(); - QByteArray data = d->buffer->buffer(); + TQByteArray data = d->buffer->buffer(); data.detach(); delete d->buffer; @@ -194,10 +194,10 @@ Loader *Loader::create() return new Loader; } -Loader *Loader::create(QObject *object, const char *slot) +Loader *Loader::create(TQObject *object, const char *slot) { Loader *loader = create(); - connect(loader, SIGNAL(loadingComplete(Loader *, Document, Status)), + connect(loader, TQT_SIGNAL(loadingComplete(Loader *, Document, Status)), object, slot); return loader; } @@ -218,8 +218,8 @@ void Loader::loadFrom(const KURL &url, DataRetriever *retriever) d->retriever = retriever; - connect(d->retriever, SIGNAL(dataRetrieved(const QByteArray &, bool)), - this, SLOT(slotRetrieverDone(const QByteArray &, bool))); + connect(d->retriever, TQT_SIGNAL(dataRetrieved(const TQByteArray &, bool)), + this, TQT_SLOT(slotRetrieverDone(const TQByteArray &, bool))); d->retriever->retrieveData(url); } @@ -229,7 +229,7 @@ int Loader::errorCode() const return d->lastError; } -void Loader::slotRetrieverDone(const QByteArray &data, bool success) +void Loader::slotRetrieverDone(const TQByteArray &data, bool success) { d->lastError = d->retriever->errorCode(); @@ -240,7 +240,7 @@ void Loader::slotRetrieverDone(const QByteArray &data, bool success) Status status = Success; if (success) { - QDomDocument doc; + TQDomDocument doc; /* Some servers insert whitespace before the <?xml...?> declaration. * QDom doesn't tolerate that (and it's right, that's invalid XML), @@ -250,7 +250,7 @@ void Loader::slotRetrieverDone(const QByteArray &data, bool success) const char *charData = data.data(); int len = data.count(); - while (len && QChar(*charData).isSpace()) { + while (len && TQChar(*charData).isSpace()) { --len; ++charData; } @@ -259,12 +259,12 @@ void Loader::slotRetrieverDone(const QByteArray &data, bool success) * with the three leading unicode characters 0357, 0273, 0277. For * an example, check http://msdn.microsoft.com/rss.xml */ - if (len > 3 && QChar(*charData) == QChar(0357)) { + if (len > 3 && TQChar(*charData) == TQChar(0357)) { len -= 3; charData += 3; } - QByteArray tmpData; + TQByteArray tmpData; tmpData.setRawData(charData, len); if (doc.setContent(tmpData)) diff --git a/librss/loader.h b/librss/loader.h index 5f0c1447..8c4fcb4d 100644 --- a/librss/loader.h +++ b/librss/loader.h @@ -15,7 +15,7 @@ class KURL; -#include <qobject.h> +#include <tqobject.h> namespace KIO { @@ -74,7 +74,7 @@ namespace RSS * wrong and that the data parameter might contain no or invalid * data. */ - void dataRetrieved(const QByteArray &data, bool success); + void dataRetrieved(const TQByteArray &data, bool success); private: DataRetriever(const DataRetriever &other); @@ -127,7 +127,7 @@ namespace RSS void permanentRedirection(const KURL &url); private slots: - void slotData(KIO::Job *job, const QByteArray &data); + void slotData(KIO::Job *job, const TQByteArray &data); void slotResult(KIO::Job *job); void slotPermanentRedirection(KIO::Job *job, const KURL &fromUrl, const KURL &toUrl); @@ -194,8 +194,8 @@ namespace RSS * * \code * Loader *loader = Loader::create(); - * connect(loader, SIGNAL(loadingComplete(Loader *, Document, Status)), - * this, SLOT(slotLoadingComplete(Loader *, Document, Status))); + * connect(loader, TQT_SIGNAL(loadingComplete(Loader *, Document, Status)), + * this, TQT_SLOT(slotLoadingComplete(Loader *, Document, Status))); * loader->loadFrom("http://www.blah.org/foobar.rdf", new FileRetriever); * \endcode * @@ -227,7 +227,7 @@ namespace RSS * if (status != RSS::Success) * return; * - * QString title = doc.title(); + * TQString title = doc.title(); * // do whatever you want with the information. * } * \endcode @@ -256,10 +256,10 @@ namespace RSS * Convenience method. Does the same as the above method except that * it also does the job of connecting the loadingComplete() signal * to the given slot for you. - * @param object A QObject which features the specified slot + * @param object A TQObject which features the specified slot * @param slot Which slot to connect to. */ - static Loader *create(QObject *object, const char *slot); + static Loader *create(TQObject *object, const char *slot); /** * Loads the RSS file referenced by the given URL using the @@ -305,7 +305,7 @@ namespace RSS void loadingComplete(Loader *loader, Document doc, Status status); private slots: - void slotRetrieverDone(const QByteArray &data, bool success); + void slotRetrieverDone(const TQByteArray &data, bool success); private: Loader(); diff --git a/librss/testlibrss.cpp b/librss/testlibrss.cpp index 6b6a83d3..2cbbe913 100644 --- a/librss/testlibrss.cpp +++ b/librss/testlibrss.cpp @@ -10,8 +10,8 @@ using namespace RSS; void Tester::test() { Loader *loader = Loader::create(); - connect( loader, SIGNAL( loadingComplete( Loader *, Document, Status ) ), - this, SLOT( slotLoadingComplete( Loader *, Document, Status ) ) ); + connect( loader, TQT_SIGNAL( loadingComplete( Loader *, Document, Status ) ), + this, TQT_SLOT( slotLoadingComplete( Loader *, Document, Status ) ) ); loader->loadFrom( "http://sourceforge.net/export/rss2_projnews.php?group_id=29057&rss_fulltext=1", new FileRetriever ); } diff --git a/librss/testlibrss.h b/librss/testlibrss.h index 2db10178..fda0b0a7 100644 --- a/librss/testlibrss.h +++ b/librss/testlibrss.h @@ -1,7 +1,7 @@ #ifndef TESTLIBRSS_H #define TESTLIBRSS_H -#include <qobject.h> +#include <tqobject.h> #include "loader.h" #include "document.h" diff --git a/librss/textinput.cpp b/librss/textinput.cpp index 71d5e01c..f2af0940 100644 --- a/librss/textinput.cpp +++ b/librss/textinput.cpp @@ -13,15 +13,15 @@ #include <kurl.h> -#include <qdom.h> +#include <tqdom.h> using namespace RSS; struct TextInput::Private : public Shared { - QString title; - QString description; - QString name; + TQString title; + TQString description; + TQString name; KURL link; }; @@ -34,17 +34,17 @@ TextInput::TextInput(const TextInput &other) : d(0) *this = other; } -TextInput::TextInput(const QDomNode &node) : d(new Private) +TextInput::TextInput(const TQDomNode &node) : d(new Private) { - QString elemText; + TQString elemText; - if (!(elemText = extractNode(node, QString::fromLatin1("title"))).isNull()) + if (!(elemText = extractNode(node, TQString::fromLatin1("title"))).isNull()) d->title = elemText; - if (!(elemText = extractNode(node, QString::fromLatin1("description"))).isNull()) + if (!(elemText = extractNode(node, TQString::fromLatin1("description"))).isNull()) d->description = elemText; - if (!(elemText = extractNode(node, QString::fromLatin1("name")))) + if (!(elemText = extractNode(node, TQString::fromLatin1("name")))) d->name = elemText; - if (!(elemText = extractNode(node, QString::fromLatin1("link"))).isNull()) + if (!(elemText = extractNode(node, TQString::fromLatin1("link"))).isNull()) d->link = elemText; } @@ -54,17 +54,17 @@ TextInput::~TextInput() delete d; } -QString TextInput::title() const +TQString TextInput::title() const { return d->title; } -QString TextInput::description() const +TQString TextInput::description() const { return d->description; } -QString TextInput::name() const +TQString TextInput::name() const { return d->name; } diff --git a/librss/textinput.h b/librss/textinput.h index 444e7280..ab7652ac 100644 --- a/librss/textinput.h +++ b/librss/textinput.h @@ -43,10 +43,10 @@ namespace RSS /** * Constructs a TextInput from a piece of RSS markup. - * @param node A QDomNode which references the DOM leaf to be used + * @param node A TQDomNode which references the DOM leaf to be used * for constructing the TextInput. */ - TextInput(const QDomNode &node); + TextInput(const TQDomNode &node); /** * Assignment operator. @@ -79,25 +79,25 @@ 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 QString::null if no title is available. + * of the text input, or TQString::null if no title is available. */ - QString title() const; + TQString title() const; /** * 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 QString::null if no description is + * the text input, or TQString::null if no description is * available. */ - QString description() const; + TQString description() const; /** * RSS 0.90 and upwards * @return The name of the text input (what's this for?) of the - * text input, or QString::null, if no name is available. + * text input, or TQString::null, if no name is available. */ - QString name() const; + TQString name() const; /** * RSS 0.90 and upwards diff --git a/librss/tools_p.cpp b/librss/tools_p.cpp index c88eecac..1c043849 100644 --- a/librss/tools_p.cpp +++ b/librss/tools_p.cpp @@ -10,17 +10,17 @@ */ #include "tools_p.h" -#include <qdom.h> +#include <tqdom.h> -QString RSS::extractNode(const QDomNode &parent, const QString &elemName) +TQString RSS::extractNode(const TQDomNode &parent, const TQString &elemName) { - QDomNode node = parent.namedItem(elemName); + TQDomNode node = parent.namedItem(elemName); if (node.isNull()) - return QString::null; + return TQString::null; - QString result = node.toElement().text().simplifyWhiteSpace(); + TQString result = node.toElement().text().simplifyWhiteSpace(); if (result.isEmpty()) - return QString::null; + return TQString::null; return result; } diff --git a/librss/tools_p.h b/librss/tools_p.h index adc508b8..0d9c9801 100644 --- a/librss/tools_p.h +++ b/librss/tools_p.h @@ -24,7 +24,7 @@ namespace RSS unsigned int count; }; - QString extractNode(const QDomNode &parent, const QString &elemName); + TQString extractNode(const TQDomNode &parent, const TQString &elemName); } #endif // LIBRSS_TOOLS_P_H |