Conversation
|
|
||
| // Short circuit if we failed to match or we matched and are excluding this term | ||
| if (!found || term->exclude) { | ||
| return false; |
There was a problem hiding this comment.
Shouldn't this be a continue instead? It is into a for and returning here will skip all next term in the for if the current is excluded
There was a problem hiding this comment.
It is a short circuit because this function only returns true if all the terms match this particular entry (implicit AND of terms).
I like this idea ;-) Looking forward to reusing this for #1769 |
|
Right, forgot about that, lemme extract the wildcard scrub and regex builder into the tools class |
f6d24da to
b0a8551
Compare
|
Sounds like exactly what was a deal-maker for me to start using KeePassXC, that it doesn't currently match a lot of sites despite similarities in the name and URL. +1 |
b0a8551 to
524607b
Compare
524607b to
c7ffcda
Compare
c7ffcda to
1734a3f
Compare
665000a to
6cad130
Compare
6cad130 to
3b993ef
Compare
|
Going to make a couple additions and then it will be ready |
|
@droidmonkey Great work this is very useful tested it and it seem to work as expected... |
3b993ef to
99cfe23
Compare
|
Amazing indeed... that will be useful to remember the syntax |
|
Despicable. 😉 |
|
Oh, and could you perhaps make a generic help pop-up widget of it? We could use that in other parts as well. |
08fecf3 to
cfdac14
Compare
phoerious
left a comment
There was a problem hiding this comment.
Two minor nitpicks, rest looks great.
* Remove searching of group title and notes * End search when selecting a new group * Correct entry searcher tests to align with new code
* Support quoted strings & per-field searching * Support regex and exact matching * Simplify search sequence * Make search widget larger * Add regex converter to Tools namespace
* Support ! modifier (same as '-') * Create reusable PopupHelpWidget as self-contained popup that can be positioned around a parent widget and will follow the movement and sizing of the window * Eliminated KEEPASSXC_MAIN_WINDOW macro and replaced with getMainWindow() function * Add tests to cover search help show/hide
fc090b2 to
880c3ae
Compare
|
Done, and fixed the wording on the help popup, made background white, and fixed the border. Also squashed commits. |
- New Database Wizard [#1952] - Advanced Search [#1797] - Automatic update checker [#2648] - KeeShare database synchronization [#2109, #1992, #2738, #2742, #2746, #2739] - Improve favicon fetching; transition to Duck-Duck-Go [#2795, #2011, #2439] - Remove KeePassHttp support [#1752] - CLI: output info to stderr for easier scripting [#2558] - CLI: Add --quiet option [#2507] - CLI: Add create command [#2540] - CLI: Add recursive listing of entries [#2345] - CLI: Fix stdin/stdout encoding on Windows [#2425] - SSH Agent: Support OpenSSH for Windows [#1994] - macOS: TouchID Quick Unlock [#1851] - macOS: Multiple improvements; include CLI in DMG [#2165, #2331, #2583] - Linux: Prevent Klipper from storing secrets in clipboard [#1969] - Linux: Use polling based file watching for NFS [#2171] - Linux: Enable use of browser plugin in Snap build [#2802] - TOTP QR Code Generator [#1167] - High-DPI Scaling for 4k screens [#2404] - Make keyboard shortcuts more consistent [#2431] - Warn user if deleting referenced entries [#1744] - Allow toolbar to be hidden and repositioned [#1819, #2357] - Increase max allowed database timeout to 12 hours [#2173] - Password generator uses existing password length by default [#2318] - Improve alert message box button labels [#2376] - Show message when a database merge makes no changes [#2551] - Browser Integration Enhancements [#1497, #2253, #1904, #2232, #1850, #2218, #2391, #2396, #2542, #2622, #2637, #2790] - Overall Code Improvements [#2316, #2284, #2351, #2402, #2410, #2419, #2422, #2443, #2491, #2506, #2610, #2667, #2709, #2731]

Description
Fully implements advanced searching and other search related features/issues. Eliminates the searching of group names and notes. End search after selecting a folder if global search is active (Fixes #1501). Also took the opportunity to clean up the ugly/messy entry view and model code surrounding searching.
Fixes #239 using the following syntax:
[modifiers][field:]["]term["]Where modifiers can be any combo of:
-exclude this term from results+match this term exactly*term is handled as a regexWhere field can be one of:
If field is omitted or non-existent the default is to search title, username, url, and notes.
Where term can contain wildcard terms (if NOT regex) of:
*match anything (or nothing)?match any one character|logical ORSample search queries:
user:jon url:googleSearch username for jon and url for googleuser:jon|hifiSearch username for jon OR hifi+user:jon -url:google *notes:"secret note \d"Search username exactly jon, url cannot contain google, and notes contains secret note [digit]Motivation and context
Long requested feature
How has this been tested?
Manually and with new search term parser tests.
Types of changes
Checklist:
-DWITH_ASAN=ON. [REQUIRED]