Commit d1349d86 authored by Frank Osterfeld's avatar Frank Osterfeld
Browse files

merge branches/work/akregator/akonadi-port

------------------------------------------------------------------------
r980774 | divanov | 2009-06-12 15:57:59 +0200 (Fri, 12 Jun 2009) | 6 lines

Lets start porting to libkrss/Akonadi.
Non-compilable code should be disabled with KRSS_PORT_DISABLED.

Replace Akregator::FeedList, SubscriptionListModel and SubscriptionListView
with the respective libkrss classes.

------------------------------------------------------------------------
r980783 | divanov | 2009-06-12 16:09:36 +0200 (Fri, 12 Jun 2009) | 2 lines

Remove FeedListManagementInterface: not used anymore

------------------------------------------------------------------------
r980824 | osterfeld | 2009-06-12 17:20:44 +0200 (Fri, 12 Jun 2009) | 2 lines

require krss

------------------------------------------------------------------------
r981102 | osterfeld | 2009-06-12 21:37:11 +0200 (Fri, 12 Jun 2009) | 2 lines

First item listing from akonadi :)

------------------------------------------------------------------------
r981172 | osterfeld | 2009-06-12 23:09:36 +0200 (Fri, 12 Jun 2009) | 2 lines

display krss items in ArticleViewer

------------------------------------------------------------------------
r981292 | osterfeld | 2009-06-13 09:30:50 +0200 (Sat, 13 Jun 2009) | 2 lines

port colorize proxy model to krss, fixes status display in item list view

------------------------------------------------------------------------
r981293 | osterfeld | 2009-06-13 09:31:53 +0200 (Sat, 13 Jun 2009) | 2 lines

fix order, New overrides Unread

------------------------------------------------------------------------
r981307 | osterfeld | 2009-06-13 10:20:10 +0200 (Sat, 13 Jun 2009) | 2 lines

port to ItemModifyJob

------------------------------------------------------------------------
r981308 | divanov | 2009-06-13 10:27:50 +0200 (Sat, 13 Jun 2009) | 2 lines

Make the item listing listen to updates

------------------------------------------------------------------------
r981310 | osterfeld | 2009-06-13 10:43:41 +0200 (Sat, 13 Jun 2009) | 3 lines

some more porting from Article to Item
mainwidget.cpp compiles without Article declaration included

------------------------------------------------------------------------
r981317 | divanov | 2009-06-13 11:22:37 +0200 (Sat, 13 Jun 2009) | 2 lines

compile

------------------------------------------------------------------------
r981318 | divanov | 2009-06-13 11:24:03 +0200 (Sat, 13 Jun 2009) | 2 lines

FeedListView got its actions back

------------------------------------------------------------------------
r981331 | divanov | 2009-06-13 12:20:15 +0200 (Sat, 13 Jun 2009) | 2 lines

Port more feed-related actions to KRss::Feed

------------------------------------------------------------------------
r981357 | divanov | 2009-06-13 13:45:10 +0200 (Sat, 13 Jun 2009) | 2 lines

Clean up here a bit

------------------------------------------------------------------------
r981381 | osterfeld | 2009-06-13 15:12:40 +0200 (Sat, 13 Jun 2009) | 2 lines

port to KRss::Item

------------------------------------------------------------------------
r981389 | osterfeld | 2009-06-13 15:27:37 +0200 (Sat, 13 Jun 2009) | 2 lines

port to item

------------------------------------------------------------------------
r981391 | osterfeld | 2009-06-13 15:32:04 +0200 (Sat, 13 Jun 2009) | 2 lines

don't include the moribund

------------------------------------------------------------------------
r981393 | osterfeld | 2009-06-13 15:36:49 +0200 (Sat, 13 Jun 2009) | 2 lines

SVN_SILENT less akregator includes

------------------------------------------------------------------------
r981397 | divanov | 2009-06-13 15:45:12 +0200 (Sat, 13 Jun 2009) | 2 lines

Some tag-related actions

------------------------------------------------------------------------
r981401 | osterfeld | 2009-06-13 16:05:54 +0200 (Sat, 13 Jun 2009) | 2 lines

replace CreateFoldercommand by CreateTagCommand

------------------------------------------------------------------------
r981402 | osterfeld | 2009-06-13 16:08:14 +0200 (Sat, 13 Jun 2009) | 2 lines

