summaryrefslogtreecommitdiffstats
path: root/akregator/src/mk4storage
diff options
context:
space:
mode:
Diffstat (limited to 'akregator/src/mk4storage')
-rw-r--r--akregator/src/mk4storage/feedstoragemk4impl.cpp168
-rw-r--r--akregator/src/mk4storage/feedstoragemk4impl.h78
-rw-r--r--akregator/src/mk4storage/mk4confwidget.cpp8
-rw-r--r--akregator/src/mk4storage/storagefactorymk4impl.cpp14
-rw-r--r--akregator/src/mk4storage/storagefactorymk4impl.h6
-rw-r--r--akregator/src/mk4storage/storagemk4impl.cpp92
-rw-r--r--akregator/src/mk4storage/storagemk4impl.h34
7 files changed, 200 insertions, 200 deletions
diff --git a/akregator/src/mk4storage/feedstoragemk4impl.cpp b/akregator/src/mk4storage/feedstoragemk4impl.cpp
index 521f9f326..b03f0438b 100644
--- a/akregator/src/mk4storage/feedstoragemk4impl.cpp
+++ b/akregator/src/mk4storage/feedstoragemk4impl.cpp
@@ -31,8 +31,8 @@
#include "../librss/document.h"
#include <mk4.h>
-#include <qdom.h>
-#include <qfile.h>
+#include <tqdom.h>
+#include <tqfile.h>
#include <kdebug.h>
#include <kglobal.h>
@@ -72,7 +72,7 @@ class FeedStorageMK4Impl::FeedStorageMK4ImplPrivate
pcategories("categories")
{}
- QString url;
+ TQString url;
c4_Storage* storage;
StorageMK4Impl* mainStorage;
c4_View archiveView;
@@ -85,7 +85,7 @@ class FeedStorageMK4Impl::FeedStorageMK4ImplPrivate
bool modified;
bool taggingEnabled;
bool convert;
- QString oldArchivePath;
+ TQString oldArchivePath;
c4_StringProp pguid, ptitle, pdescription, plink, pcommentsLink, ptag, pEnclosureType, pEnclosureUrl, pcatTerm, pcatScheme, pcatName, pauthor;
c4_IntProp phash, pguidIsHash, pguidIsPermaLink, pcomments, pstatus, ppubDate, pHasEnclosure, pEnclosureLength;
c4_ViewProp ptags, ptaggedArticles, pcategorizedArticles, pcategories;
@@ -97,15 +97,15 @@ void FeedStorageMK4Impl::convertOldArchive()
return;
d->convert = false;
- QFile file(d->oldArchivePath);
+ TQFile file(d->oldArchivePath);
if ( !file.open(IO_ReadOnly) )
return;
- QTextStream stream(&file);
- stream.setEncoding(QTextStream::UnicodeUTF8);
- QString data=stream.read();
- QDomDocument xmldoc;
+ TQTextStream stream(&file);
+ stream.setEncoding(TQTextStream::UnicodeUTF8);
+ TQString data=stream.read();
+ TQDomDocument xmldoc;
if (!xmldoc.setContent(data))
return;
@@ -129,7 +129,7 @@ void FeedStorageMK4Impl::convertOldArchive()
commit();
}
-FeedStorageMK4Impl::FeedStorageMK4Impl(const QString& url, StorageMK4Impl* main)
+FeedStorageMK4Impl::FeedStorageMK4Impl(const TQString& url, StorageMK4Impl* main)
{
d = new FeedStorageMK4ImplPrivate;
d->autoCommit = main->autoCommit();
@@ -137,20 +137,20 @@ FeedStorageMK4Impl::FeedStorageMK4Impl(const QString& url, StorageMK4Impl* main)
d->mainStorage = main;
d->taggingEnabled = main->taggingEnabled();
- QString url2 = url;
+ TQString url2 = url;
if (url.length() > 255)
{
- url2 = url.left(200) + QString::number(Akregator::Utils::calcHash(url), 16);
+ url2 = url.left(200) + TQString::number(Akregator::Utils::calcHash(url), 16);
}
kdDebug() << url2 << endl;
- QString t = url2;
- QString t2 = url2;
- QString filePath = main->archivePath() +"/"+ t.replace("/", "_").replace(":", "_");
+ TQString t = url2;
+ TQString t2 = url2;
+ TQString filePath = main->archivePath() +"/"+ t.replace("/", "_").replace(":", "_");
d->oldArchivePath = KGlobal::dirs()->saveLocation("data", "akregator/Archive/") + t2.replace("/", "_").replace(":", "_") + ".xml";
- d->convert = !QFile::exists(filePath + ".mk4") && QFile::exists(d->oldArchivePath);
+ d->convert = !TQFile::exists(filePath + ".mk4") && TQFile::exists(d->oldArchivePath);
d->storage = new c4_Storage((filePath + ".mk4").local8Bit(), true);
d->archiveView = d->storage->GetAs("articles[guid:S,title:S,hash:I,guidIsHash:I,guidIsPermaLink:I,description:S,link:S,comments:I,commentsLink:S,status:I,pubDate:I,tags[tag:S],hasEnclosure:I,enclosureUrl:S,enclosureType:S,enclosureLength:I,categories[catTerm:S,catScheme:S,catName:S],author:S]");
@@ -245,14 +245,14 @@ void FeedStorageMK4Impl::setLastFetch(int lastFetch)
d->mainStorage->setLastFetchFor(d->url, lastFetch);
}
-QStringList FeedStorageMK4Impl::articles(const QString& tag)
+TQStringList FeedStorageMK4Impl::articles(const TQString& tag)
{
- QStringList list;
+ TQStringList list;
if (tag.isNull()) // return all articles
{
int size = d->archiveView.GetSize();
for (int i = 0; i < size; i++) // fill with guids
- list += QString(d->pguid(d->archiveView.GetAt(i)));
+ list += TQString(d->pguid(d->archiveView.GetAt(i)));
}
else if (d->taggingEnabled)
{
@@ -265,16 +265,16 @@ QStringList FeedStorageMK4Impl::articles(const QString& tag)
c4_View tagView = d->ptaggedArticles(tagrow);
int size = tagView.GetSize();
for (int i = 0; i < size; i++)
- list += QString(d->pguid(tagView.GetAt(i)));
+ list += TQString(d->pguid(tagView.GetAt(i)));
}
}
return list;
}
-QStringList FeedStorageMK4Impl::articles(const Category& cat)
+TQStringList FeedStorageMK4Impl::articles(const Category& cat)
{
- QStringList list;
+ TQStringList list;
/*
c4_Row catrow;
d->pcatTerm(catrow) = cat.term.utf8().data();
@@ -287,13 +287,13 @@ QStringList FeedStorageMK4Impl::articles(const Category& cat)
c4_View catView = d->pcategorizedArticles(catrow);
int size = catView.GetSize();
for (int i = 0; i < size; i++)
- list += QString(d->pguid(catView.GetAt(i)));
+ list += TQString(d->pguid(catView.GetAt(i)));
}
*/
return list;
}
-void FeedStorageMK4Impl::addEntry(const QString& guid)
+void FeedStorageMK4Impl::addEntry(const TQString& guid)
{
c4_Row row;
d->pguid(row) = guid.ascii();
@@ -305,26 +305,26 @@ void FeedStorageMK4Impl::addEntry(const QString& guid)
}
}
-bool FeedStorageMK4Impl::contains(const QString& guid)
+bool FeedStorageMK4Impl::contains(const TQString& guid)
{
return findArticle(guid) != -1;
}
-int FeedStorageMK4Impl::findArticle(const QString& guid)
+int FeedStorageMK4Impl::findArticle(const TQString& guid)
{
c4_Row findrow;
d->pguid(findrow) = guid.ascii();
return d->archiveView.Find(findrow);
}
-void FeedStorageMK4Impl::deleteArticle(const QString& guid)
+void FeedStorageMK4Impl::deleteArticle(const TQString& guid)
{
int findidx = findArticle(guid);
if (findidx != -1)
{
- QStringList list = tags(guid);
- for (QStringList::ConstIterator it = list.begin(); it != list.end(); ++it)
+ TQStringList list = tags(guid);
+ for (TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it)
removeTag(guid, *it);
setTotalCount(totalCount()-1);
d->archiveView.RemoveAt(findidx);
@@ -332,38 +332,38 @@ void FeedStorageMK4Impl::deleteArticle(const QString& guid)
}
}
-int FeedStorageMK4Impl::comments(const QString& guid)
+int FeedStorageMK4Impl::comments(const TQString& guid)
{
int findidx = findArticle(guid);
return findidx != -1 ? d->pcomments(d->archiveView.GetAt(findidx)) : 0;
}
-QString FeedStorageMK4Impl::commentsLink(const QString& guid)
+TQString FeedStorageMK4Impl::commentsLink(const TQString& guid)
{
int findidx = findArticle(guid);
- return findidx != -1 ? QString(d->pcommentsLink(d->archiveView.GetAt(findidx))) : "";
+ return findidx != -1 ? TQString(d->pcommentsLink(d->archiveView.GetAt(findidx))) : "";
}
-bool FeedStorageMK4Impl::guidIsHash(const QString& guid)
+bool FeedStorageMK4Impl::guidIsHash(const TQString& guid)
{
int findidx = findArticle(guid);
return findidx != -1 ? d->pguidIsHash(d->archiveView.GetAt(findidx)) : false;
}
-bool FeedStorageMK4Impl::guidIsPermaLink(const QString& guid)
+bool FeedStorageMK4Impl::guidIsPermaLink(const TQString& guid)
{
int findidx = findArticle(guid);
return findidx != -1 ? d->pguidIsPermaLink(d->archiveView.GetAt(findidx)) : false;
}
-uint FeedStorageMK4Impl::hash(const QString& guid)
+uint FeedStorageMK4Impl::hash(const TQString& guid)
{
int findidx = findArticle(guid);
return findidx != -1 ? d->phash(d->archiveView.GetAt(findidx)) : 0;
}
-void FeedStorageMK4Impl::setDeleted(const QString& guid)
+void FeedStorageMK4Impl::setDeleted(const TQString& guid)
{
int findidx = findArticle(guid);
if (findidx == -1)
@@ -371,8 +371,8 @@ void FeedStorageMK4Impl::setDeleted(const QString& guid)
c4_Row row;
row = d->archiveView.GetAt(findidx);
- QStringList list = tags(guid);
- for (QStringList::ConstIterator it = list.begin(); it != list.end(); ++it)
+ TQStringList list = tags(guid);
+ for (TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it)
removeTag(guid, *it);
d->pdescription(row) = "";
d->ptitle(row) = "";
@@ -383,25 +383,25 @@ void FeedStorageMK4Impl::setDeleted(const QString& guid)
markDirty();
}
-QString FeedStorageMK4Impl::link(const QString& guid)
+TQString FeedStorageMK4Impl::link(const TQString& guid)
{
int findidx = findArticle(guid);
- return findidx != -1 ? QString(d->plink(d->archiveView.GetAt(findidx))) : "";
+ return findidx != -1 ? TQString(d->plink(d->archiveView.GetAt(findidx))) : "";
}
-uint FeedStorageMK4Impl::pubDate(const QString& guid)
+uint FeedStorageMK4Impl::pubDate(const TQString& guid)
{
int findidx = findArticle(guid);
return findidx != -1 ? d->ppubDate(d->archiveView.GetAt(findidx)) : 0;
}
-int FeedStorageMK4Impl::status(const QString& guid)
+int FeedStorageMK4Impl::status(const TQString& guid)
{
int findidx = findArticle(guid);
return findidx != -1 ? d->pstatus(d->archiveView.GetAt(findidx)) : 0;
}
-void FeedStorageMK4Impl::setStatus(const QString& guid, int status)
+void FeedStorageMK4Impl::setStatus(const TQString& guid, int status)
{
int findidx = findArticle(guid);
if (findidx == -1)
@@ -413,20 +413,20 @@ void FeedStorageMK4Impl::setStatus(const QString& guid, int status)
markDirty();
}
-QString FeedStorageMK4Impl::title(const QString& guid)
+TQString FeedStorageMK4Impl::title(const TQString& guid)
{
int findidx = findArticle(guid);
- return findidx != -1 ? QString::fromUtf8(d->ptitle(d->archiveView.GetAt(findidx))) : "";
+ return findidx != -1 ? TQString::fromUtf8(d->ptitle(d->archiveView.GetAt(findidx))) : "";
}
-QString FeedStorageMK4Impl::description(const QString& guid)
+TQString FeedStorageMK4Impl::description(const TQString& guid)
{
int findidx = findArticle(guid);
- return findidx != -1 ? QString::fromUtf8(d->pdescription(d->archiveView.GetAt(findidx))) : "";
+ return findidx != -1 ? TQString::fromUtf8(d->pdescription(d->archiveView.GetAt(findidx))) : "";
}
-void FeedStorageMK4Impl::setPubDate(const QString& guid, uint pubdate)
+void FeedStorageMK4Impl::setPubDate(const TQString& guid, uint pubdate)
{
int findidx = findArticle(guid);
if (findidx == -1)
@@ -438,7 +438,7 @@ void FeedStorageMK4Impl::setPubDate(const QString& guid, uint pubdate)
markDirty();
}
-void FeedStorageMK4Impl::setGuidIsHash(const QString& guid, bool isHash)
+void FeedStorageMK4Impl::setGuidIsHash(const TQString& guid, bool isHash)
{
int findidx = findArticle(guid);
if (findidx == -1)
@@ -450,7 +450,7 @@ void FeedStorageMK4Impl::setGuidIsHash(const QString& guid, bool isHash)
markDirty();
}
-void FeedStorageMK4Impl::setLink(const QString& guid, const QString& link)
+void FeedStorageMK4Impl::setLink(const TQString& guid, const TQString& link)
{
int findidx = findArticle(guid);
if (findidx == -1)
@@ -462,7 +462,7 @@ void FeedStorageMK4Impl::setLink(const QString& guid, const QString& link)
markDirty();
}
-void FeedStorageMK4Impl::setHash(const QString& guid, uint hash)
+void FeedStorageMK4Impl::setHash(const TQString& guid, uint hash)
{
int findidx = findArticle(guid);
if (findidx == -1)
@@ -474,7 +474,7 @@ void FeedStorageMK4Impl::setHash(const QString& guid, uint hash)
markDirty();
}
-void FeedStorageMK4Impl::setTitle(const QString& guid, const QString& title)
+void FeedStorageMK4Impl::setTitle(const TQString& guid, const TQString& title)
{
int findidx = findArticle(guid);
if (findidx == -1)
@@ -486,7 +486,7 @@ void FeedStorageMK4Impl::setTitle(const QString& guid, const QString& title)
markDirty();
}
-void FeedStorageMK4Impl::setDescription(const QString& guid, const QString& description)
+void FeedStorageMK4Impl::setDescription(const TQString& guid, const TQString& description)
{
int findidx = findArticle(guid);
if (findidx == -1)
@@ -498,7 +498,7 @@ void FeedStorageMK4Impl::setDescription(const QString& guid, const QString& desc
markDirty();
}
-void FeedStorageMK4Impl::setAuthor(const QString& guid, const QString& author)
+void FeedStorageMK4Impl::setAuthor(const TQString& guid, const TQString& author)
{
int findidx = findArticle(guid);
if (findidx == -1)
@@ -510,14 +510,14 @@ void FeedStorageMK4Impl::setAuthor(const QString& guid, const QString& author)
markDirty();
}
-QString FeedStorageMK4Impl::author(const QString& guid)
+TQString FeedStorageMK4Impl::author(const TQString& guid)
{
int findidx = findArticle(guid);
- return findidx != -1 ? QString::fromUtf8(d->pauthor(d->archiveView.GetAt(findidx))) : "";
+ return findidx != -1 ? TQString::fromUtf8(d->pauthor(d->archiveView.GetAt(findidx))) : "";
}
-void FeedStorageMK4Impl::setCommentsLink(const QString& guid, const QString& commentsLink)
+void FeedStorageMK4Impl::setCommentsLink(const TQString& guid, const TQString& commentsLink)
{
int findidx = findArticle(guid);
if (findidx == -1)
@@ -529,7 +529,7 @@ void FeedStorageMK4Impl::setCommentsLink(const QString& guid, const QString& com
markDirty();
}
-void FeedStorageMK4Impl::setComments(const QString& guid, int comments)
+void FeedStorageMK4Impl::setComments(const TQString& guid, int comments)
{
int findidx = findArticle(guid);
if (findidx == -1)
@@ -542,7 +542,7 @@ void FeedStorageMK4Impl::setComments(const QString& guid, int comments)
}
-void FeedStorageMK4Impl::setGuidIsPermaLink(const QString& guid, bool isPermaLink)
+void FeedStorageMK4Impl::setGuidIsPermaLink(const TQString& guid, bool isPermaLink)
{
int findidx = findArticle(guid);
if (findidx == -1)
@@ -554,7 +554,7 @@ void FeedStorageMK4Impl::setGuidIsPermaLink(const QString& guid, bool isPermaLin
markDirty();
}
-void FeedStorageMK4Impl::addCategory(const QString& /*guid*/, const Category& /*cat*/)
+void FeedStorageMK4Impl::addCategory(const TQString& /*guid*/, const Category& /*cat*/)
{
return;
/*
@@ -610,10 +610,10 @@ void FeedStorageMK4Impl::addCategory(const QString& /*guid*/, const Category& /*
*/
}
-QValueList<Category> FeedStorageMK4Impl::categories(const QString& /*guid*/)
+TQValueList<Category> FeedStorageMK4Impl::categories(const TQString& /*guid*/)
{
- QValueList<Category> list;
+ TQValueList<Category> list;
return list;
/*
if (!guid.isNull()) // return categories for an article
@@ -631,9 +631,9 @@ QValueList<Category> FeedStorageMK4Impl::categories(const QString& /*guid*/)
{
Category cat;
- cat.term = QString::fromUtf8(d->pcatTerm(catView.GetAt(i)));
- cat.scheme = QString::fromUtf8(d->pcatScheme(catView.GetAt(i)));
- cat.name = QString::fromUtf8(d->pcatName(catView.GetAt(i)));
+ cat.term = TQString::fromUtf8(d->pcatTerm(catView.GetAt(i)));
+ cat.scheme = TQString::fromUtf8(d->pcatScheme(catView.GetAt(i)));
+ cat.name = TQString::fromUtf8(d->pcatName(catView.GetAt(i)));
list += cat;
}
@@ -646,9 +646,9 @@ QValueList<Category> FeedStorageMK4Impl::categories(const QString& /*guid*/)
c4_Row row = d->catView.GetAt(i);
Category cat;
- cat.term = QString(d->pcatTerm(row));
- cat.scheme = QString(d->pcatScheme(row));
- cat.name = QString(d->pcatName(row));
+ cat.term = TQString(d->pcatTerm(row));
+ cat.scheme = TQString(d->pcatScheme(row));
+ cat.name = TQString(d->pcatName(row));
list += cat;
}
@@ -657,7 +657,7 @@ QValueList<Category> FeedStorageMK4Impl::categories(const QString& /*guid*/)
return list;*/
}
-void FeedStorageMK4Impl::addTag(const QString& guid, const QString& tag)
+void FeedStorageMK4Impl::addTag(const TQString& guid, const TQString& tag)
{
if (!d->taggingEnabled)
return;
@@ -701,7 +701,7 @@ void FeedStorageMK4Impl::addTag(const QString& guid, const QString& tag)
}
}
-void FeedStorageMK4Impl::removeTag(const QString& guid, const QString& tag)
+void FeedStorageMK4Impl::removeTag(const TQString& guid, const TQString& tag)
{
if (!d->taggingEnabled)
return;
@@ -746,9 +746,9 @@ void FeedStorageMK4Impl::removeTag(const QString& guid, const QString& tag)
}
}
-QStringList FeedStorageMK4Impl::tags(const QString& guid)
+TQStringList FeedStorageMK4Impl::tags(const TQString& guid)
{
- QStringList list;
+ TQStringList list;
if (!d->taggingEnabled)
return list;
@@ -765,13 +765,13 @@ QStringList FeedStorageMK4Impl::tags(const QString& guid)
int size = tagView.GetSize();
for (int i = 0; i < size; ++i)
- list += QString::fromUtf8(d->ptag(tagView.GetAt(i)));
+ list += TQString::fromUtf8(d->ptag(tagView.GetAt(i)));
}
else // return all tags in the feed
{
int size = d->tagView.GetSize();
for (int i = 0; i < size; i++)
- list += QString(d->ptag(d->tagView.GetAt(i)));
+ list += TQString(d->ptag(d->tagView.GetAt(i)));
}
return list;
@@ -779,15 +779,15 @@ QStringList FeedStorageMK4Impl::tags(const QString& guid)
void FeedStorageMK4Impl::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 FeedStorageMK4Impl::copyArticle(const QString& guid, FeedStorage* source)
+void FeedStorageMK4Impl::copyArticle(const TQString& guid, FeedStorage* source)
{
if (!contains(guid))
addEntry(guid);
@@ -803,12 +803,12 @@ void FeedStorageMK4Impl::copyArticle(const QString& guid, FeedStorage* source)
setTitle(guid, source->title(guid));
setAuthor(guid, source->author(guid));
- QStringList tags = source->tags(guid);
- for (QStringList::ConstIterator it = tags.begin(); it != tags.end(); ++it)
+ TQStringList tags = source->tags(guid);
+ for (TQStringList::ConstIterator it = tags.begin(); it != tags.end(); ++it)
addTag(guid, *it);
}
-void FeedStorageMK4Impl::setEnclosure(const QString& guid, const QString& url, const QString& type, int length)
+void FeedStorageMK4Impl::setEnclosure(const TQString& guid, const TQString& url, const TQString& type, int length)
{
int findidx = findArticle(guid);
if (findidx == -1)
@@ -824,7 +824,7 @@ void FeedStorageMK4Impl::setEnclosure(const QString& guid, const QString& url, c
markDirty();
}
-void FeedStorageMK4Impl::removeEnclosure(const QString& guid)
+void FeedStorageMK4Impl::removeEnclosure(const TQString& guid)
{
int findidx = findArticle(guid);
if (findidx == -1)
@@ -840,14 +840,14 @@ void FeedStorageMK4Impl::removeEnclosure(const QString& guid)
markDirty();
}
-void FeedStorageMK4Impl::enclosure(const QString& guid, bool& hasEnclosure, QString& url, QString& type, int& length)
+void FeedStorageMK4Impl::enclosure(const TQString& guid, bool& hasEnclosure, TQString& url, TQString& type, int& length)
{
int findidx = findArticle(guid);
if (findidx == -1)
{
hasEnclosure = false;
- url = QString::null;
- type = QString::null;
+ url = TQString::null;
+ type = TQString::null;
length = -1;
return;
}
diff --git a/akregator/src/mk4storage/feedstoragemk4impl.h b/akregator/src/mk4storage/feedstoragemk4impl.h
index d27933d0f..b6fea2e86 100644
--- a/akregator/src/mk4storage/feedstoragemk4impl.h
+++ b/akregator/src/mk4storage/feedstoragemk4impl.h
@@ -32,12 +32,12 @@ class StorageMK4Impl;
class FeedStorageMK4Impl : public FeedStorage
{
public:
- FeedStorageMK4Impl(const QString& url, StorageMK4Impl* main);
+ FeedStorageMK4Impl(const TQString& url, StorageMK4Impl* main);
virtual ~FeedStorageMK4Impl();
virtual void add(FeedStorage* source);
- virtual void copyArticle(const QString& guid, FeedStorage* source);
+ virtual void copyArticle(const TQString& guid, FeedStorage* source);
virtual void clear();
virtual int unread();
@@ -46,47 +46,47 @@ class FeedStorageMK4Impl : public FeedStorage
virtual int lastFetch();
virtual void setLastFetch(int lastFetch);
- virtual QStringList articles(const QString& tag=QString::null);
+ virtual TQStringList articles(const TQString& tag=TQString::null);
- virtual QStringList articles(const Category& cat);
+ virtual TQStringList articles(const Category& cat);
- virtual bool contains(const QString& guid);
- virtual void addEntry(const QString& guid);
- virtual void deleteArticle(const QString& guid);
- virtual int comments(const QString& guid);
- virtual QString commentsLink(const QString& guid);
- virtual void setCommentsLink(const QString& guid, const QString& commentsLink);
- virtual void setComments(const QString& guid, int comments);
- virtual bool guidIsHash(const QString& guid);
- virtual void setGuidIsHash(const QString& guid, bool isHash);
- virtual bool guidIsPermaLink(const QString& guid);
- virtual void setGuidIsPermaLink(const QString& guid, bool isPermaLink);
- virtual uint hash(const QString& guid);
- virtual void setHash(const QString& guid, uint hash);
- virtual void setDeleted(const QString& guid);
- virtual QString link(const QString& guid);
- virtual void setLink(const QString& guid, const QString& link);
- virtual uint pubDate(const QString& guid);
- virtual void setPubDate(const QString& guid, uint pubdate);
- virtual int status(const QString& guid);
- virtual void setStatus(const QString& guid, int status);
- virtual QString title(const QString& guid);
- virtual void setTitle(const QString& guid, const QString& title);
- virtual QString description(const QString& guid);
- virtual void setDescription(const QString& guid, const QString& description);
- virtual void setEnclosure(const QString& guid, const QString& url, const QString& type, int length);
- virtual void removeEnclosure(const QString& guid);
- virtual void enclosure(const QString& guid, bool& hasEnclosure, QString& url, QString& type, int& length);
+ virtual bool contains(const TQString& guid);
+ virtual void addEntry(const TQString& guid);
+ virtual void deleteArticle(const TQString& guid);
+ virtual int comments(const TQString& guid);
+ virtual TQString commentsLink(const TQString& guid);
+ virtual void setCommentsLink(const TQString& guid, const TQString& commentsLink);
+ virtual void setComments(const TQString& guid, int comments);
+ virtual bool guidIsHash(const TQString& guid);
+ virtual void setGuidIsHash(const TQString& guid, bool isHash);
+ virtual bool guidIsPermaLink(const TQString& guid);
+ virtual void setGuidIsPermaLink(const TQString& guid, bool isPermaLink);
+ virtual uint hash(const TQString& guid);
+ virtual void setHash(const TQString& guid, uint hash);
+ virtual void setDeleted(const TQString& guid);
+ virtual TQString link(const TQString& guid);
+ virtual void setLink(const TQString& guid, const TQString& link);
+ virtual uint pubDate(const TQString& guid);
+ virtual void setPubDate(const TQString& guid, uint pubdate);
+ virtual int status(const TQString& guid);
+ virtual void setStatus(const TQString& guid, int status);
+ virtual TQString title(const TQString& guid);
+ virtual void setTitle(const TQString& guid, const TQString& title);
+ virtual TQString description(const TQString& guid);
+ virtual void setDescription(const TQString& guid, const TQString& description);
+ virtual void setEnclosure(const TQString& guid, const TQString& url, const TQString& type, int length);
+ virtual void removeEnclosure(const TQString& guid);
+ virtual void enclosure(const TQString& guid, bool& hasEnclosure, TQString& url, TQString& type, int& length);
- virtual void addTag(const QString& guid, const QString& tag);
- virtual void removeTag(const QString& guid, const QString& tag);
- virtual QStringList tags(const QString& guid=QString::null);
+ virtual void addTag(const TQString& guid, const TQString& tag);
+ virtual void removeTag(const TQString& guid, const TQString& tag);
+ virtual TQStringList tags(const TQString& guid=TQString::null);
- virtual void addCategory(const QString& guid, const Category& category);
- virtual QValueList<Category> categories(const QString& guid=QString::null);
+ virtual void addCategory(const TQString& guid, const Category& category);
+ virtual TQValueList<Category> categories(const TQString& guid=TQString::null);
- virtual void setAuthor(const QString& guid, const QString& author);
- virtual QString author(const QString& guid);
+ virtual void setAuthor(const TQString& guid, const TQString& author);
+ virtual TQString author(const TQString& guid);
virtual void close();
virtual void commit();
@@ -96,7 +96,7 @@ class FeedStorageMK4Impl : public FeedStorage
private:
void markDirty();
/** finds article by guid, returns -1 if not in archive **/
- int findArticle(const QString& guid);
+ int findArticle(const TQString& guid);
void setTotalCount(int total);
class FeedStorageMK4ImplPrivate;
FeedStorageMK4ImplPrivate* d;
diff --git a/akregator/src/mk4storage/mk4confwidget.cpp b/akregator/src/mk4storage/mk4confwidget.cpp
index fb95e1602..fce697201 100644
--- a/akregator/src/mk4storage/mk4confwidget.cpp
+++ b/akregator/src/mk4storage/mk4confwidget.cpp
@@ -26,8 +26,8 @@
#include "mk4confwidget.h"
#include "storagemk4impl.h"
-#include <qcheckbox.h>
-#include <qlabel.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
#include <klocale.h>
#include <kmessagebox.h>
#include <kurlrequester.h>
@@ -52,14 +52,14 @@ MK4ConfWidget::MK4ConfWidget() : MK4ConfWidgetBase()
label->setEnabled(true);
}
filereq->setURL(MK4Config::archivePath());
- connect(cbUseDefault, SIGNAL(toggled(bool)), this, SLOT(slotChkBoxUseDefault(bool)));
+ connect(cbUseDefault, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotChkBoxUseDefault(bool)));
}
void MK4ConfWidget::accept()
{
- QString path = cbUseDefault->isChecked() ? StorageMK4Impl::defaultArchivePath() : filereq->url();
+ TQString path = cbUseDefault->isChecked() ? StorageMK4Impl::defaultArchivePath() : filereq->url();
if (path != MK4Config::archivePath())
{
// TODO: if the user changed the archive location, inform him that
diff --git a/akregator/src/mk4storage/storagefactorymk4impl.cpp b/akregator/src/mk4storage/storagefactorymk4impl.cpp
index 9303bb965..09cacc9db 100644
--- a/akregator/src/mk4storage/storagefactorymk4impl.cpp
+++ b/akregator/src/mk4storage/storagefactorymk4impl.cpp
@@ -27,26 +27,26 @@
//#include "mk4config.h"
#include <klocale.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qwidget.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqwidget.h>
namespace Akregator {
namespace Backend {
-Storage* StorageFactoryMK4Impl::createStorage(const QStringList& params) const
+Storage* StorageFactoryMK4Impl::createStorage(const TQStringList& params) const
{
Storage* storage = new StorageMK4Impl;
storage->initialize(params);
return storage;
}
-QString StorageFactoryMK4Impl::key() const
+TQString StorageFactoryMK4Impl::key() const
{
return "metakit";
}
-QString StorageFactoryMK4Impl::name() const
+TQString StorageFactoryMK4Impl::name() const
{
return i18n("Metakit");
}
@@ -58,7 +58,7 @@ void StorageFactoryMK4Impl::configure()
// fill with Settings
- if (confWidget->exec() == QDialog::Accepted)
+ if (confWidget->exec() == TQDialog::Accepted)
{
// store and apply settings
}
diff --git a/akregator/src/mk4storage/storagefactorymk4impl.h b/akregator/src/mk4storage/storagefactorymk4impl.h
index b5e51db9d..2fa915934 100644
--- a/akregator/src/mk4storage/storagefactorymk4impl.h
+++ b/akregator/src/mk4storage/storagefactorymk4impl.h
@@ -38,10 +38,10 @@ class Storage;
class StorageFactoryMK4Impl : public StorageFactory
{
public:
- virtual QString key() const;
- virtual QString name() const;
+ virtual TQString key() const;
+ virtual TQString name() const;
virtual void configure();
- virtual Storage* createStorage(const QStringList& params) const;
+ virtual Storage* createStorage(const TQStringList& params) const;
virtual bool isConfigurable() const { return false; }
virtual bool allowsMultipleWriteAccess() const { return false; }
diff --git a/akregator/src/mk4storage/storagemk4impl.cpp b/akregator/src/mk4storage/storagemk4impl.cpp
index 8a3af0e02..4fc9ecec1 100644
--- a/akregator/src/mk4storage/storagemk4impl.cpp
+++ b/akregator/src/mk4storage/storagemk4impl.cpp
@@ -27,10 +27,10 @@
#include <mk4.h>
-#include <qmap.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qtimer.h>
+#include <tqmap.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqtimer.h>
#include <kdebug.h>
#include <kstandarddirs.h>
@@ -53,11 +53,11 @@ class StorageMK4Impl::StorageMK4ImplPrivate
c4_View archiveView;
bool autoCommit;
bool modified;
- QMap<QString, FeedStorage*> feeds;
- QStringList feedURLs;
+ TQMap<TQString, FeedStorage*> feeds;
+ TQStringList feedURLs;
c4_StringProp purl, pFeedList, pTagSet;
c4_IntProp punread, ptotalCount, plastFetch;
- QString archivePath;
+ TQString archivePath;
bool taggingEnabled;
@@ -70,7 +70,7 @@ bool StorageMK4Impl::taggingEnabled() const
return d->taggingEnabled;
}
-void StorageMK4Impl::setArchivePath(const QString& archivePath)
+void StorageMK4Impl::setArchivePath(const TQString& archivePath)
{
if (archivePath.isNull()) // if isNull, reset to default
d->archivePath = defaultArchivePath();
@@ -78,17 +78,17 @@ void StorageMK4Impl::setArchivePath(const QString& archivePath)
d->archivePath = archivePath;
}
-QString StorageMK4Impl::archivePath() const
+TQString StorageMK4Impl::archivePath() const
{
return d->archivePath;
}
StorageMK4Impl::StorageMK4Impl() : d(new StorageMK4ImplPrivate)
{
- setArchivePath(QString::null); // set path to default
+ setArchivePath(TQString::null); // set path to default
}
-QString StorageMK4Impl::defaultArchivePath()
+TQString StorageMK4Impl::defaultArchivePath()
{
return KGlobal::dirs()->saveLocation("data", "akregator")+"Archive";
}
@@ -99,16 +99,16 @@ StorageMK4Impl::~StorageMK4Impl()
delete d;
d = 0;
}
-void StorageMK4Impl::initialize(const QStringList& params)
+void StorageMK4Impl::initialize(const TQStringList& params)
{
d->taggingEnabled = false;
- QStringList::ConstIterator it = params.begin();
- QStringList::ConstIterator end = params.end();
+ TQStringList::ConstIterator it = params.begin();
+ TQStringList::ConstIterator end = params.end();
for ( ; it != end; ++it)
{
- QStringList tokens = QStringList::split("=", *it);
+ TQStringList tokens = TQStringList::split("=", *it);
if (tokens.count() == 2 && *(tokens.at(0)) == "taggingEnabled"
&& *(tokens.at(1)) == "true")
{
@@ -120,7 +120,7 @@ void StorageMK4Impl::initialize(const QStringList& params)
bool StorageMK4Impl::open(bool autoCommit)
{
- QString filePath = d->archivePath +"/archiveindex.mk4";
+ TQString filePath = d->archivePath +"/archiveindex.mk4";
d->storage = new c4_Storage(filePath.local8Bit(), true);
d->archiveView = d->storage->GetAs("archive[url:S,unread:I,totalCount:I,lastFetch:I]");
c4_View hash = d->storage->GetAs("archiveHash[_H:I,_R:I]");
@@ -140,8 +140,8 @@ bool StorageMK4Impl::autoCommit() const
bool StorageMK4Impl::close()
{
- QMap<QString, FeedStorage*>::Iterator it;
- QMap<QString, FeedStorage*>::Iterator end(d->feeds.end() ) ;
+ TQMap<TQString, FeedStorage*>::Iterator it;
+ TQMap<TQString, FeedStorage*>::Iterator end(d->feeds.end() ) ;
for (it = d->feeds.begin(); it != end; ++it)
{
it.data()->close();
@@ -162,8 +162,8 @@ bool StorageMK4Impl::close()
bool StorageMK4Impl::commit()
{
- QMap<QString, FeedStorage*>::Iterator it;
- QMap<QString, FeedStorage*>::Iterator end(d->feeds.end() ) ;
+ TQMap<TQString, FeedStorage*>::Iterator it;
+ TQMap<TQString, FeedStorage*>::Iterator end(d->feeds.end() ) ;
for ( it = d->feeds.begin(); it != end; ++it )
it.data()->commit();
@@ -178,8 +178,8 @@ bool StorageMK4Impl::commit()
bool StorageMK4Impl::rollback()
{
- QMap<QString, FeedStorage*>::Iterator it;
- QMap<QString, FeedStorage*>::Iterator end(d->feeds.end() ) ;
+ TQMap<TQString, FeedStorage*>::Iterator it;
+ TQMap<TQString, FeedStorage*>::Iterator end(d->feeds.end() ) ;
for ( it = d->feeds.begin(); it != end; ++it )
it.data()->rollback();
@@ -191,7 +191,7 @@ bool StorageMK4Impl::rollback()
return false;
}
-int StorageMK4Impl::unreadFor(const QString &url)
+int StorageMK4Impl::unreadFor(const TQString &url)
{
c4_Row findrow;
d->purl(findrow) = url.ascii();
@@ -200,7 +200,7 @@ int StorageMK4Impl::unreadFor(const QString &url)
return findidx != -1 ? d->punread(d->archiveView.GetAt(findidx)) : 0;
}
-void StorageMK4Impl::setUnreadFor(const QString &url, int unread)
+void StorageMK4Impl::setUnreadFor(const TQString &url, int unread)
{
c4_Row findrow;
d->purl(findrow) = url.ascii();
@@ -213,7 +213,7 @@ void StorageMK4Impl::setUnreadFor(const QString &url, int unread)
markDirty();
}
-int StorageMK4Impl::totalCountFor(const QString &url)
+int StorageMK4Impl::totalCountFor(const TQString &url)
{
c4_Row findrow;
d->purl(findrow) = url.ascii();
@@ -222,7 +222,7 @@ int StorageMK4Impl::totalCountFor(const QString &url)
return findidx != -1 ? d->ptotalCount(d->archiveView.GetAt(findidx)) : 0;
}
-void StorageMK4Impl::setTotalCountFor(const QString &url, int total)
+void StorageMK4Impl::setTotalCountFor(const TQString &url, int total)
{
c4_Row findrow;
d->purl(findrow) = url.ascii();
@@ -235,7 +235,7 @@ void StorageMK4Impl::setTotalCountFor(const QString &url, int total)
markDirty();
}
-int StorageMK4Impl::lastFetchFor(const QString& url)
+int StorageMK4Impl::lastFetchFor(const TQString& url)
{
c4_Row findrow;
d->purl(findrow) = url.ascii();
@@ -244,7 +244,7 @@ int StorageMK4Impl::lastFetchFor(const QString& url)
return (findidx != -1 ? d->plastFetch(d->archiveView.GetAt(findidx)) : 0);
}
-void StorageMK4Impl::setLastFetchFor(const QString& url, int lastFetch)
+void StorageMK4Impl::setLastFetchFor(const TQString& url, int lastFetch)
{
c4_Row findrow;
d->purl(findrow) = url.ascii();
@@ -263,7 +263,7 @@ void StorageMK4Impl::markDirty()
{
d->modified = true;
// commit changes after 3 seconds
- QTimer::singleShot(3000, this, SLOT(slotCommit()));
+ TQTimer::singleShot(3000, this, TQT_SLOT(slotCommit()));
}
}
@@ -274,7 +274,7 @@ void StorageMK4Impl::slotCommit()
d->modified = false;
}
-FeedStorage* StorageMK4Impl::archiveFor(const QString& url)
+FeedStorage* StorageMK4Impl::archiveFor(const TQString& url)
{
if (!d->feeds.contains(url))
{
@@ -296,13 +296,13 @@ FeedStorage* StorageMK4Impl::archiveFor(const QString& url)
return d->feeds[url];
}
-QStringList StorageMK4Impl::feeds() const
+TQStringList StorageMK4Impl::feeds() const
{
// TODO: cache list
- QStringList list;
+ TQStringList list;
int size = d->archiveView.GetSize();
for (int i = 0; i < size; i++)
- list += QString(d->purl(d->archiveView.GetAt(i)));
+ list += TQString(d->purl(d->archiveView.GetAt(i)));
// fill with urls
return list;
@@ -310,10 +310,10 @@ QStringList StorageMK4Impl::feeds() const
void StorageMK4Impl::add(Storage* source)
{
- QStringList feeds = source->feeds();
- QStringList::ConstIterator end(feeds.end() ) ;
+ TQStringList feeds = source->feeds();
+ TQStringList::ConstIterator end(feeds.end() ) ;
- for (QStringList::ConstIterator it = feeds.begin(); it != end; ++it)
+ for (TQStringList::ConstIterator it = feeds.begin(); it != end; ++it)
{
FeedStorage* fa = archiveFor(*it);
fa->add(source->archiveFor(*it));
@@ -323,13 +323,13 @@ void StorageMK4Impl::add(Storage* source)
void StorageMK4Impl::clear()
{
- QStringList feeds;
+ TQStringList feeds;
int size = d->archiveView.GetSize();
for (int i = 0; i < size; i++)
- feeds += QString(d->purl(d->archiveView.GetAt(i)));
- QStringList::ConstIterator end(feeds.end() ) ;
+ feeds += TQString(d->purl(d->archiveView.GetAt(i)));
+ TQStringList::ConstIterator end(feeds.end() ) ;
- for (QStringList::ConstIterator it = feeds.begin(); it != end; ++it)
+ for (TQStringList::ConstIterator it = feeds.begin(); it != end; ++it)
{
FeedStorage* fa = archiveFor(*it);
fa->clear();
@@ -340,7 +340,7 @@ void StorageMK4Impl::clear()
}
-void StorageMK4Impl::storeFeedList(const QString& opmlStr)
+void StorageMK4Impl::storeFeedList(const TQString& opmlStr)
{
if (d->feedListView.GetSize() == 0)
@@ -359,16 +359,16 @@ void StorageMK4Impl::storeFeedList(const QString& opmlStr)
markDirty();
}
-QString StorageMK4Impl::restoreFeedList() const
+TQString StorageMK4Impl::restoreFeedList() const
{
if (d->feedListView.GetSize() == 0)
return "";
c4_Row row = d->feedListView.GetAt(0);
- return QString::fromUtf8(d->pFeedList(row));
+ return TQString::fromUtf8(d->pFeedList(row));
}
-void StorageMK4Impl::storeTagSet(const QString& xmlStr)
+void StorageMK4Impl::storeTagSet(const TQString& xmlStr)
{
if (d->feedListView.GetSize() == 0)
@@ -387,13 +387,13 @@ void StorageMK4Impl::storeTagSet(const QString& xmlStr)
markDirty();
}
-QString StorageMK4Impl::restoreTagSet() const
+TQString StorageMK4Impl::restoreTagSet() const
{
if (d->feedListView.GetSize() == 0)
return "";
c4_Row row = d->feedListView.GetAt(0);
- return QString::fromUtf8(d->pTagSet(row));
+ return TQString::fromUtf8(d->pTagSet(row));
}
} // namespace Backend
diff --git a/akregator/src/mk4storage/storagemk4impl.h b/akregator/src/mk4storage/storagemk4impl.h
index 7b3a43783..bf50efc68 100644
--- a/akregator/src/mk4storage/storagemk4impl.h
+++ b/akregator/src/mk4storage/storagemk4impl.h
@@ -46,20 +46,20 @@ class StorageMK4Impl : public Storage
/** KGlobal::dirs()->saveLocation("data", "akregator")+"/Archive" */
- static QString defaultArchivePath();
+ static TQString defaultArchivePath();
/** sets the directory where the metakit files will be stored.
- @param archivePath the path to the archive, or QString::null to reset it to the default.
+ @param archivePath the path to the archive, or TQString::null to reset it to the default.
*/
- void setArchivePath(const QString& archivePath);
+ void setArchivePath(const TQString& archivePath);
/** returns the path to the metakit archives */
- QString archivePath() const;
+ TQString archivePath() const;
- virtual void initialize(const QStringList& params);
+ virtual void initialize(const TQStringList& params);
/**
* Open storage and prepare it for work.
* @return true on success.
@@ -87,22 +87,22 @@ class StorageMK4Impl : public Storage
/**
* @return Article archive for feed at given url.
*/
- virtual FeedStorage* archiveFor(const QString &url);
+ virtual FeedStorage* archiveFor(const TQString &url);
virtual bool autoCommit() const;
- virtual int unreadFor(const QString &url);
- virtual void setUnreadFor(const QString &url, int unread);
- virtual int totalCountFor(const QString &url);
- virtual void setTotalCountFor(const QString &url, int total);
- virtual int lastFetchFor(const QString& url);
- virtual void setLastFetchFor(const QString& url, int lastFetch);
+ virtual int unreadFor(const TQString &url);
+ virtual void setUnreadFor(const TQString &url, int unread);
+ virtual int totalCountFor(const TQString &url);
+ virtual void setTotalCountFor(const TQString &url, int total);
+ virtual int lastFetchFor(const TQString& url);
+ virtual void setLastFetchFor(const TQString& url, int lastFetch);
- virtual QStringList feeds() const;
+ virtual TQStringList feeds() const;
- virtual void storeFeedList(const QString& opmlStr);
- virtual QString restoreFeedList() const;
+ virtual void storeFeedList(const TQString& opmlStr);
+ virtual TQString restoreFeedList() const;
- virtual void storeTagSet(const QString& xmlStr);
- virtual QString restoreTagSet() const;
+ virtual void storeTagSet(const TQString& xmlStr);
+ virtual TQString restoreTagSet() const;
/** adds all feed storages from a source to this storage
existing articles are replaced