core, add native helper functions for real locale aware sorting

Authored by hkaelberer on Feb 18 2016, 7:51 PM.

Description

core, add native helper functions for real locale aware sorting

String.localeCompare() does not sort alphabetically correct for all
locales. The following native functions can now be used for that:

ApplicationInfo::localeSort()
ApplicationInfo::localeCompare()

The default native implementation uses QCollator which is fine on
platforms that implement the ICU collation backend.

On Android QCollator uses only the posix backend as of Qt 5.5.1
is not capable of doing locale aware comparison. (cf.
https://bugreports.qt.io/browse/QTBUG-43637). Therefore we use native
Collation via jni. That works well for all locales supported by a
device and falls back to the Locale.getDefault() locale otherwise.

https://phabricator.kde.org/T1500

Details

Committed
hkaelbererFeb 18 2016, 8:00 PM
Parents
R2:c7c4effdf400: core, fix default spacing to 0
Branches
Unknown
Tags
Unknown