rename files for createtagcommand

------------------------------------------------------------------------
r981493 | osterfeld | 2009-06-13 17:07:19 +0200 (Sat, 13 Jun 2009) | 2 lines

port CreateFeedCommand, i.e. the actual creation part, the editing part will go to a separate command.

------------------------------------------------------------------------
r981511 | osterfeld | 2009-06-13 17:13:27 +0200 (Sat, 13 Jun 2009) | 2 lines

do not leak the dialog

------------------------------------------------------------------------
r981512 | osterfeld | 2009-06-13 17:18:00 +0200 (Sat, 13 Jun 2009) | 2 lines

interval fetches and expiry is not Akregator's business anymore

------------------------------------------------------------------------
r981514 | osterfeld | 2009-06-13 17:20:18 +0200 (Sat, 13 Jun 2009) | 2 lines

remove expireitemscommand

------------------------------------------------------------------------
r981537 | osterfeld | 2009-06-13 17:35:23 +0200 (Sat, 13 Jun 2009) | 2 lines

exclude now unused file from compilation, remove storage handling in the part

------------------------------------------------------------------------
r981543 | osterfeld | 2009-06-13 17:45:55 +0200 (Sat, 13 Jun 2009) | 2 lines

remove references to articlejobs

------------------------------------------------------------------------
r981553 | divanov | 2009-06-13 18:18:02 +0200 (Sat, 13 Jun 2009) | 2 lines

Port to TagDeleteJob/FeedDeleteJob

------------------------------------------------------------------------
r981554 | osterfeld | 2009-06-13 18:18:22 +0200 (Sat, 13 Jun 2009) | 2 lines

port opml import to krss

------------------------------------------------------------------------
r981558 | osterfeld | 2009-06-13 18:27:52 +0200 (Sat, 13 Jun 2009) | 2 lines

exclude more files from compilation, including feedlist.cpp

------------------------------------------------------------------------
r981565 | osterfeld | 2009-06-13 18:41:04 +0200 (Sat, 13 Jun 2009) | 2 lines

--FetchQueue

------------------------------------------------------------------------
r981592 | osterfeld | 2009-06-13 19:25:03 +0200 (Sat, 13 Jun 2009) | 2 lines

more porting of article viewer and formatter. remove Akr::TreeNodeVisitor from compilation

------------------------------------------------------------------------
r981595 | osterfeld | 2009-06-13 19:30:06 +0200 (Sat, 13 Jun 2009) | 2 lines

--Akregator::Folder

------------------------------------------------------------------------
r981597 | osterfeld | 2009-06-13 19:43:25 +0200 (Sat, 13 Jun 2009) | 2 lines

exclude article.cpp from compilation

------------------------------------------------------------------------
r981612 | divanov | 2009-06-13 20:59:13 +0200 (Sat, 13 Jun 2009) | 2 lines

Port ProgressManager to krss

------------------------------------------------------------------------
r981725 | osterfeld | 2009-06-14 10:40:50 +0200 (Sun, 14 Jun 2009) | 2 lines

remove some DISABLED sections where porting is not required, remove feed list saving handling from the part

------------------------------------------------------------------------
r981738 | osterfeld | 2009-06-14 11:17:45 +0200 (Sun, 14 Jun 2009) | 2 lines

port feed list export to krss

------------------------------------------------------------------------
r981742 | osterfeld | 2009-06-14 11:36:34 +0200 (Sun, 14 Jun 2009) | 2 lines

move import/export slots from Part to MainWidget

------------------------------------------------------------------------
r981762 | divanov | 2009-06-14 12:51:20 +0200 (Sun, 14 Jun 2009) | 2 lines

Track the progress of an ItemListJob in the ProgressManager.

------------------------------------------------------------------------
r981811 | divanov | 2009-06-14 14:27:19 +0200 (Sun, 14 Jun 2009) | 2 lines

Port away from Akregator::FetchQueue

------------------------------------------------------------------------
r982028 | osterfeld | 2009-06-14 21:26:07 +0200 (Sun, 14 Jun 2009) | 2 lines

SVN_SILENT bump version

------------------------------------------------------------------------
r982070 | osterfeld | 2009-06-14 23:01:39 +0200 (Sun, 14 Jun 2009) | 2 lines

