-rw-r--r-- | kabc/addressbook.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/kabc/addressbook.cpp b/kabc/addressbook.cpp index 295cf03..03a86f9 100644 --- a/kabc/addressbook.cpp +++ b/kabc/addressbook.cpp | |||
@@ -401,33 +401,32 @@ void AddressBook::export2File( QString fileName ) | |||
401 | } | 401 | } |
402 | outFile.close(); | 402 | outFile.close(); |
403 | } | 403 | } |
404 | void AddressBook::importFromFile( QString fileName ) | 404 | void AddressBook::importFromFile( QString fileName ) |
405 | { | 405 | { |
406 | 406 | ||
407 | KABC::Addressee::List list; | 407 | KABC::Addressee::List list; |
408 | QFile file( fileName ); | 408 | QFile file( fileName ); |
409 | 409 | ||
410 | file.open( IO_ReadOnly ); | 410 | file.open( IO_ReadOnly ); |
411 | QByteArray rawData = file.readAll(); | 411 | QByteArray rawData = file.readAll(); |
412 | file.close(); | 412 | file.close(); |
413 | 413 | ||
414 | QString data = QString::fromUtf8( rawData.data(), rawData.size() + 1 ); | 414 | QString data = QString::fromUtf8( rawData.data(), rawData.size() + 1 ); |
415 | KABC::VCardTool tool; | 415 | KABC::VCardTool tool; |
416 | list = tool.parseVCards( data ); | 416 | list = tool.parseVCards( data ); |
417 | |||
418 | KABC::Addressee::List::Iterator it; | 417 | KABC::Addressee::List::Iterator it; |
419 | for ( it = list.begin(); it != list.end(); ++it ) { | 418 | for ( it = list.begin(); it != list.end(); ++it ) { |
420 | (*it).setResource( 0 ); | 419 | (*it).setResource( 0 ); |
421 | insertAddressee( (*it), false, true ); | 420 | insertAddressee( (*it), false, true ); |
422 | } | 421 | } |
423 | 422 | ||
424 | } | 423 | } |
425 | 424 | ||
426 | bool AddressBook::saveAB() | 425 | bool AddressBook::saveAB() |
427 | { | 426 | { |
428 | bool ok = true; | 427 | bool ok = true; |
429 | 428 | ||
430 | deleteRemovedAddressees(); | 429 | deleteRemovedAddressees(); |
431 | Iterator ait; | 430 | Iterator ait; |
432 | for ( ait = begin(); ait != end(); ++ait ) { | 431 | for ( ait = begin(); ait != end(); ++ait ) { |
433 | if ( !(*ait).IDStr().isEmpty() ) { | 432 | if ( !(*ait).IDStr().isEmpty() ) { |