diff options
Diffstat (limited to 'akregator/src/feedstoragedummyimpl.cpp')
-rw-r--r-- | akregator/src/feedstoragedummyimpl.cpp | 146 |
1 files changed, 73 insertions, 73 deletions
diff --git a/akregator/src/feedstoragedummyimpl.cpp b/akregator/src/feedstoragedummyimpl.cpp index f1e194949..6712d7482 100644 --- a/akregator/src/feedstoragedummyimpl.cpp +++ b/akregator/src/feedstoragedummyimpl.cpp @@ -27,10 +27,10 @@ #include <feed.h> -#include <qmap.h> -#include <qstring.h> -#include <qstringlist.h> -#include <qvaluelist.h> +#include <tqmap.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqvaluelist.h> //typedef unsigned int uint; namespace Akregator { @@ -44,37 +44,37 @@ class FeedStorageDummyImpl::FeedStorageDummyImplPrivate public: Entry() : guidIsHash(false), guidIsPermaLink(false), status(0), pubDate(0), hash(0) {} StorageDummyImpl* mainStorage; - QValueList<Category> categories; - QString title; - QString description; - QString link; - QString author; - QString commentsLink; + TQValueList<Category> categories; + TQString title; + TQString description; + TQString link; + TQString author; + TQString commentsLink; bool guidIsHash; bool guidIsPermaLink; int comments; int status; uint pubDate; uint hash; - QStringList tags; + TQStringList tags; bool hasEnclosure; - QString enclosureUrl; - QString enclosureType; + TQString enclosureUrl; + TQString enclosureType; int enclosureLength; }; - QMap<QString, Entry> entries; + TQMap<TQString, Entry> entries; // all tags occurring in the feed - QStringList tags; + TQStringList tags; // tag -> articles index - QMap<QString, QStringList > taggedArticles; + TQMap<TQString, TQStringList > taggedArticles; - QValueList<Category> categories; - QMap<Category, QStringList> categorizedArticles; + TQValueList<Category> categories; + TQMap<Category, TQStringList> categorizedArticles; Storage* mainStorage; - QString url; + TQString url; }; @@ -82,7 +82,7 @@ void FeedStorageDummyImpl::convertOldArchive() { } -FeedStorageDummyImpl::FeedStorageDummyImpl(const QString& url, StorageDummyImpl* main) : d(new FeedStorageDummyImplPrivate) +FeedStorageDummyImpl::FeedStorageDummyImpl(const TQString& url, StorageDummyImpl* main) : d(new FeedStorageDummyImplPrivate) { d->url = url; d->mainStorage = main; @@ -135,17 +135,17 @@ void FeedStorageDummyImpl::setLastFetch(int lastFetch) d->mainStorage->setLastFetchFor(d->url, lastFetch); } -QStringList FeedStorageDummyImpl::articles(const QString& tag) +TQStringList FeedStorageDummyImpl::articles(const TQString& tag) { - return tag.isNull() ? QStringList(d->entries.keys()) : d->taggedArticles[tag]; + return tag.isNull() ? TQStringList(d->entries.keys()) : d->taggedArticles[tag]; } -QStringList FeedStorageDummyImpl::articles(const Category& cat) +TQStringList FeedStorageDummyImpl::articles(const Category& cat) { return d->categorizedArticles[cat]; } -void FeedStorageDummyImpl::addEntry(const QString& guid) +void FeedStorageDummyImpl::addEntry(const TQString& guid) { if (!d->entries.contains(guid)) { @@ -154,12 +154,12 @@ void FeedStorageDummyImpl::addEntry(const QString& guid) } } -bool FeedStorageDummyImpl::contains(const QString& guid) +bool FeedStorageDummyImpl::contains(const TQString& guid) { return d->entries.contains(guid); } -void FeedStorageDummyImpl::deleteArticle(const QString& guid) +void FeedStorageDummyImpl::deleteArticle(const TQString& guid) { if (!d->entries.contains(guid)) return; @@ -169,34 +169,34 @@ void FeedStorageDummyImpl::deleteArticle(const QString& guid) d->entries.remove(guid); } -int FeedStorageDummyImpl::comments(const QString& guid) +int FeedStorageDummyImpl::comments(const TQString& guid) { return contains(guid) ? d->entries[guid].comments : 0; } -QString FeedStorageDummyImpl::commentsLink(const QString& guid) +TQString FeedStorageDummyImpl::commentsLink(const TQString& guid) { return contains(guid) ? d->entries[guid].commentsLink : ""; } -bool FeedStorageDummyImpl::guidIsHash(const QString& guid) +bool FeedStorageDummyImpl::guidIsHash(const TQString& guid) { return contains(guid) ? d->entries[guid].guidIsHash : false; } -bool FeedStorageDummyImpl::guidIsPermaLink(const QString& guid) +bool FeedStorageDummyImpl::guidIsPermaLink(const TQString& guid) { return contains(guid) ? d->entries[guid].guidIsPermaLink : false; } -uint FeedStorageDummyImpl::hash(const QString& guid) +uint FeedStorageDummyImpl::hash(const TQString& guid) { return contains(guid) ? d->entries[guid].hash : 0; } -void FeedStorageDummyImpl::setDeleted(const QString& guid) +void FeedStorageDummyImpl::setDeleted(const TQString& guid) { if (!contains(guid)) return; @@ -204,8 +204,8 @@ void FeedStorageDummyImpl::setDeleted(const QString& guid) FeedStorageDummyImplPrivate::Entry entry = d->entries[guid]; // remove article from tag->article index - QStringList::ConstIterator it = entry.tags.begin(); - QStringList::ConstIterator end = entry.tags.end(); + TQStringList::ConstIterator it = entry.tags.begin(); + TQStringList::ConstIterator end = entry.tags.end(); for ( ; it != end; ++it) { @@ -215,8 +215,8 @@ void FeedStorageDummyImpl::setDeleted(const QString& guid) } // remove article from tag->category index - QValueList<Category>::ConstIterator it2 = entry.categories.begin(); - QValueList<Category>::ConstIterator end2 = entry.categories.end(); + TQValueList<Category>::ConstIterator it2 = entry.categories.begin(); + TQValueList<Category>::ConstIterator end2 = entry.categories.end(); for ( ; it2 != end2; ++it2) { @@ -231,94 +231,94 @@ void FeedStorageDummyImpl::setDeleted(const QString& guid) entry.commentsLink = ""; } -QString FeedStorageDummyImpl::link(const QString& guid) +TQString FeedStorageDummyImpl::link(const TQString& guid) { return contains(guid) ? d->entries[guid].link : ""; } -uint FeedStorageDummyImpl::pubDate(const QString& guid) +uint FeedStorageDummyImpl::pubDate(const TQString& guid) { return contains(guid) ? d->entries[guid].pubDate : 0; } -int FeedStorageDummyImpl::status(const QString& guid) +int FeedStorageDummyImpl::status(const TQString& guid) { return contains(guid) ? d->entries[guid].status : 0; } -void FeedStorageDummyImpl::setStatus(const QString& guid, int status) +void FeedStorageDummyImpl::setStatus(const TQString& guid, int status) { if (contains(guid)) d->entries[guid].status = status; } -QString FeedStorageDummyImpl::title(const QString& guid) +TQString FeedStorageDummyImpl::title(const TQString& guid) { return contains(guid) ? d->entries[guid].title : ""; } -QString FeedStorageDummyImpl::description(const QString& guid) +TQString FeedStorageDummyImpl::description(const TQString& guid) { return contains(guid) ? d->entries[guid].description : ""; } -void FeedStorageDummyImpl::setPubDate(const QString& guid, uint pubdate) +void FeedStorageDummyImpl::setPubDate(const TQString& guid, uint pubdate) { if (contains(guid)) d->entries[guid].pubDate = pubdate; } -void FeedStorageDummyImpl::setGuidIsHash(const QString& guid, bool isHash) +void FeedStorageDummyImpl::setGuidIsHash(const TQString& guid, bool isHash) { if (contains(guid)) d->entries[guid].guidIsHash = isHash; } -void FeedStorageDummyImpl::setLink(const QString& guid, const QString& link) +void FeedStorageDummyImpl::setLink(const TQString& guid, const TQString& link) { if (contains(guid)) d->entries[guid].link = link; } -void FeedStorageDummyImpl::setHash(const QString& guid, uint hash) +void FeedStorageDummyImpl::setHash(const TQString& guid, uint hash) { if (contains(guid)) d->entries[guid].hash = hash; } -void FeedStorageDummyImpl::setTitle(const QString& guid, const QString& title) +void FeedStorageDummyImpl::setTitle(const TQString& guid, const TQString& title) { if (contains(guid)) d->entries[guid].title = title; } -void FeedStorageDummyImpl::setDescription(const QString& guid, const QString& description) +void FeedStorageDummyImpl::setDescription(const TQString& guid, const TQString& description) { if (contains(guid)) d->entries[guid].description = description; } -void FeedStorageDummyImpl::setCommentsLink(const QString& guid, const QString& commentsLink) +void FeedStorageDummyImpl::setCommentsLink(const TQString& guid, const TQString& commentsLink) { if (contains(guid)) d->entries[guid].commentsLink = commentsLink; } -void FeedStorageDummyImpl::setComments(const QString& guid, int comments) +void FeedStorageDummyImpl::setComments(const TQString& guid, int comments) { if (contains(guid)) d->entries[guid].comments = comments; } -void FeedStorageDummyImpl::setGuidIsPermaLink(const QString& guid, bool isPermaLink) +void FeedStorageDummyImpl::setGuidIsPermaLink(const TQString& guid, bool isPermaLink) { if (contains(guid)) d->entries[guid].guidIsPermaLink = isPermaLink; } -void FeedStorageDummyImpl::addTag(const QString& guid, const QString& tag) +void FeedStorageDummyImpl::addTag(const TQString& guid, const TQString& tag) { if (contains(guid)) { @@ -331,7 +331,7 @@ void FeedStorageDummyImpl::addTag(const QString& guid, const QString& tag) } -void FeedStorageDummyImpl::addCategory(const QString& guid, const Category& cat) +void FeedStorageDummyImpl::addCategory(const TQString& guid, const Category& cat) { if (!contains(guid)) return; @@ -343,27 +343,27 @@ void FeedStorageDummyImpl::addCategory(const QString& guid, const Category& cat) d->categorizedArticles[cat].append(guid); } -void FeedStorageDummyImpl::setAuthor(const QString& guid, const QString& author) +void FeedStorageDummyImpl::setAuthor(const TQString& guid, const TQString& author) { if (contains(guid)) d->entries[guid].author = author; } -QString FeedStorageDummyImpl::author(const QString& guid) +TQString FeedStorageDummyImpl::author(const TQString& guid) { - return contains(guid) ? d->entries[guid].author : QString(); + return contains(guid) ? d->entries[guid].author : TQString(); } -QValueList<Category> FeedStorageDummyImpl::categories(const QString& guid) +TQValueList<Category> FeedStorageDummyImpl::categories(const TQString& guid) { if (!guid.isNull()) - return contains(guid) ? d->entries[guid].categories : QValueList<Category>(); + return contains(guid) ? d->entries[guid].categories : TQValueList<Category>(); else return d->categories; } -void FeedStorageDummyImpl::removeTag(const QString& guid, const QString& tag) +void FeedStorageDummyImpl::removeTag(const TQString& guid, const TQString& tag) { if (contains(guid)) { @@ -374,10 +374,10 @@ void FeedStorageDummyImpl::removeTag(const QString& guid, const QString& tag) } } -QStringList FeedStorageDummyImpl::tags(const QString& guid) +TQStringList FeedStorageDummyImpl::tags(const TQString& guid) { if (!guid.isNull()) - return contains(guid) ? d->entries[guid].tags : QStringList(); + return contains(guid) ? d->entries[guid].tags : TQStringList(); else { return d->tags; @@ -386,15 +386,15 @@ QStringList FeedStorageDummyImpl::tags(const QString& guid) void FeedStorageDummyImpl::add(FeedStorage* source) { - QStringList articles = source->articles(); - for (QStringList::ConstIterator it = articles.begin(); it != articles.end(); ++it) + TQStringList articles = source->articles(); + for (TQStringList::ConstIterator it = articles.begin(); it != articles.end(); ++it) copyArticle(*it, source); setUnread(source->unread()); setLastFetch(source->lastFetch()); setTotalCount(source->totalCount()); } -void FeedStorageDummyImpl::copyArticle(const QString& guid, FeedStorage* source) +void FeedStorageDummyImpl::copyArticle(const TQString& guid, FeedStorage* source) { if (!contains(guid)) addEntry(guid); @@ -409,9 +409,9 @@ void FeedStorageDummyImpl::copyArticle(const QString& guid, FeedStorage* source) setPubDate(guid, source->pubDate(guid)); setStatus(guid, source->status(guid)); setTitle(guid, source->title(guid)); - QStringList tags = source->tags(guid); + TQStringList tags = source->tags(guid); - for (QStringList::ConstIterator it = tags.begin(); it != tags.end(); ++it) + for (TQStringList::ConstIterator it = tags.begin(); it != tags.end(); ++it) addTag(guid, *it); } @@ -422,7 +422,7 @@ void FeedStorageDummyImpl::clear() setTotalCount(0); } -void FeedStorageDummyImpl::setEnclosure(const QString& guid, const QString& url, const QString& type, int length) +void FeedStorageDummyImpl::setEnclosure(const TQString& guid, const TQString& url, const TQString& type, int length) { if (contains(guid)) { @@ -434,19 +434,19 @@ void FeedStorageDummyImpl::setEnclosure(const QString& guid, const QString& url, } } -void FeedStorageDummyImpl::removeEnclosure(const QString& guid) +void FeedStorageDummyImpl::removeEnclosure(const TQString& guid) { if (contains(guid)) { FeedStorageDummyImplPrivate::Entry entry = d->entries[guid]; entry.hasEnclosure = false; - entry.enclosureUrl = QString::null; - entry.enclosureType = QString::null; + entry.enclosureUrl = TQString::null; + entry.enclosureType = TQString::null; entry.enclosureLength = -1; } } -void FeedStorageDummyImpl::enclosure(const QString& guid, bool& hasEnclosure, QString& url, QString& type, int& length) +void FeedStorageDummyImpl::enclosure(const TQString& guid, bool& hasEnclosure, TQString& url, TQString& type, int& length) { if (contains(guid)) { @@ -459,8 +459,8 @@ void FeedStorageDummyImpl::enclosure(const QString& guid, bool& hasEnclosure, QS else { hasEnclosure = false; - url = QString::null; - type = QString::null; + url = TQString::null; + type = TQString::null; length = -1; } } |