[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kdepimlibs/KDE/4.9] kabc: Fix Bug 280997 - ldif importer does not import home street
From:       Montel Laurent <montel () kde ! org>
Date:       2012-07-03 8:04:14
Message-ID: 20120703080414.9020DA60A6 () git ! kde ! org
[Download RAW message or body]

Git commit ce8e1f5b35c0a99311d885771c53a57db87b0c0e by Montel Laurent.
Committed on 03/07/2012 at 10:03.
Pushed by mlaurent into branch 'KDE/4.9'.

Fix Bug 280997 - ldif importer does not import home street

FIXED-IN: 4.9
BUG: 280997

M  +5    -3    kabc/ldifconverter.cpp

http://commits.kde.org/kdepimlibs/ce8e1f5b35c0a99311d885771c53a57db87b0c0e

diff --git a/kabc/ldifconverter.cpp b/kabc/ldifconverter.cpp
index b425ce2..fd1421b 100644
--- a/kabc/ldifconverter.cpp
+++ b/kabc/ldifconverter.cpp
@@ -123,10 +123,11 @@ bool LDIFConverter::addresseeToLDIF( const Addressee &addr, QString &str )
   ldif_out( t, QLatin1String( "postofficebox" ), workAddr.postOfficeBox() );
 
   QStringList streets = homeAddr.street().split( QLatin1Char( '\n' ) );
-  if ( streets.count() > 0 ) {
+  const int numberOfStreets(streets.count());
+  if ( numberOfStreets > 0 ) {
     ldif_out( t, QLatin1String( "homepostaladdress" ), streets[ 0 ] ); // Netscape 7
   }
-  if ( streets.count() > 1 ) {
+  if ( numberOfStreets > 1 ) {
     ldif_out( t, QLatin1String( "mozillahomepostaladdress2" ), streets[ 1 ] ); // Netscape 7
   }
   ldif_out( t, QLatin1String( "mozillahomelocalityname" ), homeAddr.locality() ); // Netscape 7
@@ -407,7 +408,8 @@ addComment:
   }
 
   if ( fieldname == QLatin1String( "street" ) ||
-       fieldname == QLatin1String( "streethomeaddress" ) ) {
+       fieldname == QLatin1String( "streethomeaddress" ) ||
+       fieldname == QLatin1String( "mozillahomestreet" ) /*thunderbird*/ ) {
     homeAddr.setStreet( value );
     return true;
   }
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic