Bug 465292 - "Country" field in a location cannot be filled in with non-preset entries
Summary: "Country" field in a location cannot be filled in with non-preset entries
Status: REPORTED
Alias: None
Product: kaddressbook
Classification: Applications
Component: general (show other bugs)
Version: 5.22.1
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-04 21:27 UTC by tusooa
Modified: 2023-02-05 15:27 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tusooa 2023-02-04 21:27:17 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***
The Country entry seems to be limited to a preset, and nothing beyond that can be displayed.

STEPS TO REPRODUCE
1. Open KAddressBook, edit a contact, switch to Location tab
2. Fill in "Country" with "Sealand" while fill in everything else with "x"
3. Add address

OBSERVED RESULT
The country shown on the right is "CANADA."

EXPECTED RESULT
The country shown on the right should be "SEALAND."

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 6.1.6 / 5.26.5
(available in About System)
KDE Plasma Version: 5.26.5
KDE Frameworks Version: 5.102.0
Qt Version: 5.15.8

ADDITIONAL INFORMATION
Comment 1 Laurent Montel 2023-02-05 14:26:45 UTC
Hi,
Why do you want to add no existing country ?
Regards
Comment 2 tusooa 2023-02-05 14:33:04 UTC
(In reply to Laurent Montel from comment #1)
> Hi,
> Why do you want to add no existing country ?
> Regards

(1) Sealand *is* an existing country ( https://en.wikipedia.org/wiki/Principality_of_Sealand )
(2) New countries may be created over time, and the software should not need an update to use them.
(3) Countries not well recognized or has controversial states exist. People may want to use that name to respect the views of people living there. In some cases, they are oppressed people who need to get their voice heard.
(4) Having a hardcoded list for no reason is not reasonable.
Comment 3 Laurent Montel 2023-02-05 15:08:25 UTC
We use kcountry.h 

 *  @class KCountry kcountry.h <KCountry>
 *
 *  Information about an ISO 3166-1 country.

it uses official iso3166-1 country list.
Comment 4 tusooa 2023-02-05 15:27:24 UTC
(In reply to Laurent Montel from comment #3)
> We use kcountry.h 
> 
>  *  @class KCountry kcountry.h <KCountry>
>  *
>  *  Information about an ISO 3166-1 country.
> 
> it uses official iso3166-1 country list.

It would be reasonable to "fall back to what it is" when it doesn't match anything in the list.