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

Add buttons to select/check files based on filter #20698

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ColinKinloch
Copy link

This makes it easy to mark a subset of a deep directory structure of files for download.

If I want to download all the qBittorrent source code apart from the header files:

Filter by *.h and select all that match Mark them to not be downloaded
Screenshot from 2024-04-14 00-44-43 Screenshot from 2024-04-14 00-44-57

This needs some UX work to avoid confusion:
Select All/None mark files for download.
"Select Selected" does the same for the selected items.
"Check all" would imply verifying (rechecking) the downloads.
Maybe "Highlight Matched" and "Select Highlighted" would be better.
Maybe "Select All" should become "Mark All".

@thalieht
Copy link
Contributor

IMO there is no need for the extra buttons. Select all/none should apply to whatever has passed the filter.
That's my opinion you should wait for others too.

@xavier2k6
Copy link
Member

xavier2k6 commented Apr 14, 2024

Why don't you just put the *.h in the file exclusion list???

Screenshot 2024-04-14 144425

@ColinKinloch
Copy link
Author

@xavier2k6
I can see that option under "Downloads" preferences panel.
Is there a way to apply that to a specific torrent?

@xavier2k6
Copy link
Member

Is there a way to apply that to a specific torrent?

Not that I'm aware of.

@ColinKinloch
Copy link
Author

I just had a quick look:

  • What's the use-case for the global blocklist? I'm thinking something like *.exe for security purposes.
  • Is there/should there be some indication that a file is not downloading due to the global blocklist?

@stalkerok
Copy link
Contributor

IMO there is no need for the extra buttons. Select all/none should apply to whatever has passed the filter.

The current implementation would be more versatile:
Don't have to reset the filter to select all/none.
Can select files with a certain extension to give them a different download priority.

@stalkerok
Copy link
Contributor

The select matches button works strangely, as if it doesn't select anything. When trying to set a different priority to the selected files, it applies only to the one I clicked on myself.

@ColinKinloch
Copy link
Author

ColinKinloch commented Apr 16, 2024

The select matches button works strangely

Ah, one thing that I found confusing writing this change selectionModel()->selectedRows(0) wouldn't contain anything when selected via selectionModel()->select(...), instead I had to use selectionModel()->selectedIndexes().

The select and deselect buttons seem to act as expected on mouse selected items.

One solution would be to change the other instances of selectedRows(0) to selectedIndexes().

Anyone with a good understanding of QTreeViews and an opinion?

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

Successfully merging this pull request may close these issues.

None yet

4 participants