summaryrefslogtreecommitdiffstats
path: root/akregator/src/mk4storage/storagemk4impl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'akregator/src/mk4storage/storagemk4impl.cpp')
-rw-r--r--akregator/src/mk4storage/storagemk4impl.cpp92
1 files changed, 46 insertions, 46 deletions
diff --git a/akregator/src/mk4storage/storagemk4impl.cpp b/akregator/src/mk4storage/storagemk4impl.cpp
index 8a3af0e0..4fc9ecec 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