Commit Graph

221 Commits

Author SHA1 Message Date
Felix Geyer
f1bebe904a Add tests for broken databases.
Make sure we detect the error and don't crash.
2013-04-29 22:31:50 +02:00
Felix Geyer
61ee763515 Add Entry::copyDataFrom(). 2013-04-29 22:31:49 +02:00
Florian Geyer
63f7a0685f Small ArgumentParser refactoring. 2013-04-27 11:40:10 +02:00
Felix Geyer
5786e2620a Add unit test for Metadata::copyCustomIcons(). 2013-04-07 19:38:18 +02:00
Florian Geyer
2558e6db79 First draft of an argument parser.
Possibility to set custom config path.
2013-04-06 11:00:45 +02:00
Felix Geyer
bee570c3cf Add Group::clone().
Move all the data we want to clone into a GroupData struct.
2013-04-04 21:48:55 +02:00
Felix Geyer
e805a6ff82 Coding style fix. 2013-03-30 17:27:28 +01:00
Felix Geyer
5550d7af0d Fix autotype test (build) failures on Mac OS and Windows.
We need to tell Windows what symbols the main program exports
and the autotype plugin imports.

On both systems the linker needs the path of the main program that
loads the plugin.
2013-03-29 16:27:02 +01:00
Florian Geyer
57b0c17733 Improve entry test. 2013-03-24 21:57:34 +01:00
Florian Geyer
6ee781a608 Add regression test for issue #56. 2013-03-24 21:57:34 +01:00
Felix Geyer
21a80101ba Add TestEntryModel::testDatabaseDelete().
It tests that EntryModel in EntryList mode correctly
removes entries from the model when that database of
these entries is deleted.
2013-03-24 14:00:23 +01:00
Felix Geyer
c7593a3047 Stop suppressing signals in Group dtor.
That way we emit entry/group removed signals.

Move cleanupParent() call to the bottom so we
maintain the group tree structure for objects that
connect to those signals.
2013-03-24 14:00:23 +01:00
Felix Geyer
9144765d56 Use a fixed sleep call instead of QTest::qWaitForWindowShown().
The latter seems to be broken and always seeps until it hits
the timeout (2s).
2012-11-02 15:43:45 +01:00
Florian Geyer
8347fd36ba More auto-type tests. 2012-11-02 15:09:54 +01:00
Florian Geyer
ac56ac98f7 Extend auto-type test. 2012-10-28 18:18:24 +01:00
Felix Geyer
58b6fb36f8 Add missing files for the last commit. 2012-10-28 15:42:19 +01:00
Felix Geyer
606dbc6eb4 Add infrastructure for auto-type tests. 2012-10-28 15:33:44 +01:00
Felix Geyer
5d46ecdbe6 Don't use deprecated Qt methods. 2012-10-27 00:06:12 +02:00
Felix Geyer
8b8e55aa17 Store the filename instead of a QTemporaryFile in TestGui.
On Windows QTemporaryFile keeps the file handle open
which conflicts with QSaveFile.
2012-10-22 17:52:08 +02:00
Felix Geyer
9eac5f35d8 Close file in TestQSaveFile::autoFlush() so we can remove it. 2012-10-22 17:50:58 +02:00
Felix Geyer
47d3c7e05a Disable TestQSaveFile::transactionalWriteErrorRenaming() on Windows.
QSaveFile::setPermissions() is not implemented in the QIODevice
based version for Qt 4.
2012-10-22 17:49:42 +02:00
Florian Geyer
92bf7c94d0 Whitespace separated search terms are AND concatenated. 2012-10-21 21:09:27 +02:00
Felix Geyer
e166722026 Implement database locking.
Closes #35
2012-10-12 12:12:00 +02:00
Felix Geyer
18d3fe55f8 Add support for database format 3.01 (HeaderHash).
Add test for the format 3.00 and upgrade Compressed.kdbx, NonAscii.kdbx
and ProtectedStrings.kdbx to 3.01.

