Commit Graph

31 Commits

Author SHA1 Message Date
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
Louis-Bertrand Varin
8324d03f0a Formatting the code. 2018-03-31 16:01:30 -04:00
Louis-Bertrand Varin
3eb917055e Add ClangFormat exceptions 2018-03-31 12:15:09 -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
b33259b1f2 relock database after successful autotype 2018-02-05 20:12:24 +01:00
thez3ro
b4cf98998e convert inAutoType from boolean block to QMutex 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
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
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
Weslly
3b8d49104c Focus database unlock dialog on macOS, fix #1023 2017-11-20 04:26:53 -02:00
thez3ro
a53b111182 Update and fix copyright headers 2017-06-14 15:54:43 +02:00
Jens Rutschmann
9a59a124aa Compare window title with entry URLs during autotype matching. (#556)
* Compare window title with entry URLs during autotype matching.

* Adapted option label to reflect that both entry title and URL are used for auto-type window matching.
2017-05-13 19:02:54 -04:00
Janek Bevendorff
8d487d31a4 Replace Q_EMIT, Q_SIGNALS and Q_SLOTS macros with MOC keywords 2017-03-10 16:12:02 +01:00
Jonathan White
753d1d50d0 Add delay feature to autotype (#77)
* Implement {DELAY=X} in autotype
2016-11-04 18:05:47 -04:00
Felix Geyer
7fa0eddc5f Make C++11 mandatory. 2015-09-12 13:55:50 +02:00
Felix Geyer
2a416d1f1d Make sure the remapping keycode is reset to NoSymbol.
Previously the dtor of AutoTypePlatformX11 wasn't called.
2013-12-01 23:32:53 +01:00
Felix Geyer
6504b6f2bd Drop Qt module name from include statements.
This is a preparation to be able to build KeePassX against Qt 5.
2013-10-03 15:18:16 +02:00
Florian Geyer
bd90ba9326 Move initial auto-type timeout to plugins. 2012-11-02 15:49:25 +01:00
Florian Geyer
8347fd36ba More auto-type tests. 2012-11-02 15:09:54 +01:00
Felix Geyer
606dbc6eb4 Add infrastructure for auto-type tests. 2012-10-28 15:33:44 +01:00
Felix Geyer
92efb3d20b Move autoTypeSequence() and windowMatches() to the AutoType class. 2012-07-23 18:06:04 +02:00
Felix Geyer
20e4643560 Implement global auto-type dialog.
It allows to select an entry when there are multiple entries
that match the window title.
2012-07-21 22:21:49 +02:00
Felix Geyer
2a45f57386 Support proper plugin finding.
So we don't have to hardcode the location anymore.
2012-07-18 21:22:36 +02:00
Felix Geyer
fa51f7e10e Make AutoType::performGlobalAutoType() a slot. 2012-07-14 19:06:05 +02:00
Felix Geyer
bc207714da Add initial auto-type implementation.
The platform dependent bits are separated in plugins.
A plugin for X11 using Xlib is already done.
2012-07-12 22:33:20 +02:00