Skip to content

Fix missing entires when searching in the file browser#8320

Draft
sakertooth wants to merge 2 commits into
LMMS:masterfrom
sakertooth:fix-search-missing-entries
Draft

Fix missing entires when searching in the file browser#8320
sakertooth wants to merge 2 commits into
LMMS:masterfrom
sakertooth:fix-search-missing-entries

Conversation

@sakertooth
Copy link
Copy Markdown
Contributor

@sakertooth sakertooth commented Mar 23, 2026

Fixes some bugs with the search.

Changes:

  1. The root directories are now included in the search rather than just their subdirectories.
  2. "Hidden content" now works for searches (hidden entries were always listed before)
  3. Enforce the possible directory filters used in the search (i.e., the option to specify directory filters in FileSearchJob::Task has been removed).

Future:
There were a couple of bugs I ran into while writing this PR. One of them I already reported on the tracker (see #8319). There is also another subtle issue where in the favorite browser, if you have two entries "folder_a/folder_b" and "folder_b" (which is in "folder_a"), duplicate search results will appear. Instead, "folder_b" should only be searched recursively once. This is something I might fix in here later or another PR (or maybe because of performance reasons I'll just leave it for now).

Comment thread src/gui/FileSearchJob.cpp
@messmerd messmerd added the bug label May 2, 2026
Comment thread src/gui/FileSearchJob.cpp
emit finished();
}

bool FileSearchJob::validEntry(QString entry, QStringList tokens, QStringList extensions)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
bool FileSearchJob::validEntry(QString entry, QStringList tokens, QStringList extensions)
bool FileSearchJob::validEntry(const QString& entry, const QStringList& tokens, const QStringList& extensions)

Comment thread include/FileSearchJob.h

private:
void runSearch(Task task);
bool validEntry(QString entry, QStringList tokens, QStringList extensions);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
bool validEntry(QString entry, QStringList tokens, QStringList extensions);
bool validEntry(const QString& entry, const QStringList& tokens, const QStringList& extensions);

@sakertooth sakertooth marked this pull request as draft May 4, 2026 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants