diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
commit | 7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch) | |
tree | 8474f9b444b2756228600050f07a7ff25de532b2 /akregator/src/article.cpp | |
parent | f587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff) | |
download | tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'akregator/src/article.cpp')
-rw-r--r-- | akregator/src/article.cpp | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/akregator/src/article.cpp b/akregator/src/article.cpp index eeab61dd5..75d3f7872 100644 --- a/akregator/src/article.cpp +++ b/akregator/src/article.cpp @@ -30,11 +30,11 @@ #include "shared.h" #include "utils.h" -#include <qdatetime.h> -#include <qdom.h> -#include <qregexp.h> -#include <qstringlist.h> -#include <qvaluelist.h> +#include <tqdatetime.h> +#include <tqdom.h> +#include <tqregexp.h> +#include <tqstringlist.h> +#include <tqvaluelist.h> #include <krfcdate.h> #include <kdebug.h> @@ -57,7 +57,7 @@ struct Article::Private : public Shared enum Status {Deleted=0x01, Trash=0x02, New=0x04, Read=0x08, Keep=0x10}; - QString guid; + TQString guid; Backend::FeedStorage* archive; Feed* feed; @@ -67,7 +67,7 @@ struct Article::Private : public Shared // to read their values, you should therefore use the accessor methods of the Article // hash(), pubDate(), statusBits() rather than accessing them directly. uint hash; - QDateTime pubDate; + TQDateTime pubDate; int status; }; @@ -79,7 +79,7 @@ Article::Article() : d(new Private) d->archive = 0; } -Article::Article(const QString& guid, Feed* feed) : d(new Private) +Article::Article(const TQString& guid, Feed* feed) : d(new Private) { // this constructor should be as cheap as possible, so avoid calls to // read information from the archive in here if possible @@ -115,7 +115,7 @@ void Article::initialize(RSS::Article article, Backend::FeedStorage* archive) { // article is not deleted, let's add it to the archive d->archive->setHash(d->guid, hash() ); - QString title = article.title().isEmpty() ? buildTitle(article.description()) : article.title(); + TQString title = article.title().isEmpty() ? buildTitle(article.description()) : article.title(); d->archive->setTitle(d->guid, title); d->archive->setDescription(d->guid, article.description()); d->archive->setLink(d->guid, article.link().url()); @@ -123,14 +123,14 @@ void Article::initialize(RSS::Article article, Backend::FeedStorage* archive) d->archive->setCommentsLink(d->guid, article.commentsLink().url()); d->archive->setGuidIsPermaLink(d->guid, article.guidIsPermaLink()); d->archive->setGuidIsHash(d->guid, article.meta("guidIsHash") == "true"); - d->pubDate = article.pubDate().isValid() ? article.pubDate() : QDateTime::currentDateTime(); + d->pubDate = article.pubDate().isValid() ? article.pubDate() : TQDateTime::currentDateTime(); d->archive->setPubDate(d->guid, d->pubDate.toTime_t()); d->archive->setAuthor(d->guid, article.author()); - QValueList<RSS::Category> cats = article.categories(); - QValueList<RSS::Category>::ConstIterator end = cats.end(); + TQValueList<RSS::Category> cats = article.categories(); + TQValueList<RSS::Category>::ConstIterator end = cats.end(); - for (QValueList<RSS::Category>::ConstIterator it = cats.begin(); it != end; ++it) + for (TQValueList<RSS::Category>::ConstIterator it = cats.begin(); it != end; ++it) { Backend::Category cat; @@ -150,7 +150,7 @@ void Article::initialize(RSS::Article article, Backend::FeedStorage* archive) d->archive->removeEnclosure(d->guid); } - QString status = article.meta("status"); + TQString status = article.meta("status"); if (!status.isEmpty()) { @@ -170,7 +170,7 @@ void Article::initialize(RSS::Article article, Backend::FeedStorage* archive) { // if yes, update d->pubDate.setTime_t(d->archive->pubDate(d->guid)); d->archive->setHash(d->guid, hash() ); - QString title = article.title().isEmpty() ? buildTitle(article.description()) : article.title(); + TQString title = article.title().isEmpty() ? buildTitle(article.description()) : article.title(); d->archive->setTitle(d->guid, title); d->archive->setDescription(d->guid, article.description()); d->archive->setLink(d->guid, article.link().url()); @@ -325,12 +325,12 @@ void Article::setStatus(int stat) } } -QString Article::title() const +TQString Article::title() const { return d->archive->title(d->guid); } -QString Article::author() const +TQString Article::author() const { return d->archive->author(d->guid); } @@ -340,12 +340,12 @@ KURL Article::link() const return d->archive->link(d->guid); } -QString Article::description() const +TQString Article::description() const { return d->archive->description(d->guid); } -QString Article::guid() const +TQString Article::guid() const { return d->guid; } @@ -392,7 +392,7 @@ bool Article::keep() const RSS::Enclosure Article::enclosure() const { bool hasEnc; - QString url, type; + TQString url, type; int length; d->archive->enclosure(d->guid, hasEnc, url, type, length); return hasEnc ? RSS::Enclosure(url, length, type) : RSS::Enclosure(); @@ -409,26 +409,26 @@ void Article::setKeep(bool keep) d->feed->setArticleChanged(*this); } -void Article::addTag(const QString& tag) +void Article::addTag(const TQString& tag) { d->archive->addTag(d->guid, tag); if (d->feed) d->feed->setArticleChanged(*this); } -void Article::removeTag(const QString& tag) +void Article::removeTag(const TQString& tag) { d->archive->removeTag(d->guid, tag); if (d->feed) d->feed->setArticleChanged(*this); } -bool Article::hasTag(const QString& tag) const +bool Article::hasTag(const TQString& tag) const { return d->archive->tags(d->guid).contains(tag); } -QStringList Article::tags() const +TQStringList Article::tags() const { return d->archive->tags(d->guid); } @@ -436,7 +436,7 @@ QStringList Article::tags() const Feed* Article::feed() const { return d->feed; } -const QDateTime& Article::pubDate() const +const TQDateTime& Article::pubDate() const { // delayed loading of publication date information from archive if ( d->pubDate.isNull() ) @@ -447,17 +447,17 @@ const QDateTime& Article::pubDate() const return d->pubDate; } -QString Article::buildTitle(const QString& description) +TQString Article::buildTitle(const TQString& description) { - QString s = description; + TQString s = description; if (description.stripWhiteSpace().isEmpty()) return ""; int i = s.find('>',500); /*avoid processing too much */ if (i != -1) s = s.left(i+1); - QRegExp rx("(<([^\\s>]*)(?:[^>]*)>)[^<]*", false); - QString tagName, toReplace, replaceWith; + TQRegExp rx("(<([^\\s>]*)(?:[^>]*)>)[^<]*", false); + TQString tagName, toReplace, replaceWith; while (rx.search(s) != -1 ) { tagName=rx.cap(2); |