~ubuntu-branches/ubuntu/raring/kdepimlibs/raring

« back to all changes in this revision

Viewing changes to kabc/ldifconverter.cpp

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2012-07-26 17:13:11 UTC
  • mfrom: (1.1.81)
  • Revision ID: package-import@ubuntu.com-20120726171311-j2heoxylb6lbhg4w
Tags: 4:4.9.0-0ubuntu1
* New upstream release
* Use direct build-depends versions rather than kde-sc-dev-latest

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
 
  if ( streets.count() > 0 ) {
 
126
  const int numberOfStreets(streets.count());
 
127
  if ( numberOfStreets > 0 ) {
127
128
    ldif_out( t, QLatin1String( "homepostaladdress" ), streets[ 0 ] ); // Netscape 7
128
129
  }
129
 
  if ( streets.count() > 1 ) {
 
130
  if ( numberOfStreets > 1 ) {
130
131
    ldif_out( t, QLatin1String( "mozillahomepostaladdress2" ), streets[ 1 ] ); // Netscape 7
131
132
  }
132
133
  ldif_out( t, QLatin1String( "mozillahomelocalityname" ), homeAddr.locality() ); // Netscape 7
406
407
    return true;
407
408
  }
408
409
 
409
 
  if ( fieldname == QLatin1String( "street" ) ||
410
 
       fieldname == QLatin1String( "streethomeaddress" ) ) {
 
410
  if ( fieldname == QLatin1String( "streethomeaddress" ) ||
 
411
       fieldname == QLatin1String( "mozillahomestreet" ) /*thunderbird*/ ) {
411
412
    homeAddr.setStreet( value );
412
413
    return true;
413
414
  }
414
415
 
415
 
  if ( fieldname == QLatin1String( "postaladdress" ) ) {  // mozilla
 
416
  if ( fieldname == QLatin1String( "street" ) || fieldname == QLatin1String( "postaladdress" ) ) {  // mozilla
416
417
    workAddr.setStreet( value );
417
418
    return true;
418
419
  }