~ubuntu-branches/ubuntu/saucy/kdepimlibs/saucy-proposed

« back to all changes in this revision

Viewing changes to kabc/ldifconverter.cpp

  • Committer: Package Import Robot
  • Author(s): Scott Kitterman, Jonathan Riddell, Scott Kitterman
  • Date: 2012-11-19 17:32:30 UTC
  • mfrom: (1.1.85)
  • Revision ID: package-import@ubuntu.com-20121119173230-xi32j2vpz82zlmmh
Tags: 4:4.9.80-0ubuntu1
[ Jonathan Riddell ]
* New upstream beta release
* Remove 03_hide_akonadi_progressbar.diff now upstream
* Update .symbols file

[ Scott Kitterman ]
* Add libqjson-dev to build-depends since it is required for 4.10
* Update symbols files
* Drop FindAkonadi.cmake from debian/kdepimlibs5-dev.install since it is no
  longer provided by upstream
* Add FindQtOAuth.cmake to debian/kdepimlibs5-dev.install
* Document files we don't install in debian/NOT-INSTALLED
* Add new binary, libakonadi-socialutils4
  - Add to debian/control
  - Add to kdepimlibs metapackage depends
  - Add debian/libakonadi-socialutils4.install
  - Add debian/libakonadi-socialutils4.symbols 
* Update kdepimlibs5-dev.install for new headers for 4.10
* Add googletalkprotocol.desktop to debian/libakonadi-contact4.install
* Add missing symbols files for libakonadi-notes4 and libkalarmcal2
* Add dont_break_libkabc_abi.diff to fix ABI break - patch from José Manuel
  Santamaría Lema

Show diffs side-by-side

added added

removed removed

Lines of Context:
123
123
  ldif_out( t, QLatin1String( "postofficebox" ), workAddr.postOfficeBox() );
124
124
 
125
125
  QStringList streets = homeAddr.street().split( QLatin1Char( '\n' ) );
126
 
  const int numberOfStreets(streets.count());
 
126
  const int numberOfStreets( streets.count() );
127
127
  if ( numberOfStreets > 0 ) {
128
128
    ldif_out( t, QLatin1String( "homepostaladdress" ), streets[ 0 ] ); // Netscape 7
129
129
  }
237
237
        }
238
238
 
239
239
        if ( !a.formattedName().isEmpty() || !a.name().isEmpty() ||
240
 
          !a.familyName().isEmpty() ) {
 
240
             !a.familyName().isEmpty() ) {
241
241
          if ( !homeAddr.isEmpty() ) {
242
242
            a.insertAddress( homeAddr );
243
243
          }
402
402
    return true;
403
403
  }
404
404
 
405
 
  if ( fieldname == QLatin1String( "xmozillaanyphone" ) ) { // mozilla
 
405
  if ( fieldname == QLatin1String( "xmozillaanyphone" ) ) {  // mozilla
406
406
    a.insertPhoneNumber( PhoneNumber( value, PhoneNumber::Work ) );
407
407
    return true;
408
408
  }
409
409
 
410
410
  if ( fieldname == QLatin1String( "streethomeaddress" ) ||
411
 
       fieldname == QLatin1String( "mozillahomestreet" ) /*thunderbird*/ ) {
 
411
       fieldname == QLatin1String( "mozillahomestreet" ) ) {  // thunderbird
412
412
    homeAddr.setStreet( value );
413
413
    return true;
414
414
  }
415
415
 
416
 
  if ( fieldname == QLatin1String( "street" ) || fieldname == QLatin1String( "postaladdress" ) ) {  // mozilla
 
416
  if ( fieldname == QLatin1String( "street" ) ||
 
417
       fieldname == QLatin1String( "postaladdress" ) ) {  // mozilla
417
418
    workAddr.setStreet( value );
418
419
    return true;
419
420
  }
512
513
 
513
514
    QStringList::Iterator it;
514
515
    for ( it = list.begin(); it != list.end(); ++it ) {
515
 
      if ( (*it).startsWith( QLatin1String( "cn=" ) ) ) {
516
 
        name = (*it).mid( 3 ).trimmed();
 
516
      if ( ( *it ).startsWith( QLatin1String( "cn=" ) ) ) {
 
517
        name = ( *it ).mid( 3 ).trimmed();
517
518
      }
518
 
      if ( (*it).startsWith( QLatin1String( "mail=" ) ) ) {
519
 
        email = (*it).mid( 5 ).trimmed();
 
519
      if ( ( *it ).startsWith( QLatin1String( "mail=" ) ) ) {
 
520
        email = ( *it ).mid( 5 ).trimmed();
520
521
      }
521
522
    }
522
523
    if ( !name.isEmpty() && !email.isEmpty() ) {
555
556
    return true;
556
557
  }
557
558
 
558
 
  kWarning(5700) << QString::fromLatin1( "LDIFConverter: Unknown field for '%1': '%2=%3'\n" ).
 
559
  kWarning( 5700 ) << QString::fromLatin1( "LDIFConverter: Unknown field for '%1': '%2=%3'\n" ).
559
560
    arg( a.formattedName() ).arg( fieldname ).arg( value );
560
561
 
561
562
  return true;