Skip to content

Add filter options menu to QuickFilterView and ComboQuickFilterView (#2230) - #3582

Open
RealAhmedKhairi wants to merge 12 commits into
rizinorg:devfrom
RealAhmedKhairi:issue2230
Open

Add filter options menu to QuickFilterView and ComboQuickFilterView (#2230)#3582
RealAhmedKhairi wants to merge 12 commits into
rizinorg:devfrom
RealAhmedKhairi:issue2230

Conversation

@RealAhmedKhairi

@RealAhmedKhairi RealAhmedKhairi commented Mar 21, 2026

Copy link
Copy Markdown
  • I've read the guidelines for contributing to this repository

  • I made sure to follow the project's coding style

  • I've used AI tools to generate fully or partially these code changes and I'm sure the changes are not copyrighted by somebody else.

  • I've updated the documentation with the relevant information (if needed)

Detailed description
Previously, there was no way to filter quick searches. Users had no menu to toggle certain settings when searching. I have added this menu in QuickFilterView and ComboQuickFilterView widgets as requested in #2230.
I have read SearchBarWidget to understand the requirements of the issue and started working right after, The menu I have created is a line-edit menu instead of creating a separate button. I have achieved this using QLineEdit::addAction() as advised by one of the maintainers.

Changes Made

  • src/widgets/QuickFilterView.h: Added member variables, new signal, and helper method
  • src/widgets/QuickFilterView.cpp: Implemented menu creation and filter logic
  • src/widgets/ComboQuickFilterView.h: Same additions for consistency
  • src/widgets/ComboQuickFilterView.cpp: Same implementation for consistency

References

Test Plan

  1. Open Cutter and load a binary

  2. Verify the cog icon appears

    • Look for a small cog/settings icon on the LEFT side of the filter text input
    • The icon should be inside the line-edit, not outside
  3. Click the cog icon

    • A dropdown menu should appear with 3 options:
      • ☐ Case Sensitive
      • ☐ Exact Match
      • ☐ Regular Expression
  4. Test toggling options

    • Click each option to toggle the checkbox
    • Verify the checkbox state changes visually
    • Try typing in the filter while options are toggled
  5. Verify filtering behavior

    • With "Case Sensitive" checked: searches should be case-sensitive
    • With "Exact Match" checked: only exact matches should be found
    • With "Regular Expression" checked: search should accept regex patterns
  6. Test ComboQuickFilterView (widgets using combo box + filter)

    • Repeat steps 2-6 for any widget using ComboQuickFilterView
    • Verify same menu behavior

case_sensetive
exact_match
regular_expression

closes #2230.

@wargio wargio left a comment

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.

you added a lot of useless files. there are even binaries. this is not ok

please follow the instructions on how to build cutter and dont commit llm/ai nonsense

@notxvilka notxvilka added the Requirements not met The PR doesn't meet the minimum contribution requirements. See CONTRIBUTING.md for details. label Mar 21, 2026
@RealAhmedKhairi

Copy link
Copy Markdown
Author

@wargio I have cleaned everything up.

Comment thread src/widgets/ComboQuickFilterView.cpp Outdated
Comment thread src/widgets/QuickFilterView.cpp Outdated

@wargio wargio left a comment

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.

I feel like the code repeats itself, maybe this could go into a class? @notxvilka what do you think?

@PremadeS

Copy link
Copy Markdown
Collaborator

I feel like the code repeats itself, maybe this could go into a class?

Agreed, See #3580 it moves the old duplicate logic in both to a new class

@RealAhmedKhairi

RealAhmedKhairi commented Mar 27, 2026

Copy link
Copy Markdown
Author

@PremadeS What do I have to do now?

@PremadeS

PremadeS commented Mar 30, 2026

Copy link
Copy Markdown
Collaborator

None of the options work, because there is no logic to handle case sensitive, exact match etc
Please test the PR fully before committing

@PremadeS PremadeS left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

^

@PremadeS

Copy link
Copy Markdown
Collaborator

@PremadeS What do I have to do now?

Keep it as it is, just make sure it works

@RealAhmedKhairi

Copy link
Copy Markdown
Author

@PremadeS I am sorry, I have been a little busy with my college midterms. I will start working on the functionality as soon as possible.

Comment thread build-output.txt Outdated
Comment thread src/common/CutterSearchable.cpp Outdated
Comment thread src/common/CutterSearchable.cpp Outdated
@RealAhmedKhairi
RealAhmedKhairi force-pushed the issue2230 branch 2 times, most recently from faa6bc1 to e3f5e62 Compare April 6, 2026 05:51
@PremadeS

PremadeS commented Apr 7, 2026

Copy link
Copy Markdown
Collaborator

Filter doesn't update according to text unless any option is changed
Also the item count is not working properly
filter-issue

@RealAhmedKhairi

Copy link
Copy Markdown
Author

@PremadeS I will start working on making CI green.

@PremadeS

Copy link
Copy Markdown
Collaborator

@PremadeS I will start working on making CI green.

It's most likely failing due to #3600

@RealAhmedKhairi

Copy link
Copy Markdown
Author

@PremadeS Should I wait until #3600 is merged?

@RealAhmedKhairi

Copy link
Copy Markdown
Author

@PremadeS Hi! Can we do anything to finish this pull request since #3600 was merged.

@notxvilka

Copy link
Copy Markdown
Contributor

@PremadeS Hi! Can we do anything to finish this pull request since #3600 was merged.

You need to rebase the PR first - see there are some conflicts.

@PremadeS

Copy link
Copy Markdown
Collaborator

@PremadeS Hi! Can we do anything to finish this pull request since #3600 was merged.

1- Resolve conflicts and rebase
2- QuickFilterView and ComboQuickFilterView now inherit from AbstractFilterView due to changes made by #3580 meaning it would be better to put the duplicate logic from both classes in AbstractFilterView

apologies for the late reply, completely slipped my mind

@RealAhmedKhairi

Copy link
Copy Markdown
Author

@PremadeS It is okay, I am currently juggling multiple projects at college and will be done by Thursday, thanks for replying and I will surely start working on this PR as soon as I can.

@RealAhmedKhairi
RealAhmedKhairi force-pushed the issue2230 branch 5 times, most recently from cd3bd24 to d47e9f8 Compare June 20, 2026 11:54
@RealAhmedKhairi
RealAhmedKhairi force-pushed the issue2230 branch 7 times, most recently from 8ab910f to 355f5c4 Compare June 24, 2026 13:13
Comment thread src/widgets/AbstractFilterView.h Outdated
virtual void closeFilter();

signals:
void filterTextChanged(const QString &text);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

You can remove the filterTextChanged signal now and only use filterChanged

Also you didn't update filters in XRefsDialog

@PremadeS PremadeS left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Almost there :)

Just a few minor additions and then it's ready to be merged

Comment on lines +14 to +22
auto *optionsMenu = new QMenu(this);
caseSensitiveAction = optionsMenu->addAction(tr("&Case Sensitive"));
caseSensitiveAction->setCheckable(true);

wholeWordsAction = optionsMenu->addAction(tr("Exact Match"));
wholeWordsAction->setCheckable(true);

regexAction = optionsMenu->addAction(tr("Regular Expression"));
regexAction->setCheckable(true);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

If you're going to use the "&" shortcut then you should use them for all three actions, currently it's only being used on "Case sensitive" action

Also, there should be a shortcut key in my opinion that opens the actions menu. Default shortcuts are defined in "shortcuts/DefaultShortcuts.cpp"

Comment on lines +14 to +19
auto *optionsMenu = new QMenu(this);
caseSensitiveAction = optionsMenu->addAction(tr("&Case Sensitive"));
caseSensitiveAction->setCheckable(true);

wholeWordsAction = optionsMenu->addAction(tr("Exact Match"));
wholeWordsAction->setCheckable(true);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This works, but in my opinion there should be options in "Edit->Preferences->Interface" under the "Quick Filter" tab for these three things:

  • Use case sensitive by default
  • Match whole words by default
  • Use regex by default

User preference should be saved, just so that if a user always prefers case sensitive search they don't have to manually change it each time cutter is opened

The actions will be added/handled in "InterfaceOptionsWidget"

PremadeS and others added 9 commits June 26, 2026 15:46
* Add option to rename a type
* Add option to view and set type class for a type
* Fix type usages not being shown
* Fix Double clicking on type usage not showing memory widget
Co-authored-by: Anton Kochkov <anton.kochkov@gmail.com>
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 4 to 8.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](actions/download-artifact@v4...v8)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: '8'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Fix namespace alias DH conflict with OpenSSL typedef

OpenSSL 3.x includes openssl/types.h (via openssl/bn.h pulled in
transitively through rizin headers) which declares:

    typedef struct dh_st DH;

This conflicts with the namespace alias:

    namespace DH = DisassemblyHelper;

The C++ standard does not allow a namespace alias and a typedef to
share the same identifier in the same declarative region. The compiler
resolves DH as the OpenSSL struct, causing build failures when using
rizin built with SSL support.

Rename the alias from DH to DisHlp to eliminate the collision.
@RealAhmedKhairi

Copy link
Copy Markdown
Author

@PremadeS You got it.

@RealAhmedKhairi

Copy link
Copy Markdown
Author

To test the new change: Navigate to Edit -> Preferences -> Interface and choose your preferred default search approaches under the Quick Filter section. The next time you use a search bar, your chosen defaults will automatically be checked in the menu and applied to the search.

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

Labels

Requirements not met The PR doesn't meet the minimum contribution requirements. See CONTRIBUTING.md for details.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make sure all the filter-supported widgets are searching with case insensitivity

6 participants