Diffstat (limited to 'kaddressbook/xxportobject.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kaddressbook/xxportobject.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kaddressbook/xxportobject.cpp b/kaddressbook/xxportobject.cpp index bd9d986..2d8d0ff 100644 --- a/kaddressbook/xxportobject.cpp +++ b/kaddressbook/xxportobject.cpp | |||
@@ -226,51 +226,51 @@ bool XXPortResourceObject::_exportContacts( const KABC::AddresseeList &list, con | |||
226 | 226 | ||
227 | res = false; | 227 | res = false; |
228 | if (ticket != 0) | 228 | if (ticket != 0) |
229 | res = tmpAB.save( ticket ); | 229 | res = tmpAB.save( ticket ); |
230 | 230 | ||
231 | //removeResource deletes also the resource object, if the linkcount is 0 | 231 | //removeResource deletes also the resource object, if the linkcount is 0 |
232 | tmpAB.removeResource( mResource ); | 232 | tmpAB.removeResource( mResource ); |
233 | 233 | ||
234 | return res; | 234 | return res; |
235 | } | 235 | } |
236 | 236 | ||
237 | 237 | ||
238 | KABC::AddresseeList XXPortResourceObject::_importContacts( const QString& identifier, const QString& fileName ) const | 238 | KABC::AddresseeList XXPortResourceObject::_importContacts( const QString& identifier, const QString& fileName ) const |
239 | { | 239 | { |
240 | 240 | ||
241 | 241 | ||
242 | KABC::Resource* mResource = (KABC::Resource*)(mFactory->resource( this->identifier(), 0 )); | 242 | KABC::Resource* mResource = (KABC::Resource*)(mFactory->resource( this->identifier(), 0 )); |
243 | 243 | ||
244 | if (mResource == 0) | 244 | if (mResource == 0) |
245 | return KABC::AddresseeList(); | 245 | return KABC::AddresseeList(); |
246 | 246 | ||
247 | KABC::AddresseeList adrlst; | 247 | KABC::AddresseeList adrlst; |
248 | 248 | ||
249 | if (fileName != QString::null) | 249 | if (fileName != QString::null) |
250 | mResource->setFileName( fileName ); | 250 | mResource->setFileName( fileName ); |
251 | 251 | ||
252 | 252 | ||
253 | KABC::TmpAddressBook tmpAB; | 253 | KABC::TmpAddressBook tmpAB; |
254 | 254 | ||
255 | bool res = tmpAB.addResource( mResource ); | 255 | bool res = tmpAB.addResource( mResource ); |
256 | if (res == false) | 256 | if (res == false) |
257 | { | 257 | { |
258 | delete mResource; | 258 | delete mResource; |
259 | return KABC::AddresseeList(); | 259 | return KABC::AddresseeList(); |
260 | } | 260 | } |
261 | 261 | ||
262 | res = tmpAB.load(); | 262 | res = tmpAB.load(); |
263 | 263 | ||
264 | adrlst = tmpAB.allAddressees(); | 264 | adrlst = tmpAB.allAddressees(); |
265 | 265 | ||
266 | //remove resource deletes also the Resourceobject, if the linkcount is 0 | 266 | //remove resource deletes also the Resourceobject, if the linkcount is 0 |
267 | tmpAB.removeResource( mResource ); | 267 | tmpAB.removeResource( mResource ); |
268 | 268 | ||
269 | return adrlst; | 269 | return adrlst; |
270 | } | 270 | } |
271 | 271 | ||
272 | 272 | ||
273 | 273 | ||
274 | #ifndef KAB_EMBEDDED | 274 | #ifndef KAB_EMBEDDED_ |
275 | #include "xxportobject.moc" | 275 | #include "moc_xxportobject.cpp" |
276 | #endif //KAB_EMBEDDED | 276 | #endif //KAB_EMBEDDED |