port feed summary, by using a FeedVisitor to get hold of NetFeed and its htmlUrl and xmlUrl.

------------------------------------------------------------------------
r982079 | osterfeld | 2009-06-14 23:21:45 +0200 (Sun, 14 Jun 2009) | 2 lines

don't compile treenode.cpp, feed.cpp and feedpropertiesdialog.cpp; include cleanup

------------------------------------------------------------------------
r982116 | osterfeld | 2009-06-15 00:53:35 +0200 (Mon, 15 Jun 2009) | 2 lines

implement the edit command for netfeeds, move tag case from mainwidget to editsubscriptioncommand

------------------------------------------------------------------------
r982157 | divanov | 2009-06-15 09:11:46 +0200 (Mon, 15 Jun 2009) | 2 lines

Compile

------------------------------------------------------------------------
r982468 | osterfeld | 2009-06-16 00:24:13 +0200 (Tue, 16 Jun 2009) | 2 lines

add metakit migration wizard formerly part of krssreader

------------------------------------------------------------------------
r982607 | divanov | 2009-06-16 14:08:38 +0200 (Tue, 16 Jun 2009) | 4 lines

 - port MarkFeedAsRead and MarkAllFeedsAsRead to krss
 - rename feed_mark_all_as_read to feed_mark_feed_as_read to be
   consistent with the actual action/function names

------------------------------------------------------------------------
r982726 | osterfeld | 2009-06-16 20:02:44 +0200 (Tue, 16 Jun 2009) | 2 lines

move metakit storage impl to akregatorstorageexporter

------------------------------------------------------------------------
r982731 | osterfeld | 2009-06-16 20:05:43 +0200 (Tue, 16 Jun 2009) | 2 lines

Goodbye, mk4storage plugin, goodbye.

------------------------------------------------------------------------
r982732 | osterfeld | 2009-06-16 20:06:41 +0200 (Tue, 16 Jun 2009) | 2 lines

no need to link against akregatorinterfaces anymore

------------------------------------------------------------------------
r982734 | osterfeld | 2009-06-16 20:11:03 +0200 (Tue, 16 Jun 2009) | 2 lines

remove the old storage interfaces

------------------------------------------------------------------------
r982755 | osterfeld | 2009-06-16 20:56:32 +0200 (Tue, 16 Jun 2009) | 2 lines

remove storage plugin loading and some other cruft

------------------------------------------------------------------------
r982768 | osterfeld | 2009-06-16 21:32:01 +0200 (Tue, 16 Jun 2009) | 2 lines

pass config group to store header config in

------------------------------------------------------------------------
r982810 | osterfeld | 2009-06-16 22:37:24 +0200 (Tue, 16 Jun 2009) | 2 lines

remove now unused files

------------------------------------------------------------------------
r983248 | osterfeld | 2009-06-17 22:24:05 +0200 (Wed, 17 Jun 2009) | 2 lines

don't crash if feed list isn't loaded (yet)

------------------------------------------------------------------------
r983258 | osterfeld | 2009-06-17 22:37:51 +0200 (Wed, 17 Jun 2009) | 2 lines

make Command inherit KJob

------------------------------------------------------------------------
r983265 | osterfeld | 2009-06-17 22:58:16 +0200 (Wed, 17 Jun 2009) | 2 lines

register commands in progress manager. we might hide many of them later again though.

------------------------------------------------------------------------
r983282 | osterfeld | 2009-06-17 23:28:16 +0200 (Wed, 17 Jun 2009) | 2 lines

forgot to remove this one

------------------------------------------------------------------------
r983295 | osterfeld | 2009-06-17 23:38:55 +0200 (Wed, 17 Jun 2009) | 2 lines

add config key for the configured active resource

------------------------------------------------------------------------


