0
0
mirror of https://github.com/keepassxreboot/keepassxc.git synced 2024-09-20 04:12:15 +02:00
Commit Graph

32 Commits

Author SHA1 Message Date
peter
6b14b5dc27 Optimize includes across code base 2021-07-13 22:08:33 -04:00
Aetf
81a66c439c
Properly block modified signal during Database destruction (#6438)
fixes #6393
2021-05-27 21:50:15 -04:00
louib
c8ab3b5f4f Removing QColor (from Qt::Widgets) from core modules. (#4247) 2020-01-26 21:38:43 -05: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
Janek Bevendorff
bea31f9bcc Rename TestClock to MockClock and move it to the mock directory 2018-10-19 21:49:55 +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
Janek Bevendorff
e443cde452 Add a new database settings wizard
This patch implements a new database wizard to guide users through the process
of setting up a new database and choosing sane encryption settings.

It also reimplements the master key settings to be more
user-friendly. Users can now add, change, or remove individual composite
key components instead of having to set all components at once. This
avoids confusion about a password being reset if the user only wants to
add a key file.

With these changes comes a major refactor of how database composite keys and key
components are handled. Copying of keys is prohibited and each key
exists only once in memory and is referenced via shared pointers. GUI
components for changing individual keys are encapsulated into separate
classes to be more reusable. The password edit and generator widgets
have also been refactored to be more reusable.
2018-09-25 21:12:47 +02:00
pasdam
ad4423d226
Replaced Uuid with QUuid 2018-07-06 22:23:49 -04:00
Michal Kaptur
486b99b39d Add some unit tests to Tools
Clean up and test 3 methods from Tools:
- humanReadableFileSize
- isHex
- isBase64
2018-05-22 09:28:54 +02:00
Louis-Bertrand Varin
8324d03f0a Formatting the code. 2018-03-31 16:01:30 -04:00
Janek Bevendorff
5410d78bbb Properly save custom header data
Ensure adding custom data upgrades to KDBX4
Implement review feedback
2018-02-21 13:23:14 +01:00
Janek Bevendorff
114f00e1e8 Add CustomData regression tests 2018-02-21 13:23:14 +01:00
Janek Bevendorff
8dd6cdeb69
Fix history truncation based on max size and extend unit tests 2018-01-23 02:31:29 +01:00
Christian Kieschnick
258438f01f
Fix code-style issues
Fixed issues pointed out during review
2018-01-23 00:57:04 +01:00
Christian Kieschnick
943dc6cdd6
Add tests for modified, fix history for autotype
Added tests to ensure #1387 works
Fixed issue detected during testing - AutoTypeAssociations were not
pushed to history
2018-01-23 00:57:01 +01:00
Felix Geyer
c8ae31a248 Remove backported Qt5 test macros. 2015-09-23 22:21:21 +02:00
Felix Geyer
9882f16614 Remove Tools::currentDateTimeUtc(). 2015-09-12 13:51:49 +02: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
Florian Geyer
204822b66f Improve auto save handling. 2012-06-24 19:30:30 +02:00
Florian Geyer
a1dec7594d Extend history item tests. 2012-05-11 20:14:52 +02:00
Andreas Piesk
7568582b05 compile with QT < 4.7 (RHEL6 an clones) 2012-05-09 22:15:28 +02:00
Felix Geyer
e026f3d1eb Create a history item when changing entries.
Closes #15
2012-04-23 21:20:05 +02:00
Felix Geyer
bddc29101c Introduce Group::aboutToMove() and moved() signals.
Emit them instead of remove/add when groups are moved within
a database.
2012-04-23 16:57:08 +02:00
Felix Geyer
134f9a663e Test that modified() is emitted when deleting Groups and Entries. 2012-04-18 17:31:05 +02:00
Felix Geyer
433e8c4508 Simplify TestModified a bit. 2012-04-18 17:26:32 +02:00
Florian Geyer
34204f3281 Disconnect entry from database, when removed. 2012-04-18 17:03:58 +02:00
Florian Geyer
d85e5d7560 Update connection of modified signals of entries when a parent group changes database. 2012-04-18 17:03:58 +02:00
Florian Geyer
ec3cca1f77 Add test for modified signals. 2012-04-18 17:03:58 +02:00