diff --git a/interfaces/feedstorage.h b/interfaces/feedstorage.h --- a/interfaces/feedstorage.h +++ b/interfaces/feedstorage.h @@ -101,8 +101,6 @@ virtual void close() = 0; virtual void commit() = 0; virtual void rollback() = 0; - - virtual void convertOldArchive() = 0; }; } // namespace Backend } // namespace Akregator diff --git a/plugins/mk4storage/feedstoragemk4impl.h b/plugins/mk4storage/feedstoragemk4impl.h --- a/plugins/mk4storage/feedstoragemk4impl.h +++ b/plugins/mk4storage/feedstoragemk4impl.h @@ -88,8 +88,6 @@ void close() override; void commit() override; void rollback() override; - - void convertOldArchive() override; private: void markDirty(); /** finds article by guid, returns -1 if not in archive **/ diff --git a/plugins/mk4storage/feedstoragemk4impl.cpp b/plugins/mk4storage/feedstoragemk4impl.cpp --- a/plugins/mk4storage/feedstoragemk4impl.cpp +++ b/plugins/mk4storage/feedstoragemk4impl.cpp @@ -93,38 +93,10 @@ bool autoCommit; bool modified; - bool convert; - QString oldArchivePath; c4_StringProp pguid, ptitle, pdescription, pcontent, plink, pcommentsLink, ptag, pEnclosureType, pEnclosureUrl, pcatTerm, pcatScheme, pcatName, pauthorName, pauthorUri, pauthorEMail; c4_IntProp phash, pguidIsHash, pguidIsPermaLink, pcomments, pstatus, ppubDate, pHasEnclosure, pEnclosureLength; }; -void FeedStorageMK4Impl::convertOldArchive() -{ - if (!d->convert) { - return; - } - - d->convert = false; - QFile file(d->oldArchivePath); - - if (!file.open(QIODevice::ReadOnly)) { - return; - } - - Syndication::DocumentSource src(file.readAll(), QStringLiteral("http://foo")); - file.close(); - Syndication::FeedPtr feed = Syndication::parse(src); - - if (feed) { - //QList items = feed->items(); - //QList::ConstIterator it = items.constBegin(); - //QList::ConstIterator en = items.constEnd(); - markDirty(); - commit(); - } -} - FeedStorageMK4Impl::FeedStorageMK4Impl(const QString &url, StorageMK4Impl *main) { d = new FeedStorageMK4ImplPrivate; @@ -142,12 +114,6 @@ QString t = url2; QString t2 = url2; QString filePath = main->archivePath() + QLatin1Char('/') + t.replace(QLatin1Char('/'), QLatin1Char('_')).replace(QLatin1Char(':'), QLatin1Char('_')); - d->oldArchivePath = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QStringLiteral("/akregator/Archive/") + t2.replace(QLatin1Char('/'), QLatin1Char('_')).replace(QLatin1Char( - ':'), - QLatin1Char( - '_')) - + QLatin1String(".xml"); - d->convert = !QFile::exists(filePath + QLatin1String(".mk4")) && QFile::exists(d->oldArchivePath); d->storage = new c4_Storage(QString(filePath + QLatin1String(".mk4")).toLocal8Bit(), true); d->archiveView = d->storage->GetAs( diff --git a/plugins/mk4storage/storagemk4impl.cpp b/plugins/mk4storage/storagemk4impl.cpp --- a/plugins/mk4storage/storagemk4impl.cpp +++ b/plugins/mk4storage/storagemk4impl.cpp @@ -87,7 +87,6 @@ archiveView.Add(findrow); modified = true; } - fs->convertOldArchive(); } return feeds[url]; } diff --git a/src/dummystorage/feedstoragedummyimpl.h b/src/dummystorage/feedstoragedummyimpl.h --- a/src/dummystorage/feedstoragedummyimpl.h +++ b/src/dummystorage/feedstoragedummyimpl.h @@ -89,8 +89,6 @@ void close() override; void commit() override; void rollback() override; - - void convertOldArchive() override; private: /** finds article by guid, returns -1 if not in archive **/ int findArticle(const QString &guid) const; diff --git a/src/dummystorage/feedstoragedummyimpl.cpp b/src/dummystorage/feedstoragedummyimpl.cpp --- a/src/dummystorage/feedstoragedummyimpl.cpp +++ b/src/dummystorage/feedstoragedummyimpl.cpp @@ -77,10 +77,6 @@ QString url; }; -void FeedStorageDummyImpl::convertOldArchive() -{ -} - FeedStorageDummyImpl::FeedStorageDummyImpl(const QString &url, StorageDummyImpl *main) : d(new FeedStorageDummyImplPrivate) { d->url = url;