svn path=/branches/work/akonadi-ports/kdepim/; revision=983680
parent 5fc6daa7
......@@ -41,10 +41,10 @@ K_EXPORT_PLUGIN(KCMAkregatorAdvancedConfigFactory( "kcmakradvancedconfig" ))
KCMAkregatorAdvancedConfig::KCMAkregatorAdvancedConfig( QWidget* parent, const QVariantList& args )
: KCModule( KCMAkregatorAdvancedConfigFactory::componentData(), parent, args ), m_widget( new SettingsAdvanced )
{
{
QVBoxLayout* layout = new QVBoxLayout( this );
layout->addWidget( m_widget );
KAboutData *about = new KAboutData( I18N_NOOP( "kcmakradvancedconfig" ), 0,
ki18n( "Advanced Feed Reader Settings" ),
0, KLocalizedString(), KAboutData::License_GPL,
......@@ -60,12 +60,20 @@ KCMAkregatorAdvancedConfig::KCMAkregatorAdvancedConfig( QWidget* parent, const Q
void KCMAkregatorAdvancedConfig::load()
{
KCModule::load();
#ifdef KRSS_PORT_DISABLED
m_widget->selectFactory(Settings::archiveBackend());
#else
kWarning() << "Code temporarily disabled (Akonadi port)";
#endif //KRSS_PORT_DISABLED
}
void KCMAkregatorAdvancedConfig::save()
{
#ifdef KRSS_PORT_DISABLED
Settings::setArchiveBackend( m_widget->selectedFactory() );
#else
kWarning() << "Code temporarily disabled (Akonadi port)";
#endif //KRSS_PORT_DISABLED
KCModule::save();
}
......
......@@ -24,8 +24,6 @@
#include "akregatorconfig.h"
#include "settings_advanced.h"
#include "storagefactory.h"
#include "storagefactoryregistry.h"
#include <KComboBox>
......@@ -41,18 +39,22 @@ SettingsAdvanced::SettingsAdvanced(QWidget* parent, const char* name) : QWidget(
{
setObjectName(name);
setupUi(this);
#ifdef KRSS_PORT_DISABLED
const QStringList backends = Backend::StorageFactoryRegistry::self()->list();
Q_FOREACH( const QString& i, backends)
{
Backend::StorageFactory* const factory = Backend::StorageFactoryRegistry::self()->getFactory( i );
if ( !factory )
continue;
m_factories.insert( factory->key(), factory );
cbBackend->addItem( factory->name(), factory->key() );
}
#else
kWarning() << "Code temporarily disabled (Akonadi port)";
#endif //KRSS_PORT_DISABLED
connect(pbBackendConfigure, SIGNAL(clicked()), this, SLOT(slotConfigureStorage()));
connect(cbBackend, SIGNAL(activated(int)), this, SLOT(slotFactorySelected(int)));
connect( kcfg_UseMarkReadDelay, SIGNAL( toggled( bool ) ),
......@@ -66,6 +68,7 @@ QString SettingsAdvanced::selectedFactory() const
void SettingsAdvanced::selectFactory( const QString& key )
{
#ifdef KRSS_PORT_DISABLED
const int idx = cbBackend->findData( key );
if ( idx < 0 )
return;
......@@ -73,22 +76,33 @@ void SettingsAdvanced::selectFactory( const QString& key )
const Backend::StorageFactory* const factory = m_factories.value( key );
assert( factory );
pbBackendConfigure->setEnabled( factory->isConfigurable() );
#else
kWarning() << "Code temporarily disabled (Akonadi port)";
#endif //KRSS_PORT_DISABLED
}
void SettingsAdvanced::slotConfigureStorage()
{
#ifdef KRSS_PORT_DISABLED
const QString key = cbBackend->itemData( cbBackend->currentIndex() ).toString();
Backend::StorageFactory* const factory = m_factories.value( key );
assert( factory );
factory->configure();
#else
kWarning() << "Code temporarily disabled (Akonadi port)";
#endif //KRSS_PORT_DISABLED
}
void SettingsAdvanced::slotFactorySelected( int pos )
{
#ifdef KRSS_PORT_DISABLED
const QString key = cbBackend->itemData( pos ).toString();
const Backend::StorageFactory* const factory = m_factories.value( key );
assert( factory );
pbBackendConfigure->setEnabled( factory->isConfigurable() );
#else
kWarning() << "Code temporarily disabled (Akonadi port)";
#endif //KRSS_PORT_DISABLED
}
} //namespace Akregator
......
include_directories( ${CMAKE_SOURCE_DIR}/akregator/interfaces ${CMAKE_SOURCE_DIR} ${KDE4_INCLUDE_DIR} ${QT_INCLUDES} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} )
include_directories( ${CMAKE_SOURCE_DIR}/akregator/export/metakit/include ${CMAKE_SOURCE_DIR} ${KDE4_INCLUDE_DIR} ${QT_INCLUDES} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_BINARY_DIR}/akregator )
set(akregatorstorageexporter_SRCS
set(metakit_SRCS
metakit/src/column.cpp
metakit/src/custom.cpp
metakit/src/derived.cpp
metakit/src/field.cpp
metakit/src/fileio.cpp
metakit/src/format.cpp
metakit/src/handler.cpp
metakit/src/persist.cpp
metakit/src/remap.cpp
metakit/src/std.cpp
metakit/src/store.cpp
metakit/src/string.cpp
metakit/src/table.cpp
metakit/src/univ.cpp
metakit/src/view.cpp
metakit/src/viewx.cpp
)
set(akregatorstorageexporter_SRCS
${metakit_SRCS}
akregatorstorageexporter.cpp
storagemk4impl.cpp
feedstoragemk4impl.cpp
)
kde4_add_executable(akregatorstorageexporter NOGUI ${akregatorstorageexporter_SRCS})
target_link_libraries(akregatorstorageexporter
${KDE4_KDECORE_LIBS}
${KDEPIMLIBS_SYNDICATION_LIBS}
akregatorinterfaces)
${KDEPIMLIBS_SYNDICATION_LIBS})
install(TARGETS akregatorstorageexporter ${INSTALL_TARGETS_DEFAULT_ARGS})
......@@ -19,11 +19,8 @@
* Boston, MA 02110-1301, USA.
*
*/
#include "feedstorage.h"
#include "storage.h"
#include "storagefactory.h"
#include "storagefactoryregistry.h"
#include "plugin.h"
#include "feedstoragemk4impl.h"
#include "storagemk4impl.h"
#include <syndication/atom/constants.h>
#include <syndication/constants.h>
......@@ -40,9 +37,6 @@
#include <KComponentData>
#include <KGlobal>
#include <KPluginLoader>
#include <KService>
#include <KServiceTypeTrader>
#include <iostream>
......@@ -309,23 +303,6 @@ namespace {
serialize( storage->archiveFor( url ), url, device );
}
static KService::List queryStoragePlugins() {
return KServiceTypeTrader::self()->query( "Akregator/Plugin",
QString::fromLatin1( "[X-KDE-akregator-framework-version] == %1 and [X-KDE-akregator-plugintype] == 'storage' and [X-KDE-akregator-rank] > 0" ).arg( QString::number( AKREGATOR_PLUGIN_INTERFACE_VERSION ) ) );
}
static Plugin* createFromService( const KService::Ptr& service )
{
KPluginLoader loader( *service );
KPluginFactory* factory = loader.factory();
if ( !factory ) {
qCritical() << QString( " Could not create plugin factory for: %1\n"
" Error message: %2" ).arg( service->library(), loader.errorString() );
return 0;
}
return factory->create<Akregator::Plugin>();
}
static void printUsage() {
std::cout << "akregatorstorageexporter [--base64] url" << std::endl;
}
......@@ -334,7 +311,6 @@ namespace {
int main( int argc, char** argv ) {
KGlobal::setActiveComponent( KComponentData( "akregatorstorageexporter" ) );
const QString backend = QString::fromLatin1( "metakit" );
if ( argc < 2 ) {
printUsage();
......@@ -351,21 +327,8 @@ int main( int argc, char** argv ) {
const int pos = base64 ? 2 : 1;
const QString url = QUrl::fromEncoded( base64 ? QByteArray::fromBase64( argv[pos] ) : QByteArray( argv[pos] ) ).toString();
Q_FOREACH( const KService::Ptr& i, queryStoragePlugins() )
if ( Plugin* const plugin = createFromService( i ) )
plugin->initialize();
const StorageFactory* const storageFactory = StorageFactoryRegistry::self()->getFactory( backend );
if ( !storageFactory ) {
qCritical( "Could not create storage factory for %s.", qPrintable( backend ) );
return 1;
}
Storage* const storage = storageFactory->createStorage( QStringList() );
if ( !storage ) {
qCritical( "Could not create storage object for %s.", qPrintable( backend ) );
return 1;
}
StorageMK4Impl* storage = new StorageMK4Impl;
storage->initialize( QStringList() );
QFile out;
if ( !out.open( stdout, QIODevice::WriteOnly ) ) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment