summaryrefslogtreecommitdiffabout
path: root/kaddressbook
Unidiff
Diffstat (limited to 'kaddressbook') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/xxportmanager.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/kaddressbook/xxportmanager.cpp b/kaddressbook/xxportmanager.cpp
index 248fcab..4798ffe 100644
--- a/kaddressbook/xxportmanager.cpp
+++ b/kaddressbook/xxportmanager.cpp
@@ -187,48 +187,54 @@ void XXPortManager::loadPlugins()
187 187
188 if ( !xxportFactory ) { 188 if ( !xxportFactory ) {
189 kdDebug(5720) << "XXPortManager::loadExtensions(): Cast failed" << endl; 189 kdDebug(5720) << "XXPortManager::loadExtensions(): Cast failed" << endl;
190 continue; 190 continue;
191 } 191 }
192 192
193#else //KAB_EMBEDDED 193#else //KAB_EMBEDDED
194 QList<XXPortFactory> factorylist; 194 QList<XXPortFactory> factorylist;
195 factorylist.append(static_cast<XXPortFactory*>(init_kaddrbk_csv_xxport())); 195 factorylist.append(static_cast<XXPortFactory*>(init_kaddrbk_csv_xxport()));
196 factorylist.append(static_cast<XXPortFactory*>(init_kaddrbk_kde2_xxport())); 196 factorylist.append(static_cast<XXPortFactory*>(init_kaddrbk_kde2_xxport()));
197 factorylist.append(static_cast<XXPortFactory*>(init_kaddrbk_vcard_xxport())); 197 factorylist.append(static_cast<XXPortFactory*>(init_kaddrbk_vcard_xxport()));
198 198
199 //now add the opie import library dynamically 199 //add the opie import library dynamically
200 KLibFactory *factory = KLibLoader::self()->factory( "microkaddrbk_opie_xxport" ); 200 KLibFactory *factory = KLibLoader::self()->factory( "microkaddrbk_opie_xxport" );
201 if ( factory ) { 201 if ( factory ) {
202 XXPortFactory *xxportFactory = static_cast<XXPortFactory*>( factory ); 202 XXPortFactory *xxportFactory = static_cast<XXPortFactory*>( factory );
203 factorylist.append(xxportFactory); 203 factorylist.append(xxportFactory);
204 } 204 }
205 205
206 //add the qtopia import library dynamically
207 factory = KLibLoader::self()->factory( "microkaddrbk_qtopia_xxport" );
208 if ( factory ) {
209 XXPortFactory *xxportFactory = static_cast<XXPortFactory*>( factory );
210 factorylist.append(xxportFactory);
211 }
212
206 QListIterator<XXPortFactory> it(factorylist); 213 QListIterator<XXPortFactory> it(factorylist);
207 for ( ; it.current(); ++it ) 214 for ( ; it.current(); ++it )
208 { 215 {
209 XXPortFactory *xxportFactory = it.current(); 216 XXPortFactory *xxportFactory = it.current();
210#endif //KAB_EMBEDDED 217#endif //KAB_EMBEDDED
211 218
212 XXPortObject *obj = xxportFactory->xxportObject( mCore->addressBook(), mCore ); 219 XXPortObject *obj = xxportFactory->xxportObject( mCore->addressBook(), mCore );
213 if ( obj ) { 220 if ( obj ) {
214 mCore->addGUIClient( obj ); 221 mCore->addGUIClient( obj );
215 mXXPortObjects.insert( obj->identifier(), obj ); 222 mXXPortObjects.insert( obj->identifier(), obj );
216 connect( obj, SIGNAL( exportActivated( const QString&, const QString& ) ), 223 connect( obj, SIGNAL( exportActivated( const QString&, const QString& ) ),
217 this, SLOT( slotExport( const QString&, const QString& ) ) ); 224 this, SLOT( slotExport( const QString&, const QString& ) ) );
218 connect( obj, SIGNAL( importActivated( const QString&, const QString& ) ), 225 connect( obj, SIGNAL( importActivated( const QString&, const QString& ) ),
219 this, SLOT( slotImport( const QString&, const QString& ) ) ); 226 this, SLOT( slotImport( const QString&, const QString& ) ) );
220 } 227 }
221 } 228 }
222
223} 229}
224 230
225 231
226PreviewDialog::PreviewDialog( const KABC::Addressee &addr, QWidget *parent, 232PreviewDialog::PreviewDialog( const KABC::Addressee &addr, QWidget *parent,
227 const char *name ) 233 const char *name )
228 : KDialogBase( Plain, i18n( "Contact Preview" ), Ok | Cancel, Ok, parent, 234 : KDialogBase( Plain, i18n( "Contact Preview" ), Ok | Cancel, Ok, parent,
229 name, true, true ) 235 name, true, true )
230{ 236{
231 QWidget *page = plainPage(); 237 QWidget *page = plainPage();
232 QVBoxLayout *layout = new QVBoxLayout( page, marginHint(), spacingHint() ); 238 QVBoxLayout *layout = new QVBoxLayout( page, marginHint(), spacingHint() );
233 239
234 KPIM::AddresseeView *view = new KPIM::AddresseeView( page ); 240 KPIM::AddresseeView *view = new KPIM::AddresseeView( page );