Add a test for an incorrect HeaderHash.
2012-09-25 22:33:36 +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
2185afefed Speed up TestGui by removing unnecessary waits.
Backport QTRY_VERIFY and QTRY_COMPARE from Qt 5.
2012-07-25 12:18:16 +02:00
Florian Geyer
c0e91e4f16 Refactor wildcard matcher test. 2012-07-24 20:35:36 +02:00
Felix Geyer
9ad4cc8783 Subclass QSortFilterProxyModel to hide the group column in EntryView.
QTreeView::hideColumn() does not work well with keyboard search.
2012-07-22 22:02:06 +02:00
Felix Geyer
edb644baef Add TestGui::testCloneEntry(). 2012-07-22 22:02:06 +02:00
Florian Geyer
7bd080760e Make wildcard matcher case insensitive. 2012-07-22 14:58:15 +02:00
Florian Geyer
4f78c32461 Add custom wildcard matcher. 2012-07-22 14:43:45 +02:00
Felix Geyer
33b4cd8636 Don't add new entries to EntryModel when in search mode.
Only allow moving entries from one group to the other.
2012-07-21 22:21:49 +02:00
Felix Geyer
b6d9c2e486 Import Auto-Type associations in KeePass1Reader. 2012-07-19 23:21:12 +02:00
Felix Geyer
4781fc19fe Add a few drag'n'drop tests. 2012-07-17 23:29:25 +02:00
Felix Geyer
7e9343c697 Fix CompositKey self assignment. 2012-07-17 10:57:08 +02:00
Felix Geyer
f767a098d6 Add GUI test for changing the database transform rounds.
Refs #34
2012-07-17 10:56:56 +02:00
Felix Geyer
2b694bab16 Refactor TestGui a bit. 2012-07-17 10:16:59 +02:00
Felix Geyer
af166a66b3 Add AutoTypeAssociationsModel class. 2012-07-16 17:39:20 +02:00
Felix Geyer
3c913f196f In TestGui::testEditEntry() wait for the delayed Database::modified() signal. 2012-07-16 17:37:59 +02:00
Felix Geyer
f98d834edb Move Auto-Type associations handling from Entry into an own class. 2012-07-16 09:54:04 +02:00
Felix Geyer
6d5b31f527 Normalize signal/slot signatures. 2012-07-14 19:34:38 +02:00
Felix Geyer
98df309d28 Coding style fixes. 2012-07-08 10:29:38 +02:00
Felix Geyer
2e38b01d80 Add Save and SaveAs gui tests. 2012-07-06 19:21:19 +02:00
Felix Geyer
78849c43f1 Make sure tmpDir is not empty. 2012-07-06 16:40:38 +02:00
Felix Geyer
2f98d95b66 Import QSaveFile from libkdeqt5staging.
It's planned to become part of Qt 5.1.
2012-07-06 14:36:04 +02:00
Felix Geyer
e050385e27 Increase wait time in TestGui::testSearch() a bit. 2012-07-02 22:12:07 +02:00
Felix Geyer
782223a643 Coding style fixes. 2012-07-01 21:58:45 +02:00
Felix Geyer
fd6546c5df Move modeltest to the front so it's always passed to the linker before Qt. 2012-07-01 21:29:54 +02:00
Felix Geyer
dedce07530 Add KeePass1 import GUI test. 2012-06-29 15:54:34 +02:00
Felix Geyer
baa5a74ba0 Convert iconCount() and expiredIconIndex() to constants. 2012-06-29 15:22:43 +02:00
Felix Geyer
68155e8f89 Make use of Q_NULLPTR. 2012-06-29 14:15:16 +02:00
Felix Geyer
92af92ccbe Convert DatabaseOpenDialog into a widget on DatabaseWidget. 2012-06-29 10:36:35 +02:00
Florian Geyer
dad4376030 Fix typo. 2012-06-25 00:09:40 +02:00
Florian Geyer
204822b66f Improve auto save handling. 2012-06-24 19:30:30 +02:00
Felix Geyer
b0ad864fe0 Always convert explicitly from QByteArray to QString. 2012-06-24 18:23:27 +02:00
Felix Geyer
d0016bf6c4 Fix reading non-ASCII passwords that are protected.
Closes #28
2012-06-24 18:22:18 +02:00
Florian Geyer
a720903083 Use temporary settings file for gui test. 2012-06-14 23:07:49 +02:00
Felix Geyer
f43ad8d062 Support copying username and password to the clipboard. 2012-05-26 16:37:57 +02:00
Felix Geyer
a1a71a88bb Fix cmake file formatting. 2012-05-21 23:37:29 +02:00
Felix Geyer
bde397503e Coding style fixes. 2012-05-21 11:57:29 +02:00
Florian Geyer
9faf550fa1 Use line edit widget for search edit. 2012-05-20 21:09:34 +02:00
Florian Geyer
e4a5cd214f Improve search.
Find as you type.
Add shortcut.
Hide search widgets when not used.

Refs #24
2012-05-20 12:57:50 +02:00
Felix Geyer
7ebee78c75 Create src/gui/{entry,group}/ and move corresponding files to these dirs. 2012-05-16 10:22:04 +02:00
Florian Geyer
b08d2d45b7 Add gui test for search. 2012-05-16 10:18:27 +02:00
Felix Geyer
b90807c4d3 Coding style fixes. 2012-05-15 17:48:48 +02:00
Florian Geyer
a57e8f9864 Preserve order of custom icons.
Closes #25
2012-05-13 20:50:41 +02:00
Florian Geyer
60e65bec35 Add search test. 2012-05-13 19:21:23 +02:00
Florian Geyer
6b6c109903 Add search.
Refs #24
2012-05-13 19:21:10 +02:00
Felix Geyer
af726d465d Fix typo. 2012-05-13 13:33:55 +02:00
Florian Geyer
a1dec7594d Extend history item tests. 2012-05-11 20:14:52 +02:00
Felix Geyer
587a647c11 New TODO comment style.
Qt Creator 2.5 is able to parse those.
2012-05-11 12:39:06 +02:00
Felix Geyer
8faac078fd Make EntryView sortable. 2012-05-11 12:01:01 +02:00
Florian Geyer
44489bf6f8 Fix creation of history item when a new entry is added.
Add corresponding gui test.
2012-05-11 09:16:45 +02:00
Felix Geyer
3738115b6d Test if we can re-open imported KeePass 1 databases. 2012-05-10 23:00:29 +02:00
Felix Geyer
65bdc207b7 Make sure we don't create DeletedObjects when importing databases. 2012-05-10 22:54:26 +02:00
Felix Geyer
366d8a0f0e Set master key after reading the database. 2012-05-10 22:46:36 +02:00
Felix Geyer
9d8e276950 Set uuids for entries. 2012-05-10 21:35:26 +02:00
Felix Geyer
2ecd11eb35 Add test for a non-ascii password. 2012-05-10 21:29:10 +02:00
Felix Geyer
cf4e574c50 Support Twofish encrypted KeePass 1 databases.
Refs #2
2012-05-10 21:06:33 +02:00
Felix Geyer
225e5dac66 Add tests for opening KeePass 1 databases with different keyfiles. 2012-05-10 19:34:55 +02:00
Felix Geyer
5a08e4619c Add icon model tests. 2012-05-10 13:59:54 +02:00
Felix Geyer
65f2790170 Parse KeePass 1 database meta streams.
Refs #2
2012-05-10 11:44:25 +02:00
Felix Geyer
79b15e2ac6 Implement support for parsing groups and entries from KeePass 1 databases.
Still missing:
- Key files.
- Twofish encryption.

Refs #2
2012-05-09 23:16:32 +02:00
Andreas Piesk
7568582b05 compile with QT < 4.7 (RHEL6 an clones) 2012-05-09 22:15:28 +02:00
Felix Geyer
ebce183925 Start implementing support for reading KeePass 1 databases.
For now only decrypting the database works.

Still missing:
- Actually parsing the database.
- Key files.

Refs #1
2012-05-08 22:06:12 +02:00
Felix Geyer
38e421d9c1 Fix padding handling in SymmetricCipherStream.
The implementation had two issues:
- It didn't add a block full of padding when the input size was a multiple
  of the block size.
- It didn't strip the padding when reading data.
2012-05-08 21:46:01 +02:00
Felix Geyer
f8f52419c8 Turn EntryAttachmentsModel into a QAbstractListModel. 2012-05-02 10:30:30 +02:00
Felix Geyer
7f67019f63 Turn EntryAttributesModel into a QAbstractListModel. 2012-04-28 16:50:17 +02:00
Felix Geyer
de4b90cdf1 Copy custom icons when moved to another database.
Closes #9
2012-04-27 11:22:02 +02:00
Felix Geyer
fdf4ab9d76 Improve TestGui::testEditEntry().
Simulate mouse click on the actual edit action widget.
Make sure that the edit entry widget is active after triggering the entry edit.
2012-04-26 17:52:02 +02:00
Florian Geyer
93c231ec2b Extend group test. 2012-04-25 19:41:46 +02:00
Felix Geyer
0ad4b3d8fe Minor improvements in CompositeKey and TestKeys. 2012-04-25 18:35:30 +02:00
Felix Geyer
1b8963c1f8 Change Q_ASSERT() to QVERIFY() in modeltest. 2012-04-25 10:45:36 +02:00
Felix Geyer
d3fbb291bd Support moving groups with drag and drop. 2012-04-25 00:22:55 +02:00
Felix Geyer
0d20955920 Fix bug where index is wrong when a group is moved to the end from the same parent.
This triggered the bug:
group->setParent(group->parentGroup());

Then index was group->parentGroup()->children().size() instead of size()-1.
2012-04-25 00:10:06 +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
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
82f1cbb3c9 Build with -DQT_NO_CAST_TO_ASCII. 2012-04-22 00:55:52 +02:00