summaryrefslogtreecommitdiffabout
authorulf69 <ulf69>2004-08-02 22:35:50 (UTC)
committer ulf69 <ulf69>2004-08-02 22:35:50 (UTC)
commit464ed9d13592965a63b614a1f2902000eb26f1ae (patch) (unidiff)
tree8da5e8fc363ddedff10250553a12758404de0bf9
parent5e9c7a34f68d9e41d73ca5c9238d69252a80595f (diff)
downloadkdepimpi-464ed9d13592965a63b614a1f2902000eb26f1ae.zip
kdepimpi-464ed9d13592965a63b614a1f2902000eb26f1ae.tar.gz
kdepimpi-464ed9d13592965a63b614a1f2902000eb26f1ae.tar.bz2
load all export managers statically instead dynamically
Diffstat (more/less context) (ignore 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
@@ -189,45 +189,27 @@ void XXPortManager::loadPlugins()
189 XXPortFactory *xxportFactory = static_cast<XXPortFactory*>( factory ); 189 XXPortFactory *xxportFactory = static_cast<XXPortFactory*>( factory );
190 190
191 if ( !xxportFactory ) { 191 if ( !xxportFactory ) {
192 kdDebug(5720) << "XXPortManager::loadExtensions(): Cast failed" << endl; 192 kdDebug(5720) << "XXPortManager::loadExtensions(): Cast failed" << endl;
193 continue; 193 continue;
194 } 194 }
195 195
196#else //KAB_EMBEDDED 196#else //KAB_EMBEDDED
197 QList<XXPortFactory> factorylist; 197 QList<XXPortFactory> factorylist;
198 factorylist.append(static_cast<XXPortFactory*>(init_microkaddrbk_csv_xxport())); 198 factorylist.append(static_cast<XXPortFactory*>(init_microkaddrbk_csv_xxport()));
199 factorylist.append(static_cast<XXPortFactory*>(init_microkaddrbk_kde2_xxport())); 199 factorylist.append(static_cast<XXPortFactory*>(init_microkaddrbk_kde2_xxport()));
200 factorylist.append(static_cast<XXPortFactory*>(init_microkaddrbk_vcard_xxport())); 200 factorylist.append(static_cast<XXPortFactory*>(init_microkaddrbk_vcard_xxport()));
201 201 factorylist.append(static_cast<XXPortFactory*>(init_microkaddrbk_opie_xxport()));
202 //add the opie import library dynamically 202 factorylist.append(static_cast<XXPortFactory*>(init_microkaddrbk_qtopia_xxport()));
203 KLibFactory *factory = KLibLoader::self()->factory( "microkaddrbk_opie_xxport" ); 203 factorylist.append(static_cast<XXPortFactory*>(init_microkaddrbk_sharpdtm_xxport()));
204 if ( factory ) {
205 XXPortFactory *xxportFactory = static_cast<XXPortFactory*>( factory );
206 factorylist.append(xxportFactory);
207 }
208
209 //add the qtopia import library dynamically
210 factory = KLibLoader::self()->factory( "microkaddrbk_qtopia_xxport" );
211 if ( factory ) {
212 XXPortFactory *xxportFactory = static_cast<XXPortFactory*>( factory );
213 factorylist.append(xxportFactory);
214 }
215
216 //add the sharp import library dynamically
217 factory = KLibLoader::self()->factory( "microkaddrbk_sharpdtm_xxport" );
218 if ( factory ) {
219 XXPortFactory *xxportFactory = static_cast<XXPortFactory*>( factory );
220 factorylist.append(xxportFactory);
221 }
222 204
223 QListIterator<XXPortFactory> it(factorylist); 205 QListIterator<XXPortFactory> it(factorylist);
224 for ( ; it.current(); ++it ) 206 for ( ; it.current(); ++it )
225 { 207 {
226 XXPortFactory *xxportFactory = it.current(); 208 XXPortFactory *xxportFactory = it.current();
227#endif //KAB_EMBEDDED 209#endif //KAB_EMBEDDED
228 210
229 XXPortObject *obj = xxportFactory->xxportObject( mCore->addressBook(), mCore ); 211 XXPortObject *obj = xxportFactory->xxportObject( mCore->addressBook(), mCore );
230 if ( obj ) { 212 if ( obj ) {
231 mCore->addGUIClient( obj ); 213 mCore->addGUIClient( obj );
232 mXXPortObjects.insert( obj->identifier(), obj ); 214 mXXPortObjects.insert( obj->identifier(), obj );
233 connect( obj, SIGNAL( exportActivated( const QString&, const QString& ) ), 215 connect( obj, SIGNAL( exportActivated( const QString&, const QString& ) ),