At home page, Assets and Liabilities Summary section, accounts are not sorted correctly when the first letter is not in ASCII. Reproducible: Always Steps to Reproduce: 1. Create accounts: A, Z, C, Č 2. Accounts page: accounts are in correect order: A, C, Č, Z 2. Home page: accounts are in wrong order: A, C, Z, Č Expected Results: Accounts at Home page should be in correct alphabetical order (respecting locale settings and wierd characters). strcmp() in sorting function does not work, strcoll is much better.
Since we use Qt you mean QString::localeAwareCompare()
Git commit e212103d46f3b4a5b37f4c94ebd8b3271993abd1 by Cristian Oneț. Committed on 25/05/2014 at 14:07. Pushed by conet into branch 'master'. Account ordering by name on the home page is now locale aware. Since QMap does not allow setting the comparator function for each instance of the map (qMapLessThanKey is for the whole class) we droped using it just to obtain a collection ordered by the account name. Use an account list instead and sort it using the proper comparator before rendering it. M +29 -48 kmymoney/views/khomeview.cpp http://commits.kde.org/kmymoney/e212103d46f3b4a5b37f4c94ebd8b3271993abd1
Thank you!
(In reply to comment #3) > Thank you! You're welcome.
I was about to file a similar bug based on a mailing list request some weeks ago, but I'm not sure if it's the same issue. This bug referred to usign non-ASCII characters, but my case is completely within US English, so locale should not be an issue. On the accounts page, the order is "Checking One" "CHECKING ONE" "CHECKING TWO" but on the home page, it is "CHECKING ONE" "CHECKING TWO" "Checking One". The original complaint on the mailing list was about the difference between the home page and any dropdown with a list of accounts, but I suspect it's the same issue. I just tried KMM compiled from git, and I still see the issue. Is this a separate bug, or might I have a configuration issue?
(In reply to comment #5) > I was about to file a similar bug based on a mailing list request some weeks > ago, but I'm not sure if it's the same issue. This bug referred to usign > non-ASCII characters, but my case is completely within US English, so locale > should not be an issue. On the accounts page, the order is "Checking One" > "CHECKING ONE" "CHECKING TWO" but on the home page, it is "CHECKING ONE" > "CHECKING TWO" "Checking One". your problem should be caused by the compare method as well. As in non-local aware comparison only the ASCII (or UTF-8) values are compared and so any lowercase letter is behind all uppercase letters ( ddg.gg/?q=ascii+table ). Btw: you should always use local aware comparison where the user expects a human sorting method, also in english-only texts. This ensures correct sorting of special chars as well (plain ASCII sort would generate this list: "!6;A]z}", but no human would expect that).
(In reply to comment #5) > I was about to file a similar bug based on a mailing list request some weeks > ago, but I'm not sure if it's the same issue. This bug referred to usign > non-ASCII characters, but my case is completely within US English, so locale > should not be an issue. On the accounts page, the order is "Checking One" > "CHECKING ONE" "CHECKING TWO" but on the home page, it is "CHECKING ONE" > "CHECKING TWO" "Checking One". The original complaint on the mailing list > was about the difference between the home page and any dropdown with a list > of accounts, but I suspect it's the same issue. I just tried KMM compiled > from git, and I still see the issue. Is this a separate bug, or might I > have a configuration issue? Jack, I think there is something wrong in the version that you tested this, are you sure that the patch that fixes this issue is contained? I'm asking because I'm not seeing what you report. On the homepage I see "Checking One" "CHECKING ONE" "CHECKING TWO" the same goes for the accounts and any drop-down that shows accounts. The only place I still see this issue is in reports.
Created attachment 87117 [details] Sorting in the home page.
Created attachment 87118 [details] Sorting in the accounts view.
(In reply to comment #7) I will try again, but it may be a few days. I'm pretty sure my last test was from git Master, so it sounds like the patch SHOULD be there. I'll try to confirm for sure when I get to test again. It's certanly possible I wasn't using the source I thought I was.