-
Notifications
You must be signed in to change notification settings - Fork 256
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
feat: support regex search #676
base: master
Are you sure you want to change the base?
Conversation
61eeef7
to
a1fe6f0
Compare
That's a nice implementation! The tooltip also helps for documentation purposes (I'm still not sure if there should be a note on that in the README as well). |
a1fe6f0
to
593437c
Compare
593437c
to
11834c4
Compare
Since we use QSortFilterProxyModel we get this for free. This patch adds support for regex search by not escaping the search term if it is prefix with %. For the flamegraph there is a custom implementation, which changes the current QString::contains to a QRegularExpression::match call. Closes: #666
11834c4
to
888c1bc
Compare
{ | ||
SearchResults result; | ||
if (searchValue.isEmpty()) { | ||
if (expression.pattern().isEmpty()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if this should be !expression.isValid() || expression.pattern().isEmpty()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if it isn't valid we should not get here, at least not when executed from the UI (the function could possibly assert
that or do an early-exit for the invalid expression)
Since we use QSortFilterProxyModel we get this for free. This patch adds support for regex search by not escaping the search term if it is prefix with %.
For the flamegraph there is a custom implementation, which changes the current QString::contains to a QRegularExpression::match call.
Closes: #666