Bug 96082 - AddressFormat not used to display address
Summary: AddressFormat not used to display address
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kab3
Classification: Miscellaneous
Component: general (show other bugs)
Version: 3.3
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Tobias Koenig
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-31 18:01 UTC by Tom Albers
Modified: 2009-08-05 16:21 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Albers 2004-12-31 18:01:33 UTC
Version:           3.3 (using KDE 3.3.1,  (3.1))
Compiler:          gcc version 3.3.5 (Debian 1:3.3.5-2)
OS:                Linux (i686) release 2.6.5-1-k7

The dutch AddressFormat is set to:
AddressFormat=%n\n%0(%cm\n)%0(Postbus %p\n)%0(%s\n)%z%w%l
in the nl/entry.desktop.

The format used to display the zipcode part in the addressbook is wrong, the format used is: "city, zip", which should be "zip city". Hope this is fixable.
Comment 1 Tobias Koenig 2004-12-31 18:21:06 UTC
On Fri, Dec 31, 2004 at 05:01:34PM -0000, Tom Albers wrote:
Hi Tom,

> The format used to display the zipcode part in the addressbook is wrong,
> the format used is: "city, zip", which should be "zip city". Hope this is fixable.
You are aware that the country of the address has to be 'Netherlands' to
use the dutch format?

Ciao,
Tobias
Comment 2 Tobias Koenig 2005-01-06 15:57:55 UTC
CVS commit by tokoe: 

We can't use QString::startsWith() here, because 'Netherlands' != 'Netherlands Antilles' ;)

CCMAIL:96082-done@bugs.kde.org


  M +4 -5      address.cpp   1.29


--- kdelibs/kabc/address.cpp  #1.28:1.29
@@ -528,10 +528,9 @@ QString Address::countryToISO( const QSt
     QString strbuf = s.readLine();
     while( !strbuf.isNull() ) {
-      if ( strbuf.startsWith( cname ) ) {
-        int index = strbuf.findRev('\t');
-        strbuf = strbuf.mid(index+1, 2);
+      QStringList countryInfo = QStringList::split( '\t', strbuf, true );
+      if ( countryInfo[ 0 ] == cname ) {
         file.close();
-        mISOMap->insert( cname, strbuf );
-        return strbuf;
+        mISOMap->insert( cname, countryInfo[ 1 ] );
+        return countryInfo[ 1 ];
       }
       strbuf = s.readLine();


Comment 3 Tom Albers 2005-01-06 20:53:41 UTC
Thanks for fixing! I only agree to 'Netherlands' != 'Netherlands Antilles' in this context though ;-)
Comment 4 Tobias Koenig 2009-08-05 16:21:03 UTC
The development of the old KAddressBook will be discontinued for KDE 4.4.
Since the new application has the same name, but a completly new code base we close all bug reports against the old version and ask the submitters to resend there reports against the new product.