Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tribler separates capital and not capital letters while sorting by name #6721

Closed
kotenok2000 opened this issue Jan 13, 2022 · 5 comments · Fixed by #6726
Closed

Tribler separates capital and not capital letters while sorting by name #6721

kotenok2000 opened this issue Jan 13, 2022 · 5 comments · Fixed by #6726

Comments

@kotenok2000
Copy link

Describe the bug
Tribler separates
To Reproduce
Steps to reproduce the behavior:

  1. Go to discovered channels
  2. Click on Name to sort by name
  3. Scroll down
  4. See that tribler separates channels with name beginning with capital letter from channels with not capital letter.

Expected behavior
Tribler treats capital and not capital letter the same.
Screenshots
If applicable, add screenshots to help explain your problem.
Снимок экрана (108)

Desktop (please complete the following information):

  • OS: Windows 11
  • Tribler's version 7.11.0

Additional context
Add any other context about the problem here.

@devos50
Copy link
Contributor

devos50 commented Jan 14, 2022

Great find, thanks for reporting! We will have a look at it 👍

@devos50
Copy link
Contributor

devos50 commented Jan 14, 2022

This seems to be possible by using a QSortFilterProxyModel, and by adding proxy_model.setSortCaseSensitivity(Qt.CaseInsensitive). The problem, however, is that we need to set this proxy model as the main model in TriblerTableViewController. The proxy model, however, does not have the attributes that the original model exposed (e.g., data_items) and we have to replace calls to self.model() with self.model().sourceModel(). This can be error prone since not all table logic is covered by the GUI tests.

@ichorid
Copy link
Contributor

ichorid commented Jan 14, 2022

The sorting is done by Channels endpoint only. So, it should be fixed in SQL queries on the Core side.

@devos50
Copy link
Contributor

devos50 commented Jan 14, 2022

Ah, I missed the server-side sorting part, thanks 👍

@kotenok2000
Copy link
Author

Can you look at this issue too?
#6712

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

3 participants