[Bug 255398] KAddressbook shows names in wrong order
nebuchadnezzar_2069 at gmx.de
nebuchadnezzar_2069 at gmx.de
Tue Jan 4 14:02:20 GMT 2011
https://bugs.kde.org/show_bug.cgi?id=255398
--- Comment #5 from <nebuchadnezzar_2069 gmx de> 2011-01-04 15:02:18 ---
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().
--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the Kdepim-bugs
mailing list