[PATCH] Add a "sort role" for sorting the dive list

Linus Torvalds torvalds at linux-foundation.org
Wed May 29 13:59:36 PDT 2013


On Thu, May 30, 2013 at 5:50 AM, Linus Torvalds
<torvalds at linux-foundation.org> wrote:
>
> Hmm. Tomaz' code ends up disabling sorting entirely, so now my patch
> doesn't seem to matter any more. I'm not exactly sure why sorting got
> disabled, maybe it's a side effect of catching that "header-clicked"
> event, and thus the default sorting action never happens. Tomaz
> probably knows. Tomaz?

Confirmed. Commit c6f84de37c33 ("Adds the code to make the dive list
behave like tree or list") explicitly disables sorting with
"setSortingEnabled(false)", but if you remove that, the sorting still
works.

However, commit 4019fdaa24eb ("Switch between Tree / list on column -
click") that takes over the header click *really* disables sorting -
removing the setSortingEnabled(false) no longer makes any difference.

So taking over the header click to determine whether to do list or
tree view also means that apparently now the header click never gets
to the "do sorting".

I don't know enough about Qt to know how to pass the header click
event through, and make it also do the sort thing..

            Linus


More information about the subsurface mailing list