author | ulf69 <ulf69> | 2004-07-16 23:25:52 (UTC) |
---|---|---|
committer | ulf69 <ulf69> | 2004-07-16 23:25:52 (UTC) |
commit | e87df879ceaa743c95d2b48c291c3c35f8ed6b3f (patch) (side-by-side diff) | |
tree | f144099674f805ca7775d6d8a4129871887869de | |
parent | b78f5351ef7432aae4104ed306b52975c91eacb0 (diff) | |
download | kdepimpi-e87df879ceaa743c95d2b48c291c3c35f8ed6b3f.zip kdepimpi-e87df879ceaa743c95d2b48c291c3c35f8ed6b3f.tar.gz kdepimpi-e87df879ceaa743c95d2b48c291c3c35f8ed6b3f.tar.bz2 |
load the sharp dtm lib automatically if it exists
-rw-r--r-- | kaddressbook/xxportmanager.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/kaddressbook/xxportmanager.cpp b/kaddressbook/xxportmanager.cpp index 4798ffe..2962951 100644 --- a/kaddressbook/xxportmanager.cpp +++ b/kaddressbook/xxportmanager.cpp @@ -165,87 +165,94 @@ void XXPortManager::slotExport( const QString &identifier, const QString &data ) else KMessageBox::information( mCore, i18n( "contacts successfully exported." ) ); } void XXPortManager::loadPlugins() { mXXPortObjects.clear(); #ifndef KAB_EMBEDDED 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_kaddrbk_csv_xxport())); factorylist.append(static_cast<XXPortFactory*>(init_kaddrbk_kde2_xxport())); factorylist.append(static_cast<XXPortFactory*>(init_kaddrbk_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); + } + 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 ) { QWidget *page = plainPage(); QVBoxLayout *layout = new QVBoxLayout( page, marginHint(), spacingHint() ); KPIM::AddresseeView *view = new KPIM::AddresseeView( page ); view->setAddressee( addr ); layout->addWidget( view ); resize( 400, 300 ); } #ifndef KAB_EMBEDDED #include "xxportmanager.moc" #endif //KAB_EMBEDDED |