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

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

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

Fix Bug 280997 - ldif importer does not import home street

FIXED-IN: 4.9
BUG: 280997
(cherry picked from commit ce8e1f5b35c0a99311d885771c53a57db87b0c0e)

M  +5    -3    kabc/ldifconverter.cpp

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

diff --git a/kabc/ldifconverter.cpp b/kabc/ldifconverter.cpp
index c4d3d8e..1622619 100644
--- a/kabc/ldifconverter.cpp
+++ b/kabc/ldifconverter.cpp
@@ -122,10 +122,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
@@ -405,7 +406,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