summaryrefslogtreecommitdiffabout
path: root/kaddressbook
authorulf69 <ulf69>2004-08-02 22:35:50 (UTC)
committer ulf69 <ulf69>2004-08-02 22:35:50 (UTC)
commit464ed9d13592965a63b614a1f2902000eb26f1ae (patch) (side-by-side diff)
tree8da5e8fc363ddedff10250553a12758404de0bf9 /kaddressbook
parent5e9c7a34f68d9e41d73ca5c9238d69252a80595f (diff)
downloadkdepimpi-464ed9d13592965a63b614a1f2902000eb26f1ae.zip
kdepimpi-464ed9d13592965a63b614a1f2902000eb26f1ae.tar.gz
kdepimpi-464ed9d13592965a63b614a1f2902000eb26f1ae.tar.bz2
load all export managers statically instead dynamically
Diffstat (limited to 'kaddressbook') (more/less context) (show whitespace changes)
-rw-r--r--kaddressbook/xxportmanager.cpp24
1 files changed, 3 insertions, 21 deletions
diff --git a/kaddressbook/xxportmanager.cpp b/kaddressbook/xxportmanager.cpp
index a6797c9..713b0fc 100644
--- a/kaddressbook/xxportmanager.cpp
+++ b/kaddressbook/xxportmanager.cpp
@@ -177,69 +177,51 @@ void XXPortManager::loadPlugins()
KTrader::OfferList plugins = KTrader::self()->query( "KAddressBook/XXPort" );
KTrader::OfferList::ConstIterator it;
for ( it = plugins.begin(); it != plugins.end(); ++it ) {
if ( !(*it)->hasServiceType( "KAddressBook/XXPort" ) )
continue;
KLibFactory *factory = KLibLoader::self()->factory( (*it)->library().latin1() );
if ( !factory ) {
kdDebug(5720) << "XXPortManager::loadExtensions(): Factory creation failed" << endl;
continue;
}
XXPortFactory *xxportFactory = static_cast<XXPortFactory*>( factory );
if ( !xxportFactory ) {
kdDebug(5720) << "XXPortManager::loadExtensions(): Cast failed" << endl;
continue;
}
#else //KAB_EMBEDDED
QList<XXPortFactory> factorylist;
factorylist.append(static_cast<XXPortFactory*>(init_microkaddrbk_csv_xxport()));
factorylist.append(static_cast<XXPortFactory*>(init_microkaddrbk_kde2_xxport()));
factorylist.append(static_cast<XXPortFactory*>(init_microkaddrbk_vcard_xxport()));
-
- //add the opie import library dynamically
- KLibFactory *factory = KLibLoader::self()->factory( "microkaddrbk_opie_xxport" );
- if ( factory ) {
- XXPortFactory *xxportFactory = static_cast<XXPortFactory*>( factory );
- factorylist.append(xxportFactory);
- }
-
- //add the qtopia import library dynamically
- factory = KLibLoader::self()->factory( "microkaddrbk_qtopia_xxport" );
- if ( factory ) {
- XXPortFactory *xxportFactory = static_cast<XXPortFactory*>( factory );
- factorylist.append(xxportFactory);
- }
-
- //add the sharp import library dynamically
- factory = KLibLoader::self()->factory( "microkaddrbk_sharpdtm_xxport" );
- if ( factory ) {
- XXPortFactory *xxportFactory = static_cast<XXPortFactory*>( factory );
- factorylist.append(xxportFactory);
- }
+ factorylist.append(static_cast<XXPortFactory*>(init_microkaddrbk_opie_xxport()));
+ factorylist.append(static_cast<XXPortFactory*>(init_microkaddrbk_qtopia_xxport()));
+ factorylist.append(static_cast<XXPortFactory*>(init_microkaddrbk_sharpdtm_xxport()));
QListIterator<XXPortFactory> it(factorylist);
for ( ; it.current(); ++it )
{
XXPortFactory *xxportFactory = it.current();
#endif //KAB_EMBEDDED
XXPortObject *obj = xxportFactory->xxportObject( mCore->addressBook(), mCore );
if ( obj ) {
mCore->addGUIClient( obj );
mXXPortObjects.insert( obj->identifier(), obj );
connect( obj, SIGNAL( exportActivated( const QString&, const QString& ) ),
this, SLOT( slotExport( const QString&, const QString& ) ) );
connect( obj, SIGNAL( importActivated( const QString&, const QString& ) ),
this, SLOT( slotImport( const QString&, const QString& ) ) );
}
}
}
PreviewDialog::PreviewDialog( const KABC::Addressee &addr, QWidget *parent,
const char *name )
: KDialogBase( Plain, i18n( "Contact Preview" ), Ok | Cancel, Ok, parent,
name, true, true )