summaryrefslogtreecommitdiffabout
path: root/kaddressbook
authorulf69 <ulf69>2004-07-16 23:25:52 (UTC)
committer ulf69 <ulf69>2004-07-16 23:25:52 (UTC)
commite87df879ceaa743c95d2b48c291c3c35f8ed6b3f (patch) (side-by-side diff)
treef144099674f805ca7775d6d8a4129871887869de /kaddressbook
parentb78f5351ef7432aae4104ed306b52975c91eacb0 (diff)
downloadkdepimpi-e87df879ceaa743c95d2b48c291c3c35f8ed6b3f.zip
kdepimpi-e87df879ceaa743c95d2b48c291c3c35f8ed6b3f.tar.gz
kdepimpi-e87df879ceaa743c95d2b48c291c3c35f8ed6b3f.tar.bz2
load the sharp dtm lib automatically if it exists
Diffstat (limited to 'kaddressbook') (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 )
continue;
}
-
+
(*it).setResource( resource );
// We use a PwNewCommand so the user can undo it.
@@ -138,8 +138,8 @@ void XXPortManager::slotImport( const QString &identifier, const QString &data )
imported = true;
}
-
+
if ( imported ) {
KMessageBox::information( mCore, i18n( "contacts successfully imported." ) );
-
+
emit modified();
}
@@ -177,5 +177,5 @@ void XXPortManager::loadPlugins()
if ( !(*it)->hasServiceType( "KAddressBook/XXPort" ) )
continue;
-
+
KLibFactory *factory = KLibLoader::self()->factory( (*it)->library().latin1() );
if ( !factory ) {
@@ -190,5 +190,5 @@ void XXPortManager::loadPlugins()
continue;
}
-
+
#else //KAB_EMBEDDED
QList<XXPortFactory> factorylist;
@@ -210,6 +210,13 @@ void XXPortManager::loadPlugins()
factorylist.append(xxportFactory);
}
-
- QListIterator<XXPortFactory> it(factorylist);
+
+ //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 )
{
@@ -237,5 +244,5 @@ PreviewDialog::PreviewDialog( const KABC::Addressee &addr, QWidget *parent,
QWidget *page = plainPage();
QVBoxLayout *layout = new QVBoxLayout( page, marginHint(), spacingHint() );
-
+
KPIM::AddresseeView *view = new KPIM::AddresseeView( page );
view->setAddressee( addr );