author | zautrix <zautrix> | 2004-07-09 22:18:33 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-07-09 22:18:33 (UTC) |
commit | 5135d0b47efac71ecb7a98d7d66314c868133021 (patch) (unidiff) | |
tree | acd4d56b155b6eb19bef9b5fe0737ca8e8e5e9d2 /kaddressbook | |
parent | eb2b55ccbdbaa24fae2b799019e7082778961e5c (diff) | |
download | kdepimpi-5135d0b47efac71ecb7a98d7d66314c868133021.zip kdepimpi-5135d0b47efac71ecb7a98d7d66314c868133021.tar.gz kdepimpi-5135d0b47efac71ecb7a98d7d66314c868133021.tar.bz2 |
renamed lib to microX
-rw-r--r-- | kaddressbook/xxport/opie/opie_xxport.cpp | 2 | ||||
-rw-r--r-- | kaddressbook/xxportmanager.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/kaddressbook/xxport/opie/opie_xxport.cpp b/kaddressbook/xxport/opie/opie_xxport.cpp index 8ee0725..12c83af 100644 --- a/kaddressbook/xxport/opie/opie_xxport.cpp +++ b/kaddressbook/xxport/opie/opie_xxport.cpp | |||
@@ -50,49 +50,49 @@ $Id$ | |||
50 | #include <klocale.h> | 50 | #include <klocale.h> |
51 | #include <kmessagebox.h> | 51 | #include <kmessagebox.h> |
52 | #include <ktempfile.h> | 52 | #include <ktempfile.h> |
53 | #include <kurl.h> | 53 | #include <kurl.h> |
54 | */ | 54 | */ |
55 | 55 | ||
56 | #include "xxportmanager.h" | 56 | #include "xxportmanager.h" |
57 | #include "opieconverter.h" | 57 | #include "opieconverter.h" |
58 | 58 | ||
59 | #include "opie_xxport.h" | 59 | #include "opie_xxport.h" |
60 | 60 | ||
61 | 61 | ||
62 | class OpieXXPortFactory : public XXPortFactory | 62 | class OpieXXPortFactory : public XXPortFactory |
63 | { | 63 | { |
64 | public: | 64 | public: |
65 | XXPortObject *xxportObject( KABC::AddressBook *ab, QWidget *parent, const char *name ) | 65 | XXPortObject *xxportObject( KABC::AddressBook *ab, QWidget *parent, const char *name ) |
66 | { | 66 | { |
67 | return new OpieXXPort( ab, parent, name ); | 67 | return new OpieXXPort( ab, parent, name ); |
68 | } | 68 | } |
69 | }; | 69 | }; |
70 | 70 | ||
71 | 71 | ||
72 | extern "C" | 72 | extern "C" |
73 | { | 73 | { |
74 | void *init_kaddrbk_opie_xxport() | 74 | void *init_microkaddrbk_opie_xxport() |
75 | { | 75 | { |
76 | return ( new OpieXXPortFactory() ); | 76 | return ( new OpieXXPortFactory() ); |
77 | } | 77 | } |
78 | } | 78 | } |
79 | 79 | ||
80 | 80 | ||
81 | OpieXXPort::OpieXXPort( KABC::AddressBook *ab, QWidget *parent, const char *name ) | 81 | OpieXXPort::OpieXXPort( KABC::AddressBook *ab, QWidget *parent, const char *name ) |
82 | : XXPortObject( ab, parent, name ) | 82 | : XXPortObject( ab, parent, name ) |
83 | { | 83 | { |
84 | createImportAction( i18n( "Import Opie..." ) ); | 84 | createImportAction( i18n( "Import Opie..." ) ); |
85 | createExportAction( i18n( "Export Opie..." ) ); | 85 | createExportAction( i18n( "Export Opie..." ) ); |
86 | } | 86 | } |
87 | 87 | ||
88 | bool OpieXXPort::exportContacts( const KABC::AddresseeList &list, const QString &data ) | 88 | bool OpieXXPort::exportContacts( const KABC::AddresseeList &list, const QString &data ) |
89 | { | 89 | { |
90 | QString name = QDir::homeDirPath() + "/Applications/addressbook/addressbook.xml"; | 90 | QString name = QDir::homeDirPath() + "/Applications/addressbook/addressbook.xml"; |
91 | 91 | ||
92 | #ifndef KAB_EMBEDDED | 92 | #ifndef KAB_EMBEDDED |
93 | QString fileName = KFileDialog::getSaveFileName( name ); | 93 | QString fileName = KFileDialog::getSaveFileName( name ); |
94 | #else //KAB_EMBEDDED | 94 | #else //KAB_EMBEDDED |
95 | QString fileName = KFileDialog::getSaveFileName( name, i18n("Save file"), parentWidget() ); | 95 | QString fileName = KFileDialog::getSaveFileName( name, i18n("Save file"), parentWidget() ); |
96 | #endif //KAB_EMBEDDED | 96 | #endif //KAB_EMBEDDED |
97 | 97 | ||
98 | if ( fileName.isEmpty() ) | 98 | if ( fileName.isEmpty() ) |
diff --git a/kaddressbook/xxportmanager.cpp b/kaddressbook/xxportmanager.cpp index 20cde49..248fcab 100644 --- a/kaddressbook/xxportmanager.cpp +++ b/kaddressbook/xxportmanager.cpp | |||
@@ -176,49 +176,49 @@ void XXPortManager::loadPlugins() | |||
176 | for ( it = plugins.begin(); it != plugins.end(); ++it ) { | 176 | for ( it = plugins.begin(); it != plugins.end(); ++it ) { |
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 ) { |
182 | kdDebug(5720) << "XXPortManager::loadExtensions(): Factory creation failed" << endl; | 182 | kdDebug(5720) << "XXPortManager::loadExtensions(): Factory creation failed" << endl; |
183 | continue; | 183 | continue; |
184 | } | 184 | } |
185 | 185 | ||
186 | XXPortFactory *xxportFactory = static_cast<XXPortFactory*>( factory ); | 186 | XXPortFactory *xxportFactory = static_cast<XXPortFactory*>( factory ); |
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 | //now add the opie import library dynamically |
200 | KLibFactory *factory = KLibLoader::self()->factory( "kaddrbk_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 | QListIterator<XXPortFactory> it(factorylist); | 206 | QListIterator<XXPortFactory> it(factorylist); |
207 | for ( ; it.current(); ++it ) | 207 | for ( ; it.current(); ++it ) |
208 | { | 208 | { |
209 | XXPortFactory *xxportFactory = it.current(); | 209 | XXPortFactory *xxportFactory = it.current(); |
210 | #endif //KAB_EMBEDDED | 210 | #endif //KAB_EMBEDDED |
211 | 211 | ||
212 | XXPortObject *obj = xxportFactory->xxportObject( mCore->addressBook(), mCore ); | 212 | XXPortObject *obj = xxportFactory->xxportObject( mCore->addressBook(), mCore ); |
213 | if ( obj ) { | 213 | if ( obj ) { |
214 | mCore->addGUIClient( obj ); | 214 | mCore->addGUIClient( obj ); |
215 | mXXPortObjects.insert( obj->identifier(), obj ); | 215 | mXXPortObjects.insert( obj->identifier(), obj ); |
216 | connect( obj, SIGNAL( exportActivated( const QString&, const QString& ) ), | 216 | connect( obj, SIGNAL( exportActivated( const QString&, const QString& ) ), |
217 | this, SLOT( slotExport( const QString&, const QString& ) ) ); | 217 | this, SLOT( slotExport( const QString&, const QString& ) ) ); |
218 | connect( obj, SIGNAL( importActivated( const QString&, const QString& ) ), | 218 | connect( obj, SIGNAL( importActivated( const QString&, const QString& ) ), |
219 | this, SLOT( slotImport( const QString&, const QString& ) ) ); | 219 | this, SLOT( slotImport( const QString&, const QString& ) ) ); |
220 | } | 220 | } |
221 | } | 221 | } |
222 | 222 | ||
223 | } | 223 | } |
224 | 224 | ||