kcm_formats: Fix sorting order and formatting in combo boxes

Review Request #125957 - Created Nov. 5, 2015 and submitted

Jonathan Marten

See the referenced bug. The country lists in the dropdown combo boxes are not sorted alphabetically, but countries without an associated language come first and have a spurious hyphen and space.

This patch fixes the comparison function countryLessThan() to fall back to the country name if there is no native country name, as happens at the top of KCMFormats::addLocaleToCombo(). It also ensures that the "Default (C)" locale appears at the top of the list so that it does not get buried way down the list.

Built plasma-desktop/kcms/formats with this change, checked appearance and operation of 'kcmshell5 formats'.

David Edmundson
Jonathan Marten
Review request changed

Status: Closed (submitted)

Change Summary:

Submitted with commit 4e033cdabfb876d75d5a8e08c74259559f9e38be by Jonathan Marten to branch master.