Add filter options menu to QuickFilterView and ComboQuickFilterView (#2230) - #3582
Add filter options menu to QuickFilterView and ComboQuickFilterView (#2230)#3582RealAhmedKhairi wants to merge 12 commits into
Conversation
b6937ea to
4bf8965
Compare
|
@wargio I have cleaned everything up. |
wargio
left a comment
There was a problem hiding this comment.
I feel like the code repeats itself, maybe this could go into a class? @notxvilka what do you think?
Agreed, See #3580 it moves the old duplicate logic in both to a new class |
4bf8965 to
22b6079
Compare
|
@PremadeS What do I have to do now? |
|
None of the options work, because there is no logic to handle case sensitive, exact match etc |
Keep it as it is, just make sure it works |
|
@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. |
22b6079 to
772df1e
Compare
faa6bc1 to
e3f5e62
Compare
4b0a0c1 to
6312258
Compare
|
@PremadeS I will start working on making CI green. |
1- Resolve conflicts and rebase apologies for the late reply, completely slipped my mind |
|
@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. |
6312258 to
8942cc8
Compare
cd3bd24 to
d47e9f8
Compare
8ab910f to
355f5c4
Compare
| virtual void closeFilter(); | ||
|
|
||
| signals: | ||
| void filterTextChanged(const QString &text); |
There was a problem hiding this comment.
You can remove the filterTextChanged signal now and only use filterChanged
Also you didn't update filters in XRefsDialog
355f5c4 to
0fbcc9a
Compare
| 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); |
There was a problem hiding this comment.
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"
| auto *optionsMenu = new QMenu(this); | ||
| caseSensitiveAction = optionsMenu->addAction(tr("&Case Sensitive")); | ||
| caseSensitiveAction->setCheckable(true); | ||
|
|
||
| wholeWordsAction = optionsMenu->addAction(tr("Exact Match")); | ||
| wholeWordsAction->setCheckable(true); |
There was a problem hiding this comment.
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"
* 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.
|
@PremadeS You got it. |
d59ccff to
bb23643
Compare
|
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. |

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
QuickFilterViewandComboQuickFilterViewwidgets as requested in #2230.I have read
SearchBarWidgetto 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 usingQLineEdit::addAction()as advised by one of the maintainers.Changes Made
src/widgets/QuickFilterView.h: Added member variables, new signal, and helper methodsrc/widgets/QuickFilterView.cpp: Implemented menu creation and filter logicsrc/widgets/ComboQuickFilterView.h: Same additions for consistencysrc/widgets/ComboQuickFilterView.cpp: Same implementation for consistencyReferences
Inspired by how
SearchBarWidgethandles filter optionsReferenced Qt documentation: https://doc.qt.io/qt-6/qlineedit.html#addAction
Uses
SearchOptionenum fromsrc/common/CutterSearchable.hCode follows Cutter's coding style guidelines
Test Plan
Open Cutter and load a binary
Verify the cog icon appears
Click the cog icon
Test toggling options
Verify filtering behavior
Test ComboQuickFilterView (widgets using combo box + filter)
ComboQuickFilterViewcloses #2230.