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

Revamp searching in the file browser #7679

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

sakertooth
Copy link
Contributor

This PR revamps the search functionality within the file browser, with the intent of improving the code and user experience.

Changes:

  • The work of searching through the filesystem has been moved back onto the main thread. Since this is a blocking operation, we process Qt events asynchronously while searching. This reduces a lot of the complexity involved in the search code as there is no need for any extra thread or a Qt signal/slot connection, while still keeping the application running smooth.
    • Consequently, FileSearch was removed.
  • Search results are no longer shown in a hierarchy, but instead as a flat list, with only the found directories being hierarchical. This aligns better with most file managers and greatly simplifies the search code (no need to convolute things by attempting to build a hierarchy). Since only the name of the directory or file that matches the filter is shown, path information has been added to the context menu for both items (as well as an "Open" and "Close" action for directory items).
  • Searching no longer considers extensions. This is because extensions have no bearing on what kind of file a file is. This should open doors to allow finding for esoteric files that have unusual extensions but are perfectly working as they should, or files that are perfectly supported but have an odd extension.
  • Searching now follows symlinks.
  • Searching now supports finding hidden files if the "Hidden content" checkbox is enabled.

@sakertooth
Copy link
Contributor Author

For some reason while searching, there is a segfault when closing the program. Doesn't seem to be a concern, but unsure why this happens.

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.

1 participant