Commit Graph

22 Commits

Author SHA1 Message Date
Jonathan White
7e1b16250c Performed project-wide code formatting
* Updated format CMake command to properly
ignore new directories and files
* Added output when command is run
* Resolves #2623
2019-01-28 22:38:59 -05:00
Janek Bevendorff
d612cad09a
Refactor Database and Database widgets (#2491)
The Database, DatabaseWidget, and DatabaseTabWidget classes share many responsibilities in inconsistent ways resulting in impenetrable and unmaintainable code and a diverse set of bugs and architecture restrictions. This patch reworks the architecture, responsibilities of, and dependencies between these classes.

The core changes are:

* Move loading and saving logic from widgets into the Database class
* Get rid of the DatabaseManagerStruct and move all the information contained in it into the Database
* Let database objects keep track of modifications and dirty/clean state instead of handing this to external widgets
* Move GUI interactions for loading and saving from the DatabaseTabWidget into the DatabaseWidget (resolves #2494 as a side-effect)
* Heavily clean up DatabaseTabWidget and degrade it to a slightly glorified QTabWidget
* Use QSharedPointers for all Database objects
* Remove the modifiedImmediate signal and replace it with a markAsModified() method
* Implement proper tabName() method instead of reading back titles from GUI widgets (resolves #1389 and its duplicates #2146 #855)
* Fix unwanted AES-KDF downgrade if database uses Argon2 and has CustomData
* Improve code

This patch is also the first major step towards solving issues #476 and #2322.
2018-11-22 11:47:31 +01:00
Jonathan White
880c3aeb34
Add search help pop-up
* 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
2018-11-17 09:04:15 -05:00
Jonathan White
d6ffee5e99
Implement search auto-clear and goto group
* Search clears if the search box does not have focus for 5 minutes (fixes #2178)
* Goto group from search results after double clicking the group name (fixes #2043)
2018-11-17 09:02:36 -05:00
Jonathan White
4b983251cb
Add advanced search term parser
* Support quoted strings & per-field searching
* Support regex and exact matching
* Simplify search sequence
* Make search widget larger
* Add regex converter to Tools namespace
2018-11-17 08:49:50 -05:00
Jonathan White
d8d758f0e1
Streamlined searcher code
* Remove searching of group title and notes
* End search when selecting a new group
* Correct entry searcher tests to align with new code
2018-11-17 08:49:02 -05:00
Jonathan White
ee9c71e11e
Fix multiple issues with entries and keyboard shortcuts (#2431)
* Cleanup entry change notification with entryview focus in/out
* Change Open URL shortcut to CTRL+SHIFT+U to conform with an "action" 
including SHIFT
* Change Copy URL shortcut to CTRL+U to conform with "copy" without SHIFT
* Entry specific toolbar and menu items are disabled unless the entry
row has focus (prevents unintended actions)
* Reword security setting for password visibility in entry edit view
* Add shortcut to hide/unhide usernames (CTRL+SHIFT+B)
* Organize entry menu

* Fix #1588 - show keyboard shortcuts in context menu
* Fix #2403 - Change auto-type shortcut to CTRL + SHIFT + V
* Fix #2096 - Add (CTRL+F) to search bar background
* Fix #2031 & Fix #2266 - add shortcut to hide/unhide passwords (CTRL+SHIFT+C)
* Fix #2166 - Add reveal password button to entry preview
2018-11-16 10:00:59 -05:00
Louis-Bertrand Varin
8324d03f0a Formatting the code. 2018-03-31 16:01:30 -04:00
Edward Jones
3def6a3bc4 Fix weird base strings and reduce concatenation 2018-03-13 20:40:39 +00:00
Ettore Dreucci
12b5cf0331
replaced hard function call with signal connection
Signed-off-by: Ettore Dreucci <ettore.dreucci@gmail.com>
2017-08-23 00:21:08 +02:00
Weslly
719323e9c3 Add option to limit search to current group 2017-06-21 01:01:50 -03:00
thez3ro
a53b111182
Update and fix copyright headers 2017-06-14 15:54:43 +02:00
Louis-Bertrand Varin
00ae123736 Adding .clang-format file. 2017-05-14 09:20:13 -04:00
Francois Ferrand
86e88c18b0 More compact search widget
* Move the search icon (with popup menu) and clear icon inside the
line edit
* Move the search widget to the right-side of toolbar
2017-04-06 07:19:56 -04:00
Akinori MUSHA
6ccae6cc37 Pressing escape quits search 2017-01-25 19:37:53 -05:00
Jonathan White
b6f754c29a
Changed built-in clear search button with custom one to fix pixelation 2017-01-14 22:29:16 -05:00
Jonathan White
01464a7860
Added clear text button, accurate down arrow behavior, and fixed sizing 2017-01-14 20:27:34 -05:00
Jonathan White
36df21d823
Enhanced search ui keypress actions
* Pressing down arrow will always focus on entry view
* Pressing enter opens currently selected entry
* Pressing CTRL+F focuses and selects search text
* Rewrote test cases to cover the new functionality
2017-01-14 19:47:35 -05:00
Jonathan White
9660510cc7 Cleaned up SearchWidget code 2016-12-23 23:14:50 -05:00
Akinori MUSHA
d0a3c08840 Improve UI of the search edit (resurrecting 5c7c7f54)
- The copy action (Control+C) when no text is selected copies the
  password of the current entry.  This should be reasonable when
  Control+B copies the username.

- Down at EOL moves the focus to the entry view.  Enter and Tab should
  do that, but it would be handy for user to be able to get to the third
  entry by hitting Down three times.
2016-12-22 17:16:59 +09:00
Jonathan White
791a749c2f Search scopes to currently selected group (and children) (#118)
* Added test cases for case sensitive and group search
2016-11-28 19:02:21 -05:00
Jonathan White
13983d0e51 Make search always visible (PR #67)
* Moved search bar to toolbar and consolidated search options into dropdown list
* Updated GUI tests to be atomic and rewrote search tests
* Searches are saved between databases
* Search is cleared when all databases are closed
* Implemented global search shortcut (CTRL+F) and a notification bar when in search mode
2016-11-02 21:01:02 -04:00