Skip to content
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

Add functions to EntrySearcher accepting crazy terms for internal code use #3760



Copy link

Aetf commented Nov 1, 2019

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Refactor (significant modification to existing code)

Description and Context

To properly fix #3729, we need a way to pass arbitrary terms to the entry searcher, bypassing the limitation of the search term minilanguage. I also removed QSharedPointer usage in search terms. These are not shared in multiple places and there's no benefit using QSharedPointer over using struct value directly.

  • EntrySearcher::SearchTerm and EntrySearcher::Field are now public
  • Add new overloads for EntrySearcher::search and EntrySearcher::searchEntries accepting search terms directly
  • Remove QSharedPointer usage

Testing strategy

  • Add new test case in testfdosecrets.cpp
  • Run both testfdosecrets and testentrysearcher


  • I have read the CONTRIBUTING document. [REQUIRED]
  • My code follows the code style of this project. [REQUIRED]
  • All new and existing tests passed. [REQUIRED]
  • I have compiled and verified my code with -DWITH_ASAN=ON. [REQUIRED]
  • I have added tests to cover my changes.
@Aetf Aetf force-pushed the Aetf:entrysearcher-refactor branch from 7c48259 to 17939a6 Nov 1, 2019

This comment has been minimized.

Copy link

droidmonkey commented Nov 2, 2019

Please rebase onto 2.5.1

@droidmonkey droidmonkey added this to the v2.5.1 milestone Nov 2, 2019
@Aetf Aetf force-pushed the Aetf:entrysearcher-refactor branch from 17939a6 to 54ffa7f Nov 2, 2019
@Aetf Aetf changed the base branch from develop to release/2.5.1 Nov 2, 2019
@Aetf Aetf force-pushed the Aetf:entrysearcher-refactor branch from 54ffa7f to e39524c Nov 3, 2019

This comment has been minimized.

Copy link
Contributor Author

Aetf commented Nov 3, 2019

Rebase again on 2.5.1

@droidmonkey droidmonkey force-pushed the Aetf:entrysearcher-refactor branch from e39524c to 1d4d688 Nov 8, 2019
@droidmonkey droidmonkey merged commit f9097c8 into keepassxreboot:release/2.5.1 Nov 8, 2019
3 checks passed
3 checks passed
MacOS (KeepassXC) TeamCity build finished
Ubuntu Linux (KeepassXC) TeamCity build finished
Windows 10 (KeepassXC) TeamCity build finished
phoerious added a commit that referenced this pull request Nov 11, 2019

- Add programmatic use of the EntrySearcher [#3760]
- Explicitly clear database memory upon locking even if the object is not deleted immediately [#3824]
- macOS: Add ability to perform notarization of built package [#3827]


- Reduce file hash checking to every 30 seconds to correct performance issues [#3724]
- Correct formatting of notes in entry preview widget [#3727]
- Improve performance and UX of database statistics page [#3780]
- Improve interface for key file selection to discourage use of the database file [#3807]
- Hide Auto-Type sequences column when not needed [#3794]
- macOS: Revert back to using Carbon API for hotkey detection [#3794]
- CLI: Do not show protected fields by default [#3710]


- Secret Service: Correct issues interfacing with various applications [#3761]
- Fix building without additional features [#3693]
- Fix handling TOTP secret keys that require padding [#3764]
- Fix database unlock dialog password field focus [#3764]
- Correctly label open databases as locked on launch [#3764]
- Prevent infinite recursion when two databases AutoOpen each other [#3764]
- Browser: Fix incorrect matching of invalid URLs [#3759]
- Properly stylize the application name on Linux [#3775]
- Show application icon on Plasma Wayland sessions [#3777]
- macOS: Check for Auto-Type permissions on use instead of at launch [#3794]
@Aetf Aetf deleted the Aetf:entrysearcher-refactor branch Nov 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants
You can’t perform that action at this time.