summaryrefslogtreecommitdiffabout
authorulf69 <ulf69>2004-07-16 23:25:52 (UTC)
committer ulf69 <ulf69>2004-07-16 23:25:52 (UTC)
commite87df879ceaa743c95d2b48c291c3c35f8ed6b3f (patch) (unidiff)
treef144099674f805ca7775d6d8a4129871887869de
parentb78f5351ef7432aae4104ed306b52975c91eacb0 (diff)
downloadkdepimpi-e87df879ceaa743c95d2b48c291c3c35f8ed6b3f.zip
kdepimpi-e87df879ceaa743c95d2b48c291c3c35f8ed6b3f.tar.gz
kdepimpi-e87df879ceaa743c95d2b48c291c3c35f8ed6b3f.tar.bz2
load the sharp dtm lib automatically if it exists
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/xxportmanager.cpp23
1 files changed, 15 insertions, 8 deletions
diff --git a/kaddressbook/xxportmanager.cpp b/kaddressbook/xxportmanager.cpp
index 4798ffe..2962951 100644
--- a/kaddressbook/xxportmanager.cpp
+++ b/kaddressbook/xxportmanager.cpp
@@ -130,5 +130,5 @@ void XXPortManager::slotImport( const QString &identifier, const QString &data )
130 continue; 130 continue;
131 } 131 }
132 132
133 (*it).setResource( resource ); 133 (*it).setResource( resource );
134 // We use a PwNewCommand so the user can undo it. 134 // We use a PwNewCommand so the user can undo it.
@@ -138,8 +138,8 @@ void XXPortManager::slotImport( const QString &identifier, const QString &data )
138 imported = true; 138 imported = true;
139 } 139 }
140 140
141 if ( imported ) { 141 if ( imported ) {
142 KMessageBox::information( mCore, i18n( "contacts successfully imported." ) ); 142 KMessageBox::information( mCore, i18n( "contacts successfully imported." ) );
143 143
144 emit modified(); 144 emit modified();
145 } 145 }
@@ -177,5 +177,5 @@ void XXPortManager::loadPlugins()
177 if ( !(*it)->hasServiceType( "KAddressBook/XXPort" ) ) 177 if ( !(*it)->hasServiceType( "KAddressBook/XXPort" ) )
178 continue; 178 continue;
179 179
180 KLibFactory *factory = KLibLoader::self()->factory( (*it)->library().latin1() ); 180 KLibFactory *factory = KLibLoader::self()->factory( (*it)->library().latin1() );
181 if ( !factory ) { 181 if ( !factory ) {
@@ -190,5 +190,5 @@ void XXPortManager::loadPlugins()
190 continue; 190 continue;
191 } 191 }
192 192
193#else //KAB_EMBEDDED 193#else //KAB_EMBEDDED
194 QList<XXPortFactory> factorylist; 194 QList<XXPortFactory> factorylist;
@@ -210,6 +210,13 @@ void XXPortManager::loadPlugins()
210 factorylist.append(xxportFactory); 210 factorylist.append(xxportFactory);
211 } 211 }
212 212
213 QListIterator<XXPortFactory> it(factorylist); 213 //add the sharp import library dynamically
214 factory = KLibLoader::self()->factory( "microkaddrbk_sharpdtm_xxport" );
215 if ( factory ) {
216 XXPortFactory *xxportFactory = static_cast<XXPortFactory*>( factory );
217 factorylist.append(xxportFactory);
218 }
219
220 QListIterator<XXPortFactory> it(factorylist);
214 for ( ; it.current(); ++it ) 221 for ( ; it.current(); ++it )
215 { 222 {
@@ -237,5 +244,5 @@ PreviewDialog::PreviewDialog( const KABC::Addressee &addr, QWidget *parent,
237 QWidget *page = plainPage(); 244 QWidget *page = plainPage();
238 QVBoxLayout *layout = new QVBoxLayout( page, marginHint(), spacingHint() ); 245 QVBoxLayout *layout = new QVBoxLayout( page, marginHint(), spacingHint() );
239 246
240 KPIM::AddresseeView *view = new KPIM::AddresseeView( page ); 247 KPIM::AddresseeView *view = new KPIM::AddresseeView( page );
241 view->setAddressee( addr ); 248 view->setAddressee( addr );