* Fix SSHAgent identity removal on database lock
* Refactor storage and manipulation of SSHAgent keys to streamline process with multiple db's
* Clear password field when widget is hidden, resolves#2502
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.
* 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
* 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)
* 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
* Add CLI commands show --totp and totp-clip for handling TOTPs, resolves#2429.
* Adding tests for new CLI TOTP commands
* Update keepassxc-cli man page.
* Remove redundant headers from the build system
* Pin AutoTypeAction's vtable to a translation unit
* Remove redundant check for the version flag
* Improve performance of a few for-loops
* Replace old for-loops with range-based for-loops
* Remove redundant null-checks for pointer deletion
* Reduce QString::arg function call overhead
* Reduce number of unneeded copies when calling functions
* Enhance readability when accessing static members
* Convert to nullptrs where necessary
* Reduce unnecessary copies using std::move
* Normalize signature of SIGNAL() and SLOT()
* Add missing `override` keyword for some member functions which override functions of their base class
Use nullptr instead of 0 or NULL to initialize a null pointer. In some
cases, readability was enhanced by replacing 0 with more meaningful
values according to the type of the pointer being initialized.
The sole purpose of a few objects was calling a static member of the
class they belonged to. This is not needed, as you can access a static
member with the <class_name>::<member_name> notation.
This patch aims at reducing the number of copies for obejcts that could
be referenced rather than copied, because they're not modified during
the computation.
The arg() function of the QString class has a variable length argument
which allows to reduce the number of chained calls to the same function.
With proper formatting, readability is not affected.
AutoTypeAction class had no out-of-line definitions and because of this
the compiler would place its vtable everywhere the class is used.
By simply defining the virtual destructor in the .cpp file, the issue
goes away.
Also, a few classes derived from AutoTypeAction had missing 'override'
qualifiers, which have now been added.
Headers are not to be placed amongst the source files in the CMake
script. The preprocessor and the linker will take care of glue all the
files together. Also, the "include_directories()" statement at the top
of the file already tells CMake where to look for all the needed
header files.
QTextStream uses the system default locale, but this breaks in
various situations: (1) It does not work on the native Windows shell
(cmd.exe, Powershell), since the default Windows locale is Windows-1252,
but the shell uses Windows-850. (2) It also breaks on *nix systems where
the locale is Latin1 or C, which is the case for most CI systems or
build servers.
We allow overriding the detected codec by setting the ENCODING_OVERRIDE
environment variable, but otherwise prefer Windows-850 on Windows and
UTF-8 on any other system, even if LANG is set to something else.
This resolves#2413
Performing a dev build against the latest version of Qt failed
because of some deprecated members. They have been replaced
according to the Qt documentation.
Further, Q_OS_MACOS is now the only macro available to identify a
machine running macOS, the others are now deprecated.
See https://doc.qt.io/qt-5/qtglobal.html#Q_OS_OSX and
https://doc.qt.io/qt-5/qtglobal.html#Q_OS_MAC.
The {group,entry}CloseButton QToolButton, had the "checkable" property set.
This caused it to act like a toggle flip flop instead of a momentary push
button. After removing that property, the signal it was changed to use
was clicked() instead of toggled(bool). Trigger upon click is
consistent with the rest of the UI's momentary buttons.
This enables coordinate system scaling for high-DPI
displays, which enforces correct proportions even
on small 4k displays. The icons are scaled up without
interpolation, which makes them crisp, but a bit
pixelated. A new scalable icon set will solve this
problem, but is not scope of this patch.
Resolves#548, #1381, #1710, #1888
In addition, this patch enforces the KeePassXC icon
theme for the KMessageBox close icon, since using
the system theme produces very ugly icons on some
Linux systems.
* Fix MainWindow startup when minimize to tray was enabled
* Reduce duplicate code in DatabaseWidget.cpp
* Fix snapcraft build dependencies
* Add support for CTRL+TAB, CTRL+PGUP, CTRL+SHIFT+TAB, CTRL+PGDN to control database tabs from any focus location
* Add CTRL+SHIFT+M shortcut to minimize to tray
* Allow minimize instead of app exit without tray icon