Commit Graph
98 Commits
Author SHA1 Message Date
Jonathan White 71085838db Make macOS Auto-Type more robust
* Fix #3351

On macOS, entry specific Auto-Type (Cmd+Shift+V) now raises the last active window before lowering the KeePassXC window. This improves accuracy of the window that is actually typed into.
2019-10-20 17:57:38 -04:00
Jonathan White 63aab99b9c Merge branch 'release/2.4.2' into develop 2019-05-30 17:22:09 -04:00
Jonathan White 2ee97ed191 Code formatting 2019-05-19 18:21:34 -04:00
Jonathan White 96438a45b4 Various minor code improvements 2019-05-19 18:21:34 -04:00
Jonathan White 63855346bf Fix global Auto-Type when database locked
* Store the currently active window right when the global keyboard shortcut is triggered
* Eliminate unnecessary window raise/lower and delays on macOS
* Remove duplicate addition of macutils symbols from mac Auto-Type plugin
* Fix tests to fake trigger a global autotype sequence
2019-05-12 12:37:50 -04:00
Jonathan White 53a57ee8c7 Hide window when performing entry auto-type on macOS
* Instead of choosing the last active window, always hide the current window (ie, KeePassXC)
* Fixes #2883
2019-04-10 20:31:24 -04:00
Gianluca Recchia fc930bae69 Restore correct formatting
Many lines were not conformant with the project's formatting rules.
This patch should fix all formatting and whitespace issues in the code
base.
A clang-format directive was put around the connect() calls containing
SIGNALs and SLOTs whose signatures would be denormalized because of the
formatting rules.
2018-11-28 18:29:15 -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
Gianluca Recchia 896a66e6d8 Improve readability and type-safety
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.
2018-10-31 15:16:04 +01:00
Gianluca Recchia 7208635502 Enhance readability when accessing static members
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.
2018-10-31 15:16:04 +01:00
Gianluca Recchia f31d65bdaf Replace deprecated parts of the code (#2419)
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.
2018-10-26 15:19:04 +02:00
Jonathan White c1e9f45df9 Introduce synchronize merge method
* Create history-based merging that keeps older data in history instead of discarding or deleting it
* Extract merge logic into the Merger class
* Allows special merge behavior
* Improve handling of deletion and changes on groups
* Enable basic change tracking while merging
* Prevent unintended timestamp changes while merging
* Handle differences in timestamp precision
* Introduce comparison operators to allow for more sophisticated comparisons (ignore special properties, ...)
* Introduce Clock class to handle datetime across the app

Merge Strategies:
* Default (use inherited/fallback method)
* Duplicate (duplicate conflicting nodes, apply all deletions)
* KeepLocal (use local values, but apply all deletions)
* KeepRemote (use remote values, but apply all deletions)
* KeepNewer (merge history only)
* Synchronize (merge history, newest value stays on top, apply all deletions)
2018-09-30 09:36:39 -04:00
seregaxvm e124f17c64 Add advanced password generator features (#1841)
* Split between simple and advanced features
* Finetune password character groups
* Support for hex passwords
2018-06-10 22:37:09 -04:00
Jonathan White aae6d09fd3 Merge branch 'master' into develop
Conflicts:
	src/CMakeLists.txt
	src/autotype/xcb/AutoTypeXCB.cpp
	src/browser/BrowserAction.cpp
	src/browser/BrowserService.cpp
	src/browser/BrowserService.h
	src/browser/BrowserSettings.h
	src/browser/NativeMessagingHost.cpp
	src/browser/NativeMessagingHost.h
	src/gui/EditWidgetIcons.cpp
	src/gui/EditWidgetIcons.h
	src/gui/MainWindow.cpp
	src/proxy/NativeMessagingHost.cpp
	tests/TestOpenSSHKey.cpp
2018-05-07 23:24:30 -04:00
Jonathan White 9ed2a74421 Configurable global autotype start delay 2018-05-06 20:54:11 +02:00
Louis-Bertrand Varin 8324d03f0a Formatting the code. 2018-03-31 16:01:30 -04:00
Janek Bevendorff 2b91e4d27c Fix inconsistent mutex unlocking due to double slot execution, fixes #1561 2018-03-10 10:52:18 +01:00
thez3ro 5f9f27604b fix autotype custom attributes 2018-03-04 23:08:58 +01:00
Janek Bevendorff 536db062f4 Fix Auto-Type message not raised when no matching entry was found 2018-02-17 15:19:36 +01:00
thez3ro b33259b1f2 relock database after successful autotype 2018-02-05 20:12:24 +01:00
thez3ro 16fad1aba1 fix duplicate autotype sequences 2018-02-04 23:13:15 +01:00
thez3ro b4cf98998e convert inAutoType from boolean block to QMutex 2018-02-04 23:13:15 +01:00
thez3ro a76c92ed9a change inAutotype logic, preventing multiple autotype call 2018-02-04 23:13:15 +01:00
thez3ro 12a4b9aaa3 reorder functions by logic 2018-02-04 23:13:15 +01:00
thez3ro a9479fd662 refactor autotype sequences and entry-point functions 2018-02-04 23:13:15 +01:00
thez3ro b5cabbeb43 add support for multiple autotype sequence, fix #559 2018-02-04 23:13:15 +01:00
Janek Bevendorff 0c0c558ff7 Fix Auto-Type locale source strings 2018-01-21 15:54:46 +01:00
Weslly 6a75fd84ab Fix auto-type regression when using {delay=x} 2018-01-05 23:53:45 -02:00
thez3ro 6d046f251e Remove minus since it's an invalid literal 2018-01-03 12:56:18 +01:00
thez3ro e803076063 improve regex filtering 2018-01-03 12:56:18 +01:00
thez3ro 203960b4b5 rename to executeAutoType 2018-01-03 12:56:18 +01:00
thez3ro 3d5ff723e9 fix codestyle 2018-01-03 12:56:18 +01:00
thez3ro a02a49a184 add test for syntax checking 2018-01-03 12:56:18 +01:00
Marco 8ca444aee0 add a method to perform the autotype sequence showing graphical dialogs
Dialogs are show when the syntax of the autotype statement is wrong or contains long delays or statements which are repeated very often
2018-01-03 12:56:18 +01:00
Marco 7ceac05395 add support for custom commands. all autotype tests are getting passed now 2018-01-03 12:56:18 +01:00
Marco 4893d99774 move autotype syntax warning and error dialogs from AutoType to DatabaseWidget in the gui folder and replaced it with a checkSyntax call.
this fixes part of why autotype test fails
2018-01-03 12:56:18 +01:00
Marco 393017cf3b fix for loops now have diffrent variables. dont know why it worked before 2018-01-03 12:56:18 +01:00
Marco 6057c9f27d fix comments 2018-01-03 12:56:18 +01:00
thez3ro a4bdc9a71d fix syntax error 2018-01-03 12:56:18 +01:00
Marco fbfc2e4d07 create message boxes for saving editing autotypes statements, fix multiple messages problem on autotype execution
You now get an error when you try to save incorrect autotype statements and warnings if you have high delays or much repetiton in your statement.

Also you will now only get one warning if you want to perfom high delayed or often repeated statements.
2018-01-03 12:56:18 +01:00
Marco 7bb9ea201c fix typo 2018-01-03 12:56:18 +01:00
Marco 70127bad4b extract syntax checking methods as static methods to the Autotype class 2018-01-03 12:56:18 +01:00
Marco d524aea779 Extended autotype syntax to allow all things in keepass2 2018-01-03 12:56:18 +01:00
Marco 4fcedc2187 check autotype syntax, high repetion, reformat code
TODO: specify what should happen when autotypesyntax incorrect
2018-01-03 12:56:18 +01:00
Marco 45cb97ec85 🐛 #216 add warning on long autotypes, enable user and pw repetition
Auto Type now shows a warning when you try to  repeat something too often.
Also you can now repeat your password and username
2018-01-03 12:56:18 +01:00
Weslly 3b8d49104c Focus database unlock dialog on macOS, fix #1023 2017-11-20 04:26:53 -02:00
frostasm 7f2bd47849 AutoType: resolve placeholders for title in window associations 2017-10-23 22:55:22 +03:00
Janek Bevendorff 6e44eed9fe Merge branch 'release/2.2.1' into develop 2017-07-01 10:09:06 +02:00
Toni Spets 1158294323 Add UI to configure default auto-type delay 2017-06-29 21:00:54 +02:00
Toni Spets 4ecd9e7e23 Make default auto-type delay of 25ms overridable with {DELAY=X}
Additionally this fixes the increased delay when you had your own
custom delay configured and it always added 25ms on top of it.
2017-06-29 21:00:54 +02:00