Commit Graph

19 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
pasdam
ad4423d226
Replaced Uuid with QUuid 2018-07-06 22:23:49 -04:00
Louis-Bertrand Varin
8324d03f0a Formatting the code. 2018-03-31 16:01:30 -04:00
Janek Bevendorff
7a6850d5fe Move useful QTest template specializations to global header file
Fix KDBX test linker errors on Windows
2018-01-24 13:32:37 +01:00
Janek Bevendorff
a595239624
Refactor and extend file format tests 2018-01-18 01:51:37 +01:00
Janek Bevendorff
a6ddc22fb8
Refactor database readers/writers and XML handling
* Refactor Kdbx*Reader
* Refactor KdbxWriter
* Refactor KdbxXmlReader
* Refactor KdbxXmlWriter
2018-01-13 14:24:58 -05:00
angelsl
3461cbfb06
Rename KeePass2{,Xml}{R,W} to Kdbx3{,Xml}{R,W}, and add a redirection class
This class will in future select Kdbx4{R,W} as appropriate.
2018-01-13 14:23:26 -05:00
Felix Geyer
c8ae31a248 Remove backported Qt5 test macros. 2015-09-23 22:21:21 +02:00
Felix Geyer
71d39865b3 Introduce a strict mode in KeePass2XmlReader.
Many errors are now ignored when not in strict mode so we can still parse
files that have been written by broken/incomplete implementations.
2014-12-01 21:52:51 +01:00
Felix Geyer
0d6117bf4c Do some basic self-checks when initializing the crypto backend. 2014-06-15 11:17:40 +02:00
Florian Geyer
77af79498c Move QTEST_GUILESS_MAIN statements before test cases. 2014-05-16 12:32:52 +02: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
Felix Geyer
6b13d18137 Rename KEEPASSX_QTEST_CORE_MAIN to QTEST_GUILESS_MAIN which is available in Qt 5. 2012-07-25 12:18:16 +02:00
Felix Geyer
bf25959b68 Memory management fixes in tests. 2012-04-22 23:09:52 +02:00
Florian Geyer
d8fcc43bc3 Extend deleted objects test. 2012-04-22 19:59:50 +02:00
Felix Geyer
72defa375d Coding style fixes. 2012-04-22 00:29:16 +02:00
Florian Geyer
c8ad27975a Clean up deleted objects test (again). 2012-04-22 00:11:17 +02:00
Florian Geyer
0d80a726fa Clean up deleted objects test. 2012-04-22 00:11:17 +02:00
Florian Geyer
cc8d6424e2 Add test for deleted objects. 2012-04-22 00:11:17 +02:00