Summary: | KAddressbook shows names in wrong order | ||
---|---|---|---|
Product: | [Applications] kaddressbook | Reporter: | nebuchadnezzar_2069 |
Component: | general | Assignee: | kdepim bugs <kdepim-bugs> |
Status: | RESOLVED UPSTREAM | ||
Severity: | normal | CC: | hr.denzler, tokoe |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
nebuchadnezzar_2069
2010-10-27 13:57:56 UTC
Have you clicked the name header twice ? In my case at startup the names are unsorted. Sure. Have you tried to reproduce with the names i wrote above? As I said, it must be in the sort-algorithm, that doesn't care about commas and spaces. Hej, we use the QString::compareLocaleAware() here. If you have the feeling that this sorting is wrong, please file a bug on the Qt bug tracker. Ciao, Tobias I did that. It is now listed under: http://bugreports.qt.nokia.com/browse/QTBUG-16398 Btw: The function is called localeAwareCompare() not compareLocaleAware(). OK, now I have tested out the localeAwareCompare(). If you compare "Smithers, Eve" with "Smith, Eve" and "Smithers, Eve" with "Smith, Adam" like this: [code] #include <iostream> #include <QString> int main(int argc, char* argv[]) { if ( QString::localeAwareCompare("Smithers, Eve", "Smith, Eve") < 0 ) std::cout << "1. Smithers, Eve\n2. Smith, Eve" << std::endl; else std::cout << "1. Smith, Eve\n2. Smithers, Eve" << std::endl; std::cout << "---" << std::endl; if ( QString::localeAwareCompare("Smithers, Eve", "Smith, Adam") < 0 ) std::cout << "1. Smithers, Eve\n2. Smith, Adam" << std::endl; else std::cout << "1. Smith, Adam\n2. Smithers, Eve" << std::endl; } [/code] it outputs: 1. Smith, Eve 2. Smithers, Eve --- 1. Smith, Adam 2. Smithers, Eve So both Smith's come before Mrs. Smithers. Use the same names in KAddressbook and and it will sorted like this: 1. Smith, Adam 2. Smithers, Eve 3. Smith, Eve So the issue cannot be in localeAwareCompare(). |