Compare commits
570 Commits
2.0-alpha1
...
2.0-alpha6
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
43a1d54bba | ||
|
|
2963752585 | ||
|
|
1decdc6c11 | ||
|
|
6659745e2b | ||
|
|
1e2d1a1b17 | ||
|
|
f300ca5b7b | ||
|
|
b9370c6e79 | ||
|
|
54bb7462f6 | ||
|
|
4a08101a60 | ||
|
|
809be5f89e | ||
|
|
bf9a755bea | ||
|
|
34b82da9aa | ||
|
|
e0c59395da | ||
|
|
b07de47e35 | ||
|
|
586de64293 | ||
|
|
9321943e64 | ||
|
|
c00550078c | ||
|
|
2190260a68 | ||
|
|
678c4a8ece | ||
|
|
c2781274a0 | ||
|
|
bc14898b13 | ||
|
|
b6497d9245 | ||
|
|
79d827ffa4 | ||
|
|
811eb2714f | ||
|
|
a914b837a1 | ||
|
|
04c9332a99 | ||
|
|
97f374a189 | ||
|
|
6f3648d63e | ||
|
|
350cf4b00a | ||
|
|
3af2307468 | ||
|
|
29c997e1bc | ||
|
|
223c5a1651 | ||
|
|
8b437821a2 | ||
|
|
4ded95a060 | ||
|
|
0b6b149351 | ||
|
|
eee909e948 | ||
|
|
8c7e655274 | ||
|
|
8e86437e89 | ||
|
|
a8edad1e27 | ||
|
|
41162ea2e8 | ||
|
|
0cbf59209b | ||
|
|
0f91e0d141 | ||
|
|
6a50a76466 | ||
|
|
1fce1ac905 | ||
|
|
b9a955c048 | ||
|
|
5a577e5e4c | ||
|
|
f648172625 | ||
|
|
4b41dd30e6 | ||
|
|
2a416d1f1d | ||
|
|
23f338b0c3 | ||
|
|
cdcea91b50 | ||
|
|
4549c97e51 | ||
|
|
fc3cc12038 | ||
|
|
62ea117f45 | ||
|
|
3d8ff5b585 | ||
|
|
a3b95c1c38 | ||
|
|
2308099260 | ||
|
|
4a3da3abe7 | ||
|
|
3e4811791a | ||
|
|
34f12ac39c | ||
|
|
af98c2636c | ||
|
|
f21b331844 | ||
|
|
ea628af580 | ||
|
|
9cae8a412a | ||
|
|
47b7befd2f | ||
|
|
2fcc369c41 | ||
|
|
66b3d22041 | ||
|
|
03e4b2d13c | ||
|
|
c83579ecdb | ||
|
|
a26119ea20 | ||
|
|
98c821df05 | ||
|
|
a992c76d6a | ||
|
|
f2dfef8c41 | ||
|
|
cb804eb143 | ||
|
|
74e912ccd3 | ||
|
|
1f47033835 | ||
|
|
3fcfc348ed | ||
|
|
6b33298a6e | ||
|
|
68e1fc0cd0 | ||
|
|
31796d33fb | ||
|
|
755241df5c | ||
|
|
9080864167 | ||
|
|
d25e883983 | ||
|
|
091e87aeb3 | ||
|
|
4a870f61f1 | ||
|
|
5daf0853c9 | ||
|
|
ef3d7b7772 | ||
|
|
7dde8a771f | ||
|
|
3dd4681e69 | ||
|
|
98d888063b | ||
|
|
9c788a6e84 | ||
|
|
e087baeb48 | ||
|
|
b64276c4e8 | ||
|
|
f7dd63a126 | ||
|
|
a68a86f19b | ||
|
|
984b23de70 | ||
|
|
d5b70b1bef | ||
|
|
551637f0c2 | ||
|
|
8778df5789 | ||
|
|
67338aac7b | ||
|
|
626351c5da | ||
|
|
6504b6f2bd | ||
|
|
035271d469 | ||
|
|
5c84aa308d | ||
|
|
e1c82a4453 | ||
|
|
db6ac26794 | ||
|
|
a505d85792 | ||
|
|
6df30df992 | ||
|
|
0ec29b2354 | ||
|
|
f1bebe904a | ||
|
|
e16720d06d | ||
|
|
3be7fa6b3b | ||
|
|
e99e3ae6ca | ||
|
|
d182586557 | ||
|
|
1f5564760f | ||
|
|
2be045eb8f | ||
|
|
7a89510916 | ||
|
|
5588792344 | ||
|
|
3acb33e05a | ||
|
|
61ee763515 | ||
|
|
3658a65380 | ||
|
|
fd18bc0330 | ||
|
|
b499a6df77 | ||
|
|
cabec57631 | ||
|
|
63f7a0685f | ||
|
|
94e6d3f89b | ||
|
|
94ac9c9ea1 | ||
|
|
bbf183bef7 | ||
|
|
6f92188323 | ||
|
|
f0985ff9d9 | ||
|
|
ba3baf3595 | ||
|
|
34c6b416b0 | ||
|
|
bf906a7867 | ||
|
|
5786e2620a | ||
|
|
fe42861bed | ||
|
|
5a96e19ce9 | ||
|
|
8ed0379136 | ||
|
|
4e2f5b1a5b | ||
|
|
317f603262 | ||
|
|
701013baab | ||
|
|
4b3bee6400 | ||
|
|
91868969ca | ||
|
|
ef46b3e8ad | ||
|
|
9e87230102 | ||
|
|
2558e6db79 | ||
|
|
bee570c3cf | ||
|
|
be288d26ca | ||
|
|
b055780984 | ||
|
|
e805a6ff82 | ||
|
|
60335452a4 | ||
|
|
3a822c24e2 | ||
|
|
98372f9df8 | ||
|
|
5550d7af0d | ||
|
|
98e59215b8 | ||
|
|
1c7e8f6921 | ||
|
|
57b0c17733 | ||
|
|
6ee781a608 | ||
|
|
97b488b2ba | ||
|
|
13393ed2d3 | ||
|
|
26d3acb9d8 | ||
|
|
82eca1a5bf | ||
|
|
095bf158b6 | ||
|
|
21a80101ba | ||
|
|
c7593a3047 | ||
|
|
72d17c045f | ||
|
|
7be87051ab | ||
|
|
db08058c4e | ||
|
|
83a2f4c610 | ||
|
|
b1b602678e | ||
|
|
fcb1ab2688 | ||
|
|
3847944c44 | ||
|
|
cf2327f5aa | ||
|
|
248fd12abd | ||
|
|
eb6612b787 | ||
|
|
c6edeaddb7 | ||
|
|
5dadedbf70 | ||
|
|
2ed3201b14 | ||
|
|
006eadfb9e | ||
|
|
870417d9c4 | ||
|
|
f9dc314e72 | ||
|
|
36ad91b447 | ||
|
|
4daac65cc5 | ||
|
|
23c787c4dd | ||
|
|
8b0409b228 | ||
|
|
54641a2304 | ||
|
|
50148e9640 | ||
|
|
e85dbda62a | ||
|
|
107a2e4a5c | ||
|
|
41973d0e92 | ||
|
|
363396037d | ||
|
|
e9b704d21f | ||
|
|
bd90ba9326 | ||
|
|
9144765d56 | ||
|
|
6b3fed1ce5 | ||
|
|
8347fd36ba | ||
|
|
848abfc1a7 | ||
|
|
64394c0b15 | ||
|
|
8748c76de2 | ||
|
|
a77c426b2d | ||
|
|
b0280e9d93 | ||
|
|
25f15073cc | ||
|
|
34a1eef252 | ||
|
|
771a041750 | ||
|
|
ff0d53d945 | ||
|
|
afe2c00841 | ||
|
|
9a7a88eea2 | ||
|
|
0b328a7ee0 | ||
|
|
e92981b476 | ||
|
|
ac56ac98f7 | ||
|
|
d7cbec1a02 | ||
|
|
58b6fb36f8 | ||
|
|
606dbc6eb4 | ||
|
|
f1719cfc5f | ||
|
|
4ff9681667 | ||
|
|
f5eafe6522 | ||
|
|
00908856c3 | ||
|
|
22655e67ff | ||
|
|
16094be4a3 | ||
|
|
8d9b209014 | ||
|
|
f7d10707e7 | ||
|
|
0399feff4d | ||
|
|
deabb54828 | ||
|
|
c1a45d6258 | ||
|
|
5d46ecdbe6 | ||
|
|
ddd5e8a209 | ||
|
|
18337927f5 | ||
|
|
21f1eb2d14 | ||
|
|
34f595cc78 | ||
|
|
7d57d08b32 | ||
|
|
8b8e55aa17 | ||
|
|
9eac5f35d8 | ||
|
|
47d3c7e05a | ||
|
|
59847f4f30 | ||
|
|
caec47b1e5 | ||
|
|
08415bd824 | ||
|
|
92bf7c94d0 | ||
|
|
4d263a09db | ||
|
|
59da03d660 | ||
|
|
b17cb60b5c | ||
|
|
788cc02685 | ||
|
|
169e6327ea | ||
|
|
807924c0bc | ||
|
|
1558dd8309 | ||
|
|
dd82c9f8f9 | ||
|
|
e166722026 | ||
|
|
8117809901 | ||
|
|
7286b1847d | ||
|
|
b8b4d35763 | ||
|
|
78c125af4e | ||
|
|
18d3fe55f8 | ||
|
|
40ccd219f4 | ||
|
|
ba7b787dd3 | ||
|
|
de1a94ff61 | ||
|
|
6c695e3fd0 | ||
|
|
0bac9752ba | ||
|
|
138ca8d3a3 | ||
|
|
6e206704f9 | ||
|
|
013a924e43 | ||
|
|
54433637eb | ||
|
|
8fb2f9db7c | ||
|
|
9c378216f6 | ||
|
|
668103a00f | ||
|
|
15c18dd899 | ||
|
|
886187baee | ||
|
|
3a2f387892 | ||
|
|
e9a96ff80a | ||
|
|
6b13d18137 | ||
|
|
2185afefed | ||
|
|
5786d0c279 | ||
|
|
c0e91e4f16 | ||
|
|
53ce522c08 | ||
|
|
9f21b54c4e | ||
|
|
8bff332be0 | ||
|
|
0755702fe3 | ||
|
|
a16f7e7cca | ||
|
|
92efb3d20b | ||
|
|
4f0600421c | ||
|
|
ad0d120ae6 | ||
|
|
ecea101962 | ||
|
|
fcc936ceff | ||
|
|
7820bf2510 | ||
|
|
4a357e791e | ||
|
|
cf15d1741f | ||
|
|
9ad4cc8783 | ||
|
|
edb644baef | ||
|
|
7bd080760e | ||
|
|
4f78c32461 | ||
|
|
9a2aba56fc | ||
|
|
20e4643560 | ||
|
|
34ad5d61f6 | ||
|
|
39b9260719 | ||
|
|
33b4cd8636 | ||
|
|
f6e1af30b3 | ||
|
|
a50d2709e7 | ||
|
|
c7107de2a7 | ||
|
|
b5c3873cfd | ||
|
|
ef579cbe3c | ||
|
|
0c1fecfb2b | ||
|
|
b6d9c2e486 | ||
|
|
8cf6289d9c | ||
|
|
8619682da3 | ||
|
|
308d3ad84b | ||
|
|
4152e93bb7 | ||
|
|
f01076856b | ||
|
|
3100c202e8 | ||
|
|
2a45f57386 | ||
|
|
7fef3bd701 | ||
|
|
4781fc19fe | ||
|
|
490414716d | ||
|
|
7e9343c697 | ||
|
|
f767a098d6 | ||
|
|
66422437d3 | ||
|
|
2b694bab16 | ||
|
|
965dba63d7 | ||
|
|
676be9da16 | ||
|
|
237d954b65 | ||
|
|
af166a66b3 | ||
|
|
3c913f196f | ||
|
|
7db6850528 | ||
|
|
7abaf0e215 | ||
|
|
0b8f07f58e | ||
|
|
85d532953f | ||
|
|
f98d834edb | ||
|
|
f4a4930f42 | ||
|
|
6d5b31f527 | ||
|
|
288fa732ca | ||
|
|
d3af39a7ae | ||
|
|
fa51f7e10e | ||
|
|
651c00239a | ||
|
|
bc207714da | ||
|
|
073f3f9dfc | ||
|
|
549c3ce598 | ||
|
|
9de4cbbbd6 | ||
|
|
13eb1f6330 | ||
|
|
4b6cae0fcd | ||
|
|
98df309d28 | ||
|
|
fb4367f9ef | ||
|
|
ce633b54be | ||
|
|
2e38b01d80 | ||
|
|
b579eb954e | ||
|
|
78849c43f1 | ||
|
|
2f98d95b66 | ||
|
|
d826ae5daf | ||
|
|
40f194fe4b | ||
|
|
9b66eae12c | ||
|
|
853d9eaa4a | ||
|
|
a4121f8b5a | ||
|
|
e050385e27 | ||
|
|
6ca3b8aa81 | ||
|
|
1bb646fb91 | ||
|
|
a9724ad894 | ||
|
|
909e01bde5 | ||
|
|
d0fd9af5e6 | ||
|
|
61984a5748 | ||
|
|
1b9c2bb16b | ||
|
|
782223a643 | ||
|
|
c844c6b712 | ||
|
|
fd6546c5df | ||
|
|
85031658d1 | ||
|
|
6ce53b142d | ||
|
|
ee3bc89a54 | ||
|
|
ca13ad8d25 | ||
|
|
9ae6d2cd05 | ||
|
|
d2fc4e8abd | ||
|
|
dedce07530 | ||
|
|
baa5a74ba0 | ||
|
|
e144f7c85a | ||
|
|
4e6cf15a09 | ||
|
|
2287250a07 | ||
|
|
68155e8f89 | ||
|
|
af142fc433 | ||
|
|
92af92ccbe | ||
|
|
900beae046 | ||
|
|
dad4376030 | ||
|
|
204822b66f | ||
|
|
b0ad864fe0 | ||
|
|
d0016bf6c4 | ||
|
|
f690522725 | ||
|
|
38d2b124d8 | ||
|
|
513ba6d19d | ||
|
|
e578ca9a82 | ||
|
|
a720903083 | ||
|
|
056447fad9 | ||
|
|
27794021d9 | ||
|
|
2c88810459 | ||
|
|
bd5dd130e5 | ||
|
|
e439e057a0 | ||
|
|
17f4e23215 | ||
|
|
871cdc5bb8 | ||
|
|
a5f7d0277f | ||
|
|
5217199d0a | ||
|
|
01706483fb | ||
|
|
21e257e64d | ||
|
|
21302782e1 | ||
|
|
8e8efc67e6 | ||
|
|
d3fcf2e0c4 | ||
|
|
8d6b200dd7 | ||
|
|
9f1ab080ee | ||
|
|
2448976643 | ||
|
|
cf5f56af6f | ||
|
|
5003499700 | ||
|
|
8aefb1ed82 | ||
|
|
5201001f3a | ||
|
|
f145cb69de | ||
|
|
a8ab3a5ca1 | ||
|
|
1342a66881 | ||
|
|
a22308b13b | ||
|
|
f18db06471 | ||
|
|
6f48983efe | ||
|
|
20c95737cb | ||
|
|
6cd65ae9a7 | ||
|
|
f53768fc84 | ||
|
|
d707fb4760 | ||
|
|
7194a3d7a8 | ||
|
|
4a2ca8c7c8 | ||
|
|
b00a8350a6 | ||
|
|
3f4f9abb36 | ||
|
|
adbce87ccd | ||
|
|
6fb6e1dc82 | ||
|
|
56509eab5f | ||
|
|
3e72cd11a3 | ||
|
|
089bcba89f | ||
|
|
92e4055f85 | ||
|
|
b5797503a8 | ||
|
|
182258761f | ||
|
|
57aef7f1ec | ||
|
|
3fdcbfe002 | ||
|
|
a92ddc6d0b | ||
|
|
10321adc0b | ||
|
|
264c69d046 | ||
|
|
de95b6c347 | ||
|
|
fb499154bd | ||
|
|
82d697b657 | ||
|
|
21a2e9583b | ||
|
|
9fc62a1d81 | ||
|
|
4751f40c2b | ||
|
|
267e88001b | ||
|
|
50391e144d | ||
|
|
c6253fc025 | ||
|
|
f43ad8d062 | ||
|
|
bbd039e487 | ||
|
|
3834531488 | ||
|
|
28bfd39bca | ||
|
|
5c0a83eae5 | ||
|
|
e323fd169e | ||
|
|
842eb22e1e | ||
|
|
a1a71a88bb | ||
|
|
76eb935024 | ||
|
|
b5249d196d | ||
|
|
d445bf1ecd | ||
|
|
679398be00 | ||
|
|
3bc3bfb15e | ||
|
|
fa79da37b6 | ||
|
|
ca7c59d313 | ||
|
|
bde397503e | ||
|
|
5297722ede | ||
|
|
d8d288fca2 | ||
|
|
04edcf39f7 | ||
|
|
9faf550fa1 | ||
|
|
e5e7e5e406 | ||
|
|
3be90b02d6 | ||
|
|
8904869350 | ||
|
|
4797926be6 | ||
|
|
e4a5cd214f | ||
|
|
4a1423da88 | ||
|
|
f8bea82ce8 | ||
|
|
f1ad94b472 | ||
|
|
fef931392f | ||
|
|
7425771c78 | ||
|
|
f032f001f3 | ||
|
|
12a8662ae9 | ||
|
|
4ec9df76cd | ||
|
|
d218924b4f | ||
|
|
810a6e4b39 | ||
|
|
d0557677c7 | ||
|
|
b61c47d42f | ||
|
|
eb82df5994 | ||
|
|
7ebee78c75 | ||
|
|
b08d2d45b7 | ||
|
|
ea6f2477ef | ||
|
|
00ae8aabf1 | ||
|
|
ee1a7b6e62 | ||
|
|
5ef3cdb428 | ||
|
|
fb5a5041d5 | ||
|
|
a5eb93255b | ||
|
|
ce268260b1 | ||
|
|
e5062cb745 | ||
|
|
da713b0993 | ||
|
|
621ec80bbe | ||
|
|
62073fa74d | ||
|
|
1415829eaf | ||
|
|
6a1d6e8dd3 | ||
|
|
1cb64f0c9f | ||
|
|
6f4e855b02 | ||
|
|
7e1f7a8729 | ||
|
|
56ac80f475 | ||
|
|
b90807c4d3 | ||
|
|
0c7e1f1a6b | ||
|
|
eb3a0be809 | ||
|
|
f596cc4eec | ||
|
|
7986fd3e31 | ||
|
|
a407e0082b | ||
|
|
924130e0fe | ||
|
|
cd41727583 | ||
|
|
10e24e7343 | ||
|
|
120be979e9 | ||
|
|
53fb28624e | ||
|
|
b88a0d8de3 | ||
|
|
89361b3bea | ||
|
|
a197cdcce5 | ||
|
|
a57e8f9864 | ||
|
|
459cf051bf | ||
|
|
8cd5b1f582 | ||
|
|
60e65bec35 | ||
|
|
0e19b47755 | ||
|
|
6b6c109903 | ||
|
|
f836629dda | ||
|
|
746a535c7d | ||
|
|
078fe3ccf1 | ||
|
|
af726d465d | ||
|
|
23792eb069 | ||
|
|
0387da48a4 | ||
|
|
efb40a6567 | ||
|
|
05c41c083e | ||
|
|
4807ec3368 | ||
|
|
e4b6289c0b | ||
|
|
15fa09167b | ||
|
|
a1dec7594d | ||
|
|
1c24b2c5c4 | ||
|
|
1a74feb253 | ||
|
|
8c87a87da6 | ||
|
|
860a2131b3 | ||
|
|
0b592c69b0 | ||
|
|
587a647c11 | ||
|
|
8faac078fd | ||
|
|
44489bf6f8 | ||
|
|
887e4067ec | ||
|
|
3738115b6d | ||
|
|
65bdc207b7 | ||
|
|
366d8a0f0e | ||
|
|
9d8e276950 | ||
|
|
2ecd11eb35 | ||
|
|
cf4e574c50 | ||
|
|
225e5dac66 | ||
|
|
c02b5abc6e | ||
|
|
7fd8154ea8 | ||
|
|
cc6f524168 | ||
|
|
6eebd95de1 | ||
|
|
ce0007acd2 | ||
|
|
5a08e4619c | ||
|
|
8204f2007a | ||
|
|
0d2ce4c038 | ||
|
|
65f2790170 | ||
|
|
79b15e2ac6 | ||
|
|
6234065898 | ||
|
|
7568582b05 | ||
|
|
93a868a571 | ||
|
|
f20d892573 | ||
|
|
07aa46c2d6 | ||
|
|
09248fdb14 | ||
|
|
8122ab2b2c | ||
|
|
ebce183925 | ||
|
|
38e421d9c1 | ||
|
|
7790f2e7ba | ||
|
|
d5fc1bf0b4 | ||
|
|
7649c781dc | ||
|
|
35cb4343e6 | ||
|
|
f753728e97 | ||
|
|
18c7fae463 | ||
|
|
539ea5bd44 |
1
.gitignore
vendored
@@ -1 +1,2 @@
|
||||
CMakeLists.txt.*
|
||||
build/
|
||||
|
||||
61
CHANGELOG
Normal file
@@ -0,0 +1,61 @@
|
||||
2.0 Alpha 6 (2014-04-06)
|
||||
=========================
|
||||
|
||||
- Add option to lock databases after user inactivity [#62]
|
||||
- Add compatibility with libgcrypt 1.6 [#129]
|
||||
- Display passwords in monospace font [#51]
|
||||
- Use an icon for the button that shows/masks passwords [#38]
|
||||
- Add an option to show passwords by default [#93]
|
||||
- Improve password generator design [#122]
|
||||
- On Linux link .kdbx files with KeePassX
|
||||
- Remember window size [#154]
|
||||
- Disallow global auto-typing when the database is locked
|
||||
|
||||
2.0 Alpha 5 (2013-12-20)
|
||||
=========================
|
||||
|
||||
- Support copying entries and groups using drag'n'drop [#74]
|
||||
- Open last used databases on startup [#36]
|
||||
- Made the kdbx file parser more robust
|
||||
- Only edit entries on doubleclick (not single) or with enter key
|
||||
- Allow removing multiple entries
|
||||
- Added option to minimize window when copying data to clipboard
|
||||
- Save password generator settings
|
||||
- Fixed auto-type producing wrong chars in some keyboard configurations [#116]
|
||||
- Added some more actions to the toolbar
|
||||
|
||||
2.0 Alpha 4 (2013-03-29)
|
||||
=========================
|
||||
|
||||
- Add random password generator [#52]
|
||||
- Merge the 'Description' tab into the 'Entry' tab [#59]
|
||||
- Fix crash when deleting history items [#56]
|
||||
- Fix crash on Mac OS X Mountain Lion during startup [#50]
|
||||
- Improved KeePassX application icon [#58]
|
||||
|
||||
2.0 Alpha 3 (2012-10-27)
|
||||
=========================
|
||||
|
||||
- Auto-Type on Linux / X11
|
||||
- Database locking
|
||||
- Fix database corruption when changing key transformation rounds [#34]
|
||||
- Verify header data of kdbx files
|
||||
- Add menu entry to open URLs in the browser
|
||||
- Add menu entry to copy an entry attribute to clipboard
|
||||
|
||||
2.0 Alpha 2 (2012-07-02)
|
||||
=========================
|
||||
|
||||
- Import kdb (KeePass 1) files [#2]
|
||||
- Display history items [#23]
|
||||
- Implement history item limits [#16]
|
||||
- Group and entry icons can be set [#22]
|
||||
- Add keyboard shortcuts
|
||||
- Search in databases [#24]
|
||||
- Sortable entry view
|
||||
- Support building Mac OS X bundles
|
||||
|
||||
2.0 Alpha 1 (2012-05-07)
|
||||
=========================
|
||||
|
||||
- First release.
|
||||
194
CMakeLists.txt
@@ -13,37 +13,48 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
if(NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING
|
||||
"Choose the type of build, options are: None Debug Release RelWithDebInfo Debug Debugfull Profile MinSizeRel."
|
||||
FORCE)
|
||||
endif()
|
||||
|
||||
project(KeePassX)
|
||||
|
||||
cmake_minimum_required(VERSION 2.8.0)
|
||||
cmake_minimum_required(VERSION 2.6.4)
|
||||
|
||||
set( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake )
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
|
||||
|
||||
include(CheckCCompilerFlag)
|
||||
include(CheckCXXCompilerFlag)
|
||||
include(CheckCXXSourceCompiles)
|
||||
|
||||
option(WITH_TESTS "Enable building of unit tests" ON)
|
||||
option(WITH_GUI_TESTS "Enable building of GUI tests" OFF)
|
||||
option(WITH_LTO "Enable Link Time Optimization (LTO)" OFF)
|
||||
option(WITH_PIE "Build as Position-independent executable (PIE)" OFF)
|
||||
option(WITH_CXX11 "Build with the C++ 11 standard" OFF)
|
||||
|
||||
set( KEEPASSX_VERSION "2.0 alpha 1" )
|
||||
set(KEEPASSX_VERSION "2.0 alpha 6")
|
||||
set(KEEPASSX_VERSION_NUM "1.9.85")
|
||||
|
||||
if("${CMAKE_C_COMPILER}" MATCHES "clang$" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang")
|
||||
set(CMAKE_COMPILER_IS_CLANG 1)
|
||||
endif("${CMAKE_C_COMPILER}" MATCHES "clang$" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang")
|
||||
endif()
|
||||
|
||||
if("${CMAKE_CXX_COMPILER}" MATCHES "clang(\\+\\+)?$" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
set(CMAKE_COMPILER_IS_CLANGXX 1)
|
||||
endif("${CMAKE_CXX_COMPILER}" MATCHES "clang(\\+\\+)?$" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
endif()
|
||||
|
||||
macro(add_gcc_compiler_cxxflags FLAGS)
|
||||
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${FLAGS}")
|
||||
endif(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX)
|
||||
endif()
|
||||
endmacro(add_gcc_compiler_cxxflags)
|
||||
|
||||
macro(add_gcc_compiler_cflags FLAGS)
|
||||
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_CLANG)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${FLAGS}")
|
||||
endif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_CLANG)
|
||||
endif()
|
||||
endmacro(add_gcc_compiler_cflags)
|
||||
|
||||
macro(add_gcc_compiler_flags FLAGS)
|
||||
@@ -53,35 +64,45 @@ endmacro(add_gcc_compiler_flags)
|
||||
|
||||
add_definitions(-DQT_NO_KEYWORDS -DQT_NO_EXCEPTIONS -DQT_NO_STL -DQT_STRICT_ITERATORS -DQT_NO_CAST_TO_ASCII)
|
||||
|
||||
add_gcc_compiler_flags("-ansi -fno-common -fstack-protector -D_FORTIFY_SOURCE=2")
|
||||
add_gcc_compiler_flags("-fno-common -fstack-protector --param=ssp-buffer-size=4")
|
||||
add_gcc_compiler_flags("-Wall -Wextra -Wundef -Wpointer-arith -Wno-long-long")
|
||||
add_gcc_compiler_flags("-Wformat=2 -Werror=format-security -Wmissing-format-attribute")
|
||||
add_gcc_compiler_flags("-Wformat=2 -Wmissing-format-attribute")
|
||||
add_gcc_compiler_flags("-fvisibility=hidden")
|
||||
add_gcc_compiler_cxxflags("-fvisibility-inlines-hidden")
|
||||
|
||||
add_gcc_compiler_cxxflags("-fno-exceptions -fno-rtti")
|
||||
add_gcc_compiler_cxxflags("-Wnon-virtual-dtor -Wold-style-cast -Woverloaded-virtual")
|
||||
add_gcc_compiler_cflags("-Wchar-subscripts -Wwrite-strings -Werror=implicit-function-declaration")
|
||||
add_gcc_compiler_cflags("-Wchar-subscripts -Wwrite-strings")
|
||||
|
||||
if(CMAKE_COMPILER_IS_CLANGXX)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mllvm -stack-protector-buffer-size=4")
|
||||
elseif(CMAKE_COMPILER_IS_GNUCXX)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wcast-align --param=ssp-buffer-size=4")
|
||||
endif(CMAKE_COMPILER_IS_CLANGXX)
|
||||
string(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_LOWER)
|
||||
if (CMAKE_BUILD_TYPE_LOWER MATCHES (release|relwithdebinfo|minsizerel))
|
||||
add_gcc_compiler_flags("-D_FORTIFY_SOURCE=2")
|
||||
endif()
|
||||
|
||||
if(CMAKE_COMPILER_IS_CLANG)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mllvm -stack-protector-buffer-size=4")
|
||||
elseif(CMAKE_COMPILER_IS_GNUCC)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wcast-align --param=ssp-buffer-size=4")
|
||||
endif(CMAKE_COMPILER_IS_CLANG)
|
||||
check_c_compiler_flag("-Werror=format-security -Werror=implicit-function-declaration" WERROR_C_AVAILABLE)
|
||||
check_cxx_compiler_flag("-Werror=format-security" WERROR_CXX_AVAILABLE)
|
||||
if(WERROR_C_AVAILABLE AND WERROR_CXX_AVAILABLE)
|
||||
add_gcc_compiler_flags("-Werror=format-security")
|
||||
add_gcc_compiler_cflags("-Werror=implicit-function-declaration")
|
||||
endif()
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wcast-align")
|
||||
endif()
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCC)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wcast-align")
|
||||
endif()
|
||||
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--no-add-needed -Wl,--as-needed -Wl,--no-undefined")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-z,relro")
|
||||
endif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-add-needed -Wl,--as-needed")
|
||||
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,-z,relro")
|
||||
endif()
|
||||
|
||||
if(WITH_LTO)
|
||||
include(CheckCXXCompilerFlag)
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCC and CMAKE_COMPILER_IS_GNUCXX)
|
||||
if(CMAKE_COMPILER_IS_GNUCC AND CMAKE_COMPILER_IS_GNUCXX)
|
||||
check_cxx_compiler_flag("-flto -fuse-linker-plugin" LTO_AVAILABLE)
|
||||
|
||||
if(LTO_AVAILABLE)
|
||||
@@ -91,54 +112,68 @@ if(WITH_LTO)
|
||||
endif(LTO_AVAILABLE)
|
||||
else()
|
||||
message(FATAL_ERROR "LTO is only supported with gcc")
|
||||
endif(CMAKE_COMPILER_IS_GNUCC and CMAKE_COMPILER_IS_GNUCXX)
|
||||
endif(WITH_LTO)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_PIE)
|
||||
if((CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_CLANG) AND (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX))
|
||||
add_gcc_compiler_flags("-fPIE")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fPIE -pie")
|
||||
else()
|
||||
message(FATAL_ERROR "PIE is only supported with gcc and clang")
|
||||
endif((CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_CLANG) AND (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX))
|
||||
endif(WITH_PIE)
|
||||
|
||||
if( APPLE OR MINGW )
|
||||
set( PROGNAME KeePassX )
|
||||
else( APPLE OR MINGW )
|
||||
set( PROGNAME keepassx )
|
||||
endif( APPLE OR MINGW )
|
||||
if (WITH_CXX11)
|
||||
add_gcc_compiler_cxxflags("-std=c++0x")
|
||||
add_gcc_compiler_cflags("-ansi")
|
||||
else()
|
||||
add_gcc_compiler_flags("-ansi")
|
||||
endif()
|
||||
|
||||
if(MINGW)
|
||||
set(BIN_INSTALL_DIR "")
|
||||
set(CMAKE_RC_COMPILER_INIT windres)
|
||||
enable_language(RC)
|
||||
set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> <FLAGS> -O coff <DEFINES> -i <SOURCE> -o <OBJECT>")
|
||||
endif()
|
||||
|
||||
if(APPLE OR MINGW)
|
||||
set(PROGNAME KeePassX)
|
||||
else()
|
||||
set(PROGNAME keepassx)
|
||||
endif()
|
||||
|
||||
if(APPLE AND "${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr/local")
|
||||
set(CMAKE_INSTALL_PREFIX "/Applications")
|
||||
endif()
|
||||
|
||||
if(MINGW)
|
||||
set(BIN_INSTALL_DIR ".")
|
||||
set(PLUGIN_INSTALL_DIR ".")
|
||||
set(DATA_INSTALL_DIR "share")
|
||||
elseif(APPLE)
|
||||
set(BIN_INSTALL_DIR "")
|
||||
set(DATA_INSTALL_DIR "Contents/Resources")
|
||||
else(MINGW)
|
||||
set(BIN_INSTALL_DIR "bin")
|
||||
set(DATA_INSTALL_DIR "share/keepassx")
|
||||
endif( MINGW )
|
||||
set(BIN_INSTALL_DIR ".")
|
||||
set(PLUGIN_INSTALL_DIR ".")
|
||||
set(DATA_INSTALL_DIR "${PROGNAME}.app/Contents/Resources")
|
||||
else()
|
||||
include(GNUInstallDirs)
|
||||
|
||||
if( WITH_TESTS )
|
||||
set(BIN_INSTALL_DIR "${CMAKE_INSTALL_BINDIR}")
|
||||
set(PLUGIN_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/keepassx")
|
||||
set(DATA_INSTALL_DIR "${CMAKE_INSTALL_DATAROOTDIR}/keepassx")
|
||||
endif()
|
||||
|
||||
if(WITH_TESTS)
|
||||
enable_testing()
|
||||
endif( WITH_TESTS )
|
||||
endif(WITH_TESTS)
|
||||
|
||||
find_package(Qt4 4.6.0 REQUIRED QtCore QtGui QtTest)
|
||||
add_definitions(${QT_DEFINITIONS} -DQT_CORE_LIB -DQT_GUI_LIB)
|
||||
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_DEBUG QT_DEBUG)
|
||||
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_RELEASE QT_NO_DEBUG)
|
||||
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_RELWITHDEBINFO QT_NO_DEBUG)
|
||||
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_MINSIZEREL QT_NO_DEBUG)
|
||||
IF(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
|
||||
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS QT_NO_DEBUG)
|
||||
ENDIF()
|
||||
set(QT_REQUIRED_MODULES QtCore QtGui QtTest)
|
||||
if(UNIX AND NOT APPLE)
|
||||
set(QT_REQUIRED_MODULES ${QT_REQUIRED_MODULES} QtDBus)
|
||||
endif()
|
||||
|
||||
find_package(Qt4 4.6.0 REQUIRED ${QT_REQUIRED_MODULES})
|
||||
include(${QT_USE_FILE})
|
||||
|
||||
find_package(Gcrypt REQUIRED)
|
||||
if(NOT (${GCRYPT_VERSION_STRING} VERSION_LESS "1.6.0"))
|
||||
message(STATUS "Gcrypt ${GCRYPT_VERSION_STRING} supports the SALSA20 cipher")
|
||||
set(GCRYPT_HAS_SALSA20 1)
|
||||
endif()
|
||||
|
||||
find_package(ZLIB REQUIRED)
|
||||
|
||||
include(CheckCXXSourceCompiles)
|
||||
check_cxx_source_compiles("
|
||||
#include <zlib.h>
|
||||
|
||||
@@ -150,13 +185,44 @@ check_cxx_source_compiles("
|
||||
|
||||
if(NOT ZLIB_SUPPORTS_GZIP)
|
||||
message(FATAL_ERROR "zlib 1.2.x or higher is required to use the gzip format")
|
||||
endif(NOT ZLIB_SUPPORTS_GZIP)
|
||||
endif()
|
||||
|
||||
include_directories(SYSTEM ${QT_INCLUDE_DIR} ${GCRYPT_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR})
|
||||
if(UNIX)
|
||||
check_cxx_source_compiles("#include <sys/prctl.h>
|
||||
int main() { prctl(PR_SET_DUMPABLE, 0); return 0; }"
|
||||
HAVE_PR_SET_DUMPABLE)
|
||||
|
||||
check_cxx_source_compiles("#include <sys/resource.h>
|
||||
int main() {
|
||||
struct rlimit limit;
|
||||
limit.rlim_cur = 0;
|
||||
limit.rlim_max = 0;
|
||||
setrlimit(RLIMIT_CORE, &limit);
|
||||
return 0;
|
||||
}" HAVE_RLIMIT_CORE)
|
||||
|
||||
if(APPLE)
|
||||
check_cxx_source_compiles("#include <sys/types.h>
|
||||
#include <sys/ptrace.h>
|
||||
int main() { ptrace(PT_DENY_ATTACH, 0, 0, 0); return 0; }"
|
||||
HAVE_PT_DENY_ATTACH)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include_directories(SYSTEM ${GCRYPT_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR})
|
||||
|
||||
if(NOT (${CMAKE_VERSION} VERSION_LESS 2.8.3))
|
||||
set(PRINT_SUMMARY ON)
|
||||
include(FeatureSummary)
|
||||
endif()
|
||||
|
||||
add_subdirectory(src)
|
||||
add_subdirectory(share)
|
||||
add_subdirectory(utils)
|
||||
if( WITH_TESTS )
|
||||
if(WITH_TESTS)
|
||||
add_subdirectory(tests)
|
||||
endif( WITH_TESTS )
|
||||
endif(WITH_TESTS)
|
||||
|
||||
if(PRINT_SUMMARY)
|
||||
feature_summary(WHAT ALL)
|
||||
endif()
|
||||
|
||||
162
COPYING
@@ -20,22 +20,166 @@ Source: http://www.keepassx.org/
|
||||
|
||||
Copyright: 2010-2012, Felix Geyer <debfx@fobos.de>
|
||||
2011-2012, Florian Geyer <blueice@fobos.de>
|
||||
2012, Tobias Tangemann
|
||||
2007, Trolltech ASA <info@trolltech.com>
|
||||
2012, Intel Corporation
|
||||
2012, Nokia Corporation and/or its subsidiary(-ies)
|
||||
2000-2008, Tom Sato <VEF00200@nifty.ne.jp>
|
||||
2013, Laszlo Papp <lpapp@kde.org>
|
||||
2013, David Faure <faure@kde.org>
|
||||
License: GPL-2 or GPL-3
|
||||
|
||||
Files: share/icons/database/*.png
|
||||
Copyright: 2003-2004, David Vignoni <david@icon-king.com>
|
||||
License: LGPL-2.1
|
||||
Files: cmake/GNUInstallDirs.cmake
|
||||
Copyright: 2011 Nikita Krupen'ko <krnekit@gmail.com>
|
||||
2011 Kitware, Inc.
|
||||
License: BSD-3-clause
|
||||
|
||||
Files: share/icons/application/*/apps/keepassx.png, share/icons/application/scalable/apps/keepassx.svgz
|
||||
Files: share/icons/application/*/apps/keepassx.png
|
||||
share/icons/application/scalable/apps/keepassx.svgz
|
||||
Copyright: 2006, Otto Salminen
|
||||
2009, Miguelito Vieira
|
||||
2011, Felix Geyer <debfx@fobos.de>
|
||||
2011-2013, Felix Geyer <debfx@fobos.de>
|
||||
2012, Tobias Tangemann <tobiastangemann@gmail.com>
|
||||
License: GPL-2
|
||||
|
||||
Files: src/crypto/salsa20/*
|
||||
Copyright: is in public domain
|
||||
License: -
|
||||
Files: share/icons/application/*/actions/auto-type.png
|
||||
share/icons/application/*/actions/database-change-key.png
|
||||
share/icons/application/*/actions/entry-clone.png
|
||||
share/icons/application/*/actions/entry-edit.png
|
||||
share/icons/application/*/actions/entry-new.png
|
||||
share/icons/application/*/actions/password-generate.png
|
||||
share/icons/database/C00_Password.png
|
||||
share/icons/database/C01_Package_Network.png
|
||||
share/icons/database/C02_MessageBox_Warning.png
|
||||
share/icons/database/C03_Server.png
|
||||
share/icons/database/C04_Klipper.png
|
||||
share/icons/database/C05_Edu_Languages.png
|
||||
share/icons/database/C06_KCMDF.png
|
||||
share/icons/database/C07_Kate.png
|
||||
share/icons/database/C08_Socket.png
|
||||
share/icons/database/C09_Identity.png
|
||||
share/icons/database/C10_Kontact.png
|
||||
share/icons/database/C11_Camera.png
|
||||
share/icons/database/C12_IRKickFlash.png
|
||||
share/icons/database/C13_KGPG_Key3.png
|
||||
share/icons/database/C14_Laptop_Power.png
|
||||
share/icons/database/C15_Scanner.png
|
||||
share/icons/database/C16_Mozilla_Firebird.png
|
||||
share/icons/database/C17_CDROM_Unmount.png
|
||||
share/icons/database/C18_Display.png
|
||||
share/icons/database/C19_Mail_Generic.png
|
||||
share/icons/database/C20_Misc.png
|
||||
share/icons/database/C21_KOrganizer.png
|
||||
share/icons/database/C22_ASCII.png
|
||||
share/icons/database/C23_Icons.png
|
||||
share/icons/database/C24_Connect_Established.png
|
||||
share/icons/database/C25_Folder_Mail.png
|
||||
share/icons/database/C26_FileSave.png
|
||||
share/icons/database/C27_NFS_Unmount.png
|
||||
share/icons/database/C28_QuickTime.png
|
||||
share/icons/database/C29_KGPG_Term.png
|
||||
share/icons/database/C30_Konsole.png
|
||||
share/icons/database/C31_FilePrint.png
|
||||
share/icons/database/C32_FSView.png
|
||||
share/icons/database/C33_Run.png
|
||||
share/icons/database/C34_Configure.png
|
||||
share/icons/database/C35_KRFB.png
|
||||
share/icons/database/C36_Ark.png
|
||||
share/icons/database/C37_KPercentage.png
|
||||
share/icons/database/C38_Samba_Unmount.png
|
||||
share/icons/database/C39_History.png
|
||||
share/icons/database/C40_Mail_Find.png
|
||||
share/icons/database/C41_VectorGfx.png
|
||||
share/icons/database/C42_KCMMemory.png
|
||||
share/icons/database/C43_EditTrash.png
|
||||
share/icons/database/C44_KNotes.png
|
||||
share/icons/database/C45_Cancel.png
|
||||
share/icons/database/C46_Help.png
|
||||
share/icons/database/C47_KPackage.png
|
||||
share/icons/database/C48_Folder.png
|
||||
share/icons/database/C49_Folder_Blue_Open.png
|
||||
share/icons/database/C50_Folder_Tar.png
|
||||
share/icons/database/C51_Decrypted.png
|
||||
share/icons/database/C52_Encrypted.png
|
||||
share/icons/database/C53_Apply.png
|
||||
share/icons/database/C54_Signature.png
|
||||
share/icons/database/C55_Thumbnail.png
|
||||
share/icons/database/C56_KAddressBook.png
|
||||
share/icons/database/C57_View_Text.png
|
||||
share/icons/database/C58_KGPG.png
|
||||
share/icons/database/C59_Package_Development.png
|
||||
share/icons/database/C60_KFM_Home.png
|
||||
share/icons/database/C61_Services.png
|
||||
Copyright: 2003-2004, David Vignoni <david@icon-king.com>
|
||||
License: LGPL-2.1
|
||||
Comment: from Nuvola icon theme
|
||||
|
||||
Files: src/streams/qtiocompressor.*, src/streams/QtIOCompressor, tests/modeltest.*
|
||||
Files: share/icons/application/*/actions/entry-delete.png
|
||||
share/icons/application/*/actions/group-delete.png
|
||||
share/icons/application/*/actions/group-edit.png
|
||||
share/icons/application/*/actions/group-new.png
|
||||
Copyright: 2003-2004, David Vignoni <david@icon-king.com>
|
||||
2012, Felix Geyer <debfx@fobos.de>
|
||||
License: LGPL-2.1
|
||||
Comment: based on Nuvola icon theme
|
||||
|
||||
Files: share/icons/application/*/actions/application-exit.png
|
||||
share/icons/application/*/actions/configure.png
|
||||
share/icons/application/*/actions/dialog-close.png
|
||||
share/icons/application/*/actions/dialog-ok.png
|
||||
share/icons/application/*/actions/document-close.png
|
||||
share/icons/application/*/actions/document-edit.png
|
||||
share/icons/application/*/actions/document-encrypt.png
|
||||
share/icons/application/*/actions/document-new.png
|
||||
share/icons/application/*/actions/document-open.png
|
||||
share/icons/application/*/actions/document-save.png
|
||||
share/icons/application/*/actions/document-save-as.png
|
||||
share/icons/application/*/actions/edit-clear-locationbar-ltr.png
|
||||
share/icons/application/*/actions/edit-clear-locationbar-rtl.png
|
||||
share/icons/application/*/actions/password-copy.png
|
||||
share/icons/application/*/actions/password-show-*.png
|
||||
share/icons/application/*/actions/system-search.png
|
||||
share/icons/application/*/status/dialog-error.png
|
||||
share/icons/application/*/status/dialog-information.png
|
||||
share/icons/application/*/status/dialog-warning.png
|
||||
share/icons/application/*/status/username-copy.png
|
||||
share/icons/svg/*.svgz
|
||||
Copyright: 2007, Nuno Pinheiro <nuno@oxygen-icons.org>
|
||||
2007, David Vignoni <david@icon-king.com>
|
||||
2007, David Miller <miller@oxygen-icons.org>
|
||||
2007, Johann Ollivier Lapeyre <johann@oxygen-icons.org>
|
||||
2007, Kenneth Wimer <kwwii@bootsplash.org>
|
||||
2007, Riccardo Iaconelli <riccardo@oxygen-icons.org>
|
||||
License: LGPL-3+
|
||||
Comment: from Oxygen icon theme (http://www.oxygen-icons.org/)
|
||||
|
||||
Files: share/icons/database/C62_Tux.png
|
||||
share/icons/database/C63_Feather.png
|
||||
share/icons/database/C64_Apple.png
|
||||
share/icons/database/C67_Certificate.png
|
||||
share/icons/database/C68_BlackBerry.png
|
||||
Copyright: Mairin Duffy
|
||||
Sarah Owens
|
||||
James Birkett
|
||||
Dominik Reichl
|
||||
License: CC0
|
||||
Comment: C62_Tux.png from https://openclipart.org/detail/103855
|
||||
C63_Feather.png from http://openclipart.org/detail/122017
|
||||
C64_Apple.png based on http://openclipart.org/detail/24319
|
||||
C67_Certificate.png based on https://openclipart.org/detail/16729
|
||||
C68_BlackBerry.png from https://openclipart.org/detail/4465
|
||||
|
||||
Files: share/icons/database/C65_W.png
|
||||
share/icons/database/C66_Money.png
|
||||
Copyright: none
|
||||
License: public-domain
|
||||
|
||||
Files: src/crypto/salsa20/*
|
||||
Copyright: none
|
||||
License: public-domain
|
||||
|
||||
Files: src/streams/qtiocompressor.*
|
||||
src/streams/QtIOCompressor
|
||||
tests/modeltest.*
|
||||
Copyright: 2009-2012, Nokia Corporation and/or its subsidiary(-ies)
|
||||
License: LGPL-2.1 or GPL-3
|
||||
|
||||
7
INSTALL
@@ -16,6 +16,13 @@ Installing:
|
||||
===========
|
||||
make install [DESTDIR=X]
|
||||
|
||||
Create a bundle on Mac:
|
||||
make package
|
||||
|
||||
Run tests:
|
||||
==========
|
||||
make test [CTEST_OUTPUT_ON_FAILURE=1] [ARGS+=-jX] [ARGS+="-E testgui"]
|
||||
|
||||
OS specific instructions:
|
||||
=========================
|
||||
https://www.keepassx.org/dev/projects/keepassx/wiki/Install_instructions
|
||||
|
||||
128
LICENSE.CC0
Normal file
@@ -0,0 +1,128 @@
|
||||
Creative Commons CC0 1.0 Universal
|
||||
|
||||
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
|
||||
LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
|
||||
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION
|
||||
ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE
|
||||
USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED HEREUNDER, AND
|
||||
DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM THE USE OF THIS DOCUMENT
|
||||
OR THE INFORMATION OR WORKS PROVIDED HEREUNDER.
|
||||
|
||||
Statement of Purpose
|
||||
|
||||
The laws of most jurisdictions throughout the world automatically confer
|
||||
exclusive Copyright and Related Rights (defined below) upon the creator
|
||||
and subsequent owner(s) (each and all, an "owner") of an original work
|
||||
of authorship and/or a database (each, a "Work").
|
||||
|
||||
Certain owners wish to permanently relinquish those rights to a Work for
|
||||
the purpose of contributing to a commons of creative, cultural and
|
||||
scientific works ("Commons") that the public can reliably and without
|
||||
fear of later claims of infringement build upon, modify, incorporate in
|
||||
other works, reuse and redistribute as freely as possible in any form
|
||||
whatsoever and for any purposes, including without limitation commercial
|
||||
purposes. These owners may contribute to the Commons to promote the
|
||||
ideal of a free culture and the further production of creative, cultural
|
||||
and scientific works, or to gain reputation or greater distribution for
|
||||
their Work in part through the use and efforts of others.
|
||||
|
||||
For these and/or other purposes and motivations, and without any
|
||||
expectation of additional consideration or compensation, the person
|
||||
associating CC0 with a Work (the "Affirmer"), to the extent that he or
|
||||
she is an owner of Copyright and Related Rights in the Work, voluntarily
|
||||
elects to apply CC0 to the Work and publicly distribute the Work under
|
||||
its terms, with knowledge of his or her Copyright and Related Rights in
|
||||
the Work and the meaning and intended legal effect of CC0 on those
|
||||
rights.
|
||||
|
||||
1. Copyright and Related Rights. A Work made available under CC0 may be
|
||||
protected by copyright and related or neighboring rights ("Copyright and
|
||||
Related Rights"). Copyright and Related Rights include, but are not
|
||||
limited to, the following:
|
||||
|
||||
i. the right to reproduce, adapt, distribute, perform, display,
|
||||
communicate, and translate a Work;
|
||||
|
||||
ii. moral rights retained by the original author(s) and/or performer(s);
|
||||
|
||||
iii. publicity and privacy rights pertaining to a person's image or
|
||||
likeness depicted in a Work;
|
||||
|
||||
iv. rights protecting against unfair competition in regards to a Work,
|
||||
subject to the limitations in paragraph 4(a), below;
|
||||
|
||||
v. rights protecting the extraction, dissemination, use and reuse of
|
||||
data in a Work;
|
||||
|
||||
vi. database rights (such as those arising under Directive 96/9/EC of
|
||||
the European Parliament and of the Council of 11 March 1996 on the legal
|
||||
protection of databases, and under any national implementation thereof,
|
||||
including any amended or successor version of such directive); and
|
||||
|
||||
vii. other similar, equivalent or corresponding rights throughout the
|
||||
world based on applicable law or treaty, and any national
|
||||
implementations thereof.
|
||||
|
||||
2. Waiver. To the greatest extent permitted by, but not in contravention
|
||||
of, applicable law, Affirmer hereby overtly, fully, permanently,
|
||||
irrevocably and unconditionally waives, abandons, and surrenders all of
|
||||
Affirmer's Copyright and Related Rights and associated claims and causes
|
||||
of action, whether now known or unknown (including existing as well as
|
||||
future claims and causes of action), in the Work (i) in all territories
|
||||
worldwide, (ii) for the maximum duration provided by applicable law or
|
||||
treaty (including future time extensions), (iii) in any current or
|
||||
future medium and for any number of copies, and (iv) for any purpose
|
||||
whatsoever, including without limitation commercial, advertising or
|
||||
promotional purposes (the "Waiver"). Affirmer makes the Waiver for the
|
||||
benefit of each member of the public at large and to the detriment of
|
||||
Affirmer's heirs and successors, fully intending that such Waiver shall
|
||||
not be subject to revocation, rescission, cancellation, termination, or
|
||||
any other legal or equitable action to disrupt the quiet enjoyment of
|
||||
the Work by the public as contemplated by Affirmer's express Statement
|
||||
of Purpose.
|
||||
|
||||
3. Public License Fallback. Should any part of the Waiver for any reason
|
||||
be judged legally invalid or ineffective under applicable law, then the
|
||||
Waiver shall be preserved to the maximum extent permitted taking into
|
||||
account Affirmer's express Statement of Purpose. In addition, to the
|
||||
extent the Waiver is so judged Affirmer hereby grants to each affected
|
||||
person a royalty-free, non transferable, non sublicensable, non
|
||||
exclusive, irrevocable and unconditional license to exercise Affirmer's
|
||||
Copyright and Related Rights in the Work (i) in all territories
|
||||
worldwide, (ii) for the maximum duration provided by applicable law or
|
||||
treaty (including future time extensions), (iii) in any current or
|
||||
future medium and for any number of copies, and (iv) for any purpose
|
||||
whatsoever, including without limitation commercial, advertising or
|
||||
promotional purposes (the "License"). The License shall be deemed
|
||||
effective as of the date CC0 was applied by Affirmer to the Work. Should
|
||||
any part of the License for any reason be judged legally invalid or
|
||||
ineffective under applicable law, such partial invalidity or
|
||||
ineffectiveness shall not invalidate the remainder of the License, and
|
||||
in such case Affirmer hereby affirms that he or she will not (i)
|
||||
exercise any of his or her remaining Copyright and Related Rights in the
|
||||
Work or (ii) assert any associated claims and causes of action with
|
||||
respect to the Work, in either case contrary to Affirmer's express
|
||||
Statement of Purpose.
|
||||
|
||||
4. Limitations and Disclaimers.
|
||||
|
||||
a. No trademark or patent rights held by Affirmer are waived, abandoned,
|
||||
surrendered, licensed or otherwise affected by this document.
|
||||
|
||||
b. Affirmer offers the Work as-is and makes no representations or
|
||||
warranties of any kind concerning the Work, express, implied, statutory
|
||||
or otherwise, including without limitation warranties of title,
|
||||
merchantability, fitness for a particular purpose, non infringement, or
|
||||
the absence of latent or other defects, accuracy, or the present or
|
||||
absence of errors, whether or not discoverable, all to the greatest
|
||||
extent permissible under applicable law.
|
||||
|
||||
c. Affirmer disclaims responsibility for clearing rights of other
|
||||
persons that may apply to the Work or any use thereof, including without
|
||||
limitation any person's Copyright and Related Rights in the Work.
|
||||
Further, Affirmer disclaims responsibility for obtaining any necessary
|
||||
consents, permissions or other rights required for any use of the Work.
|
||||
|
||||
d. Affirmer understands and acknowledges that Creative Commons is not a
|
||||
party to this document and has no duty or obligation with respect to
|
||||
this CC0 or use of the Work.
|
||||
165
LICENSE.LGPL-3
Normal file
@@ -0,0 +1,165 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
|
||||
This version of the GNU Lesser General Public License incorporates
|
||||
the terms and conditions of version 3 of the GNU General Public
|
||||
License, supplemented by the additional permissions listed below.
|
||||
|
||||
0. Additional Definitions.
|
||||
|
||||
As used herein, "this License" refers to version 3 of the GNU Lesser
|
||||
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
||||
General Public License.
|
||||
|
||||
"The Library" refers to a covered work governed by this License,
|
||||
other than an Application or a Combined Work as defined below.
|
||||
|
||||
An "Application" is any work that makes use of an interface provided
|
||||
by the Library, but which is not otherwise based on the Library.
|
||||
Defining a subclass of a class defined by the Library is deemed a mode
|
||||
of using an interface provided by the Library.
|
||||
|
||||
A "Combined Work" is a work produced by combining or linking an
|
||||
Application with the Library. The particular version of the Library
|
||||
with which the Combined Work was made is also called the "Linked
|
||||
Version".
|
||||
|
||||
The "Minimal Corresponding Source" for a Combined Work means the
|
||||
Corresponding Source for the Combined Work, excluding any source code
|
||||
for portions of the Combined Work that, considered in isolation, are
|
||||
based on the Application, and not on the Linked Version.
|
||||
|
||||
The "Corresponding Application Code" for a Combined Work means the
|
||||
object code and/or source code for the Application, including any data
|
||||
and utility programs needed for reproducing the Combined Work from the
|
||||
Application, but excluding the System Libraries of the Combined Work.
|
||||
|
||||
1. Exception to Section 3 of the GNU GPL.
|
||||
|
||||
You may convey a covered work under sections 3 and 4 of this License
|
||||
without being bound by section 3 of the GNU GPL.
|
||||
|
||||
2. Conveying Modified Versions.
|
||||
|
||||
If you modify a copy of the Library, and, in your modifications, a
|
||||
facility refers to a function or data to be supplied by an Application
|
||||
that uses the facility (other than as an argument passed when the
|
||||
facility is invoked), then you may convey a copy of the modified
|
||||
version:
|
||||
|
||||
a) under this License, provided that you make a good faith effort to
|
||||
ensure that, in the event an Application does not supply the
|
||||
function or data, the facility still operates, and performs
|
||||
whatever part of its purpose remains meaningful, or
|
||||
|
||||
b) under the GNU GPL, with none of the additional permissions of
|
||||
this License applicable to that copy.
|
||||
|
||||
3. Object Code Incorporating Material from Library Header Files.
|
||||
|
||||
The object code form of an Application may incorporate material from
|
||||
a header file that is part of the Library. You may convey such object
|
||||
code under terms of your choice, provided that, if the incorporated
|
||||
material is not limited to numerical parameters, data structure
|
||||
layouts and accessors, or small macros, inline functions and templates
|
||||
(ten or fewer lines in length), you do both of the following:
|
||||
|
||||
a) Give prominent notice with each copy of the object code that the
|
||||
Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the object code with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
4. Combined Works.
|
||||
|
||||
You may convey a Combined Work under terms of your choice that,
|
||||
taken together, effectively do not restrict modification of the
|
||||
portions of the Library contained in the Combined Work and reverse
|
||||
engineering for debugging such modifications, if you also do each of
|
||||
the following:
|
||||
|
||||
a) Give prominent notice with each copy of the Combined Work that
|
||||
the Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
c) For a Combined Work that displays copyright notices during
|
||||
execution, include the copyright notice for the Library among
|
||||
these notices, as well as a reference directing the user to the
|
||||
copies of the GNU GPL and this license document.
|
||||
|
||||
d) Do one of the following:
|
||||
|
||||
0) Convey the Minimal Corresponding Source under the terms of this
|
||||
License, and the Corresponding Application Code in a form
|
||||
suitable for, and under terms that permit, the user to
|
||||
recombine or relink the Application with a modified version of
|
||||
the Linked Version to produce a modified Combined Work, in the
|
||||
manner specified by section 6 of the GNU GPL for conveying
|
||||
Corresponding Source.
|
||||
|
||||
1) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (a) uses at run time
|
||||
a copy of the Library already present on the user's computer
|
||||
system, and (b) will operate properly with a modified version
|
||||
of the Library that is interface-compatible with the Linked
|
||||
Version.
|
||||
|
||||
e) Provide Installation Information, but only if you would otherwise
|
||||
be required to provide such information under section 6 of the
|
||||
GNU GPL, and only to the extent that such information is
|
||||
necessary to install and execute a modified version of the
|
||||
Combined Work produced by recombining or relinking the
|
||||
Application with a modified version of the Linked Version. (If
|
||||
you use option 4d0, the Installation Information must accompany
|
||||
the Minimal Corresponding Source and Corresponding Application
|
||||
Code. If you use option 4d1, you must provide the Installation
|
||||
Information in the manner specified by section 6 of the GNU GPL
|
||||
for conveying Corresponding Source.)
|
||||
|
||||
5. Combined Libraries.
|
||||
|
||||
You may place library facilities that are a work based on the
|
||||
Library side by side in a single library together with other library
|
||||
facilities that are not Applications and are not covered by this
|
||||
License, and convey such a combined library under terms of your
|
||||
choice, if you do both of the following:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work based
|
||||
on the Library, uncombined with any other library facilities,
|
||||
conveyed under the terms of this License.
|
||||
|
||||
b) Give prominent notice with the combined library that part of it
|
||||
is a work based on the Library, and explaining where to find the
|
||||
accompanying uncombined form of the same work.
|
||||
|
||||
6. Revised Versions of the GNU Lesser General Public License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions
|
||||
of the GNU Lesser General Public License from time to time. Such new
|
||||
versions will be similar in spirit to the present version, but may
|
||||
differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Library as you received it specifies that a certain numbered version
|
||||
of the GNU Lesser General Public License "or any later version"
|
||||
applies to it, you have the option of following the terms and
|
||||
conditions either of that published version or of any later version
|
||||
published by the Free Software Foundation. If the Library as you
|
||||
received it does not specify a version number of the GNU Lesser
|
||||
General Public License, you may choose any version of the GNU Lesser
|
||||
General Public License ever published by the Free Software Foundation.
|
||||
|
||||
If the Library as you received it specifies that a proxy can decide
|
||||
whether future versions of the GNU Lesser General Public License shall
|
||||
apply, that proxy's public statement of acceptance of any version is
|
||||
permanent authorization for you to choose that version for the
|
||||
Library.
|
||||
@@ -17,7 +17,15 @@ find_path(GCRYPT_INCLUDE_DIR gcrypt.h)
|
||||
|
||||
find_library(GCRYPT_LIBRARIES gcrypt)
|
||||
|
||||
mark_as_advanced(GCRYPT_LIBRARIES GCRYPT_INCLUDE_DIR)
|
||||
|
||||
if(GCRYPT_INCLUDE_DIR AND EXISTS "${GCRYPT_INCLUDE_DIR}/gcrypt.h")
|
||||
file(STRINGS "${GCRYPT_INCLUDE_DIR}/gcrypt.h" GCRYPT_H REGEX "^#define GCRYPT_VERSION \"[^\"]*\"$")
|
||||
string(REGEX REPLACE "^.*GCRYPT_VERSION \"([0-9]+).*$" "\\1" GCRYPT_VERSION_MAJOR "${GCRYPT_H}")
|
||||
string(REGEX REPLACE "^.*GCRYPT_VERSION \"[0-9]+\\.([0-9]+).*$" "\\1" GCRYPT_VERSION_MINOR "${GCRYPT_H}")
|
||||
string(REGEX REPLACE "^.*GCRYPT_VERSION \"[0-9]+\\.[0-9]+\\.([0-9]+).*$" "\\1" GCRYPT_VERSION_PATCH "${GCRYPT_H}")
|
||||
set(GCRYPT_VERSION_STRING "${GCRYPT_VERSION_MAJOR}.${GCRYPT_VERSION_MINOR}.${GCRYPT_VERSION_PATCH}")
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Gcrypt DEFAULT_MSG GCRYPT_LIBRARIES GCRYPT_INCLUDE_DIR)
|
||||
|
||||
mark_as_advanced(GCRYPT_LIBRARIES GCRYPT_INCLUDE_DIR)
|
||||
|
||||
188
cmake/GNUInstallDirs.cmake
Normal file
@@ -0,0 +1,188 @@
|
||||
# - Define GNU standard installation directories
|
||||
# Provides install directory variables as defined for GNU software:
|
||||
# http://www.gnu.org/prep/standards/html_node/Directory-Variables.html
|
||||
# Inclusion of this module defines the following variables:
|
||||
# CMAKE_INSTALL_<dir> - destination for files of a given type
|
||||
# CMAKE_INSTALL_FULL_<dir> - corresponding absolute path
|
||||
# where <dir> is one of:
|
||||
# BINDIR - user executables (bin)
|
||||
# SBINDIR - system admin executables (sbin)
|
||||
# LIBEXECDIR - program executables (libexec)
|
||||
# SYSCONFDIR - read-only single-machine data (etc)
|
||||
# SHAREDSTATEDIR - modifiable architecture-independent data (com)
|
||||
# LOCALSTATEDIR - modifiable single-machine data (var)
|
||||
# LIBDIR - object code libraries (lib or lib64 or lib/<multiarch-tuple> on Debian)
|
||||
# INCLUDEDIR - C header files (include)
|
||||
# OLDINCLUDEDIR - C header files for non-gcc (/usr/include)
|
||||
# DATAROOTDIR - read-only architecture-independent data root (share)
|
||||
# DATADIR - read-only architecture-independent data (DATAROOTDIR)
|
||||
# INFODIR - info documentation (DATAROOTDIR/info)
|
||||
# LOCALEDIR - locale-dependent data (DATAROOTDIR/locale)
|
||||
# MANDIR - man documentation (DATAROOTDIR/man)
|
||||
# DOCDIR - documentation root (DATAROOTDIR/doc/PROJECT_NAME)
|
||||
# Each CMAKE_INSTALL_<dir> value may be passed to the DESTINATION options of
|
||||
# install() commands for the corresponding file type. If the includer does
|
||||
# not define a value the above-shown default will be used and the value will
|
||||
# appear in the cache for editing by the user.
|
||||
# Each CMAKE_INSTALL_FULL_<dir> value contains an absolute path constructed
|
||||
# from the corresponding destination by prepending (if necessary) the value
|
||||
# of CMAKE_INSTALL_PREFIX.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2011 Nikita Krupen'ko <krnekit@gmail.com>
|
||||
# Copyright 2011 Kitware, Inc.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
# (To distribute this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
# Installation directories
|
||||
#
|
||||
if(NOT DEFINED CMAKE_INSTALL_BINDIR)
|
||||
set(CMAKE_INSTALL_BINDIR "bin" CACHE PATH "user executables (bin)")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_SBINDIR)
|
||||
set(CMAKE_INSTALL_SBINDIR "sbin" CACHE PATH "system admin executables (sbin)")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_LIBEXECDIR)
|
||||
set(CMAKE_INSTALL_LIBEXECDIR "libexec" CACHE PATH "program executables (libexec)")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_SYSCONFDIR)
|
||||
set(CMAKE_INSTALL_SYSCONFDIR "etc" CACHE PATH "read-only single-machine data (etc)")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_SHAREDSTATEDIR)
|
||||
set(CMAKE_INSTALL_SHAREDSTATEDIR "com" CACHE PATH "modifiable architecture-independent data (com)")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_LOCALSTATEDIR)
|
||||
set(CMAKE_INSTALL_LOCALSTATEDIR "var" CACHE PATH "modifiable single-machine data (var)")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_LIBDIR)
|
||||
set(_LIBDIR_DEFAULT "lib")
|
||||
# Override this default 'lib' with 'lib64' iff:
|
||||
# - we are on Linux system but NOT cross-compiling
|
||||
# - we are NOT on debian
|
||||
# - we are on a 64 bits system
|
||||
# reason is: amd64 ABI: http://www.x86-64.org/documentation/abi.pdf
|
||||
# For Debian with multiarch, use 'lib/${CMAKE_LIBRARY_ARCHITECTURE}' if
|
||||
# CMAKE_LIBRARY_ARCHITECTURE is set (which contains e.g. "i386-linux-gnu"
|
||||
# See http://wiki.debian.org/Multiarch
|
||||
if((CMAKE_SYSTEM_NAME MATCHES "Linux|kFreeBSD" OR CMAKE_SYSTEM_NAME STREQUAL "GNU")
|
||||
AND NOT CMAKE_CROSSCOMPILING)
|
||||
if (EXISTS "/etc/debian_version") # is this a debian system ?
|
||||
if(CMAKE_LIBRARY_ARCHITECTURE)
|
||||
set(_LIBDIR_DEFAULT "lib/${CMAKE_LIBRARY_ARCHITECTURE}")
|
||||
endif()
|
||||
else() # not debian, rely on CMAKE_SIZEOF_VOID_P:
|
||||
if(NOT DEFINED CMAKE_SIZEOF_VOID_P)
|
||||
message(AUTHOR_WARNING
|
||||
"Unable to determine default CMAKE_INSTALL_LIBDIR directory because no target architecture is known. "
|
||||
"Please enable at least one language before including GNUInstallDirs.")
|
||||
else()
|
||||
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
|
||||
set(_LIBDIR_DEFAULT "lib64")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
set(CMAKE_INSTALL_LIBDIR "${_LIBDIR_DEFAULT}" CACHE PATH "object code libraries (${_LIBDIR_DEFAULT})")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_INCLUDEDIR)
|
||||
set(CMAKE_INSTALL_INCLUDEDIR "include" CACHE PATH "C header files (include)")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_OLDINCLUDEDIR)
|
||||
set(CMAKE_INSTALL_OLDINCLUDEDIR "/usr/include" CACHE PATH "C header files for non-gcc (/usr/include)")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_DATAROOTDIR)
|
||||
set(CMAKE_INSTALL_DATAROOTDIR "share" CACHE PATH "read-only architecture-independent data root (share)")
|
||||
endif()
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Values whose defaults are relative to DATAROOTDIR. Store empty values in
|
||||
# the cache and store the defaults in local variables if the cache values are
|
||||
# not set explicitly. This auto-updates the defaults as DATAROOTDIR changes.
|
||||
|
||||
if(NOT CMAKE_INSTALL_DATADIR)
|
||||
set(CMAKE_INSTALL_DATADIR "" CACHE PATH "read-only architecture-independent data (DATAROOTDIR)")
|
||||
set(CMAKE_INSTALL_DATADIR "${CMAKE_INSTALL_DATAROOTDIR}")
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_INSTALL_INFODIR)
|
||||
set(CMAKE_INSTALL_INFODIR "" CACHE PATH "info documentation (DATAROOTDIR/info)")
|
||||
set(CMAKE_INSTALL_INFODIR "${CMAKE_INSTALL_DATAROOTDIR}/info")
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_INSTALL_LOCALEDIR)
|
||||
set(CMAKE_INSTALL_LOCALEDIR "" CACHE PATH "locale-dependent data (DATAROOTDIR/locale)")
|
||||
set(CMAKE_INSTALL_LOCALEDIR "${CMAKE_INSTALL_DATAROOTDIR}/locale")
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_INSTALL_MANDIR)
|
||||
set(CMAKE_INSTALL_MANDIR "" CACHE PATH "man documentation (DATAROOTDIR/man)")
|
||||
set(CMAKE_INSTALL_MANDIR "${CMAKE_INSTALL_DATAROOTDIR}/man")
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_INSTALL_DOCDIR)
|
||||
set(CMAKE_INSTALL_DOCDIR "" CACHE PATH "documentation root (DATAROOTDIR/doc/PROJECT_NAME)")
|
||||
set(CMAKE_INSTALL_DOCDIR "${CMAKE_INSTALL_DATAROOTDIR}/doc/${PROJECT_NAME}")
|
||||
endif()
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
mark_as_advanced(
|
||||
CMAKE_INSTALL_BINDIR
|
||||
CMAKE_INSTALL_SBINDIR
|
||||
CMAKE_INSTALL_LIBEXECDIR
|
||||
CMAKE_INSTALL_SYSCONFDIR
|
||||
CMAKE_INSTALL_SHAREDSTATEDIR
|
||||
CMAKE_INSTALL_LOCALSTATEDIR
|
||||
CMAKE_INSTALL_LIBDIR
|
||||
CMAKE_INSTALL_INCLUDEDIR
|
||||
CMAKE_INSTALL_OLDINCLUDEDIR
|
||||
CMAKE_INSTALL_DATAROOTDIR
|
||||
CMAKE_INSTALL_DATADIR
|
||||
CMAKE_INSTALL_INFODIR
|
||||
CMAKE_INSTALL_LOCALEDIR
|
||||
CMAKE_INSTALL_MANDIR
|
||||
CMAKE_INSTALL_DOCDIR
|
||||
)
|
||||
|
||||
# Result directories
|
||||
#
|
||||
foreach(dir
|
||||
BINDIR
|
||||
SBINDIR
|
||||
LIBEXECDIR
|
||||
SYSCONFDIR
|
||||
SHAREDSTATEDIR
|
||||
LOCALSTATEDIR
|
||||
LIBDIR
|
||||
INCLUDEDIR
|
||||
OLDINCLUDEDIR
|
||||
DATAROOTDIR
|
||||
DATADIR
|
||||
INFODIR
|
||||
LOCALEDIR
|
||||
MANDIR
|
||||
DOCDIR
|
||||
)
|
||||
if(NOT IS_ABSOLUTE ${CMAKE_INSTALL_${dir}})
|
||||
set(CMAKE_INSTALL_FULL_${dir} "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_${dir}}")
|
||||
else()
|
||||
set(CMAKE_INSTALL_FULL_${dir} "${CMAKE_INSTALL_${dir}}")
|
||||
endif()
|
||||
endforeach()
|
||||
@@ -19,8 +19,34 @@ install(FILES ${DATABASE_ICONS} DESTINATION ${DATA_INSTALL_DIR}/icons/database)
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
install(DIRECTORY icons/application/ DESTINATION share/icons/hicolor
|
||||
FILES_MATCHING PATTERN "*.png" PATTERN "*.svgz")
|
||||
else(UNIX AND NOT APPLE)
|
||||
install(DIRECTORY icons/application/ DESTINATION ${DATA_INSTALL_DIR}/icons/application
|
||||
FILES_MATCHING PATTERN "*.png" PATTERN "*.svgz")
|
||||
FILES_MATCHING PATTERN "keepassx.png" PATTERN "keepassx.svgz")
|
||||
install(DIRECTORY icons/application/ DESTINATION share/icons/hicolor
|
||||
FILES_MATCHING PATTERN "application-x-keepassx.png" PATTERN "application-x-keepassx.svgz")
|
||||
install(FILES linux/keepassx.desktop DESTINATION share/applications)
|
||||
install(FILES linux/keepassx.xml DESTINATION share/mime/packages)
|
||||
endif(UNIX AND NOT APPLE)
|
||||
|
||||
if(APPLE)
|
||||
install(FILES macosx/keepassx.icns DESTINATION ${DATA_INSTALL_DIR})
|
||||
endif()
|
||||
|
||||
install(DIRECTORY icons/application/ DESTINATION ${DATA_INSTALL_DIR}/icons/application
|
||||
FILES_MATCHING PATTERN "*.png" PATTERN "*.svgz")
|
||||
|
||||
add_custom_target(icons
|
||||
COMMAND png2icns macosx/keepassx.icns
|
||||
icons/application/16x16/apps/keepassx.png
|
||||
icons/application/32x32/apps/keepassx.png
|
||||
icons/application/48x48/apps/keepassx.png
|
||||
icons/application/128x128/apps/keepassx.png
|
||||
icons/application/256x256/apps/keepassx.png
|
||||
COMMAND icotool -c -o windows/keepassx.ico
|
||||
icons/application/16x16/apps/keepassx.png
|
||||
icons/application/24x24/apps/keepassx.png
|
||||
icons/application/32x32/apps/keepassx.png
|
||||
icons/application/48x48/apps/keepassx.png
|
||||
icons/application/64x64/apps/keepassx.png
|
||||
icons/application/128x128/apps/keepassx.png
|
||||
icons/application/256x256/apps/keepassx.png
|
||||
VERBATIM
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 9.0 KiB |
|
After Width: | Height: | Size: 9.0 KiB |
BIN
share/icons/application/16x16/actions/application-exit.png
Normal file
|
After Width: | Height: | Size: 842 B |
BIN
share/icons/application/16x16/actions/auto-type.png
Normal file
|
After Width: | Height: | Size: 957 B |
BIN
share/icons/application/16x16/actions/configure.png
Normal file
|
After Width: | Height: | Size: 609 B |
BIN
share/icons/application/16x16/actions/database-change-key.png
Normal file
|
After Width: | Height: | Size: 774 B |
BIN
share/icons/application/16x16/actions/document-close.png
Normal file
|
After Width: | Height: | Size: 605 B |
BIN
share/icons/application/16x16/actions/document-edit.png
Normal file
|
After Width: | Height: | Size: 672 B |
BIN
share/icons/application/16x16/actions/document-encrypt.png
Normal file
|
After Width: | Height: | Size: 452 B |
BIN
share/icons/application/16x16/actions/document-new.png
Normal file
|
After Width: | Height: | Size: 517 B |
BIN
share/icons/application/16x16/actions/document-open.png
Normal file
|
After Width: | Height: | Size: 702 B |
BIN
share/icons/application/16x16/actions/document-save-as.png
Normal file
|
After Width: | Height: | Size: 771 B |
BIN
share/icons/application/16x16/actions/document-save.png
Normal file
|
After Width: | Height: | Size: 559 B |
|
After Width: | Height: | Size: 793 B |
|
After Width: | Height: | Size: 579 B |
BIN
share/icons/application/16x16/actions/entry-clone.png
Normal file
|
After Width: | Height: | Size: 850 B |
BIN
share/icons/application/16x16/actions/entry-delete.png
Normal file
|
After Width: | Height: | Size: 808 B |
BIN
share/icons/application/16x16/actions/entry-edit.png
Normal file
|
After Width: | Height: | Size: 944 B |
BIN
share/icons/application/16x16/actions/entry-new.png
Normal file
|
After Width: | Height: | Size: 986 B |
BIN
share/icons/application/16x16/actions/group-delete.png
Normal file
|
After Width: | Height: | Size: 627 B |
BIN
share/icons/application/16x16/actions/group-edit.png
Normal file
|
After Width: | Height: | Size: 608 B |
BIN
share/icons/application/16x16/actions/group-new.png
Normal file
|
After Width: | Height: | Size: 601 B |
BIN
share/icons/application/16x16/actions/help-about.png
Normal file
|
After Width: | Height: | Size: 699 B |
BIN
share/icons/application/16x16/actions/password-copy.png
Normal file
|
After Width: | Height: | Size: 670 B |
BIN
share/icons/application/16x16/actions/password-generate.png
Normal file
|
After Width: | Height: | Size: 1015 B |
BIN
share/icons/application/16x16/actions/password-show-off.png
Normal file
|
After Width: | Height: | Size: 783 B |
BIN
share/icons/application/16x16/actions/password-show-on.png
Normal file
|
After Width: | Height: | Size: 838 B |
BIN
share/icons/application/16x16/actions/system-search.png
Normal file
|
After Width: | Height: | Size: 755 B |
BIN
share/icons/application/16x16/actions/username-copy.png
Normal file
|
After Width: | Height: | Size: 766 B |
|
After Width: | Height: | Size: 711 B |
BIN
share/icons/application/22x22/actions/dialog-close.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
share/icons/application/22x22/actions/dialog-ok.png
Normal file
|
After Width: | Height: | Size: 723 B |
BIN
share/icons/application/22x22/actions/document-encrypt.png
Normal file
|
After Width: | Height: | Size: 604 B |
BIN
share/icons/application/22x22/actions/document-open.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
share/icons/application/22x22/actions/document-save.png
Normal file
|
After Width: | Height: | Size: 798 B |
BIN
share/icons/application/22x22/actions/entry-delete.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
share/icons/application/22x22/actions/entry-edit.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
share/icons/application/22x22/actions/entry-new.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
share/icons/application/22x22/actions/password-copy.png
Normal file
|
After Width: | Height: | Size: 966 B |
BIN
share/icons/application/22x22/actions/system-search.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
share/icons/application/22x22/actions/username-copy.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
BIN
share/icons/application/22x22/status/dialog-error.png
Normal file
|
After Width: | Height: | Size: 972 B |
BIN
share/icons/application/22x22/status/dialog-information.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
share/icons/application/22x22/status/dialog-warning.png
Normal file
|
After Width: | Height: | Size: 791 B |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.6 KiB |
BIN
share/icons/application/256x256/apps/keepassx.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 4.3 KiB |
|
After Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 411 B After Width: | Height: | Size: 620 B |
|
Before Width: | Height: | Size: 542 B After Width: | Height: | Size: 474 B |
|
Before Width: | Height: | Size: 359 B After Width: | Height: | Size: 572 B |
|
Before Width: | Height: | Size: 516 B |
BIN
share/icons/database/C65_W.png
Normal file
|
After Width: | Height: | Size: 470 B |
|
Before Width: | Height: | Size: 509 B After Width: | Height: | Size: 525 B |
BIN
share/icons/svg/application-exit.svgz
Normal file
BIN
share/icons/svg/application-x-keepassx-16.svgz
Normal file
BIN
share/icons/svg/application-x-keepassx.svgz
Normal file
BIN
share/icons/svg/configure.svgz
Normal file
BIN
share/icons/svg/dialog-close.svgz
Normal file
BIN
share/icons/svg/dialog-error.svgz
Normal file
BIN
share/icons/svg/dialog-information.svgz
Normal file
BIN
share/icons/svg/dialog-ok.svgz
Normal file
BIN
share/icons/svg/dialog-warning.svgz
Normal file
BIN
share/icons/svg/document-close.svgz
Normal file
BIN
share/icons/svg/document-edit.svgz
Normal file
BIN
share/icons/svg/document-new.svgz
Normal file
BIN
share/icons/svg/document-open.svgz
Normal file
BIN
share/icons/svg/document-save-as.svgz
Normal file
BIN
share/icons/svg/document-save.svgz
Normal file
BIN
share/icons/svg/edit-clear-locationbar-ltr.svgz
Normal file
BIN
share/icons/svg/edit-clear-locationbar-rtl.svgz
Normal file
BIN
share/icons/svg/password-copy.svgz
Normal file
BIN
share/icons/svg/system-search.svgz
Normal file
BIN
share/icons/svg/username-copy.svgz
Normal file
12
share/linux/keepassx.desktop
Normal file
@@ -0,0 +1,12 @@
|
||||
[Desktop Entry]
|
||||
Name=KeePassX
|
||||
GenericName=Cross Platform Password Manager
|
||||
GenericName[de]=Passwortverwaltung
|
||||
GenericName[es]=Gestor de contraseñas multiplataforma
|
||||
GenericName[fr]=Gestionnaire de mot de passe
|
||||
Exec=keepassx %f
|
||||
Icon=keepassx
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=Qt;Utility;
|
||||
MimeType=application/x-keepass2;
|
||||
8
share/linux/keepassx.xml
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
|
||||
<mime-type type="application/x-keepass2">
|
||||
<comment>KeePass 2 database</comment>
|
||||
<glob pattern="*.kdbx"/>
|
||||
<icon name="application-x-keepassx"/>
|
||||
</mime-type>
|
||||
</mime-info>
|
||||
51
share/macosx/Info.plist.cmake
Normal file
@@ -0,0 +1,51 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>${PROJECT_NAME}</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${PROGNAME}</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>keepassx.icns</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.keepassx.keepassx</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>${PROJECT_NAME}</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>${KEEPASSX_VERSION}</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>KEPX</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>${KEEPASSX_VERSION_NUM}</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright 2010-2012 KeePassX Development Team</string>
|
||||
<key>CFBundleDocumentTypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>kdbx</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>keepassx.icns</string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>KeePassX Password Database</string>
|
||||
<key>CFBundleTypeOSTypes</key>
|
||||
<array>
|
||||
<string>kdbx</string>
|
||||
</array>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Editor</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
BIN
share/macosx/keepassx.icns
Normal file
1
share/windows/icon.rc
Normal file
@@ -0,0 +1 @@
|
||||
IDI_ICON1 ICON DISCARDABLE "keepassx.ico"
|
||||
BIN
share/windows/keepassx.ico
Normal file
|
After Width: | Height: | Size: 364 KiB |
@@ -13,36 +13,52 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
include_directories( ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} )
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
configure_file( config-keepassx.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-keepassx.h )
|
||||
configure_file(config-keepassx.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-keepassx.h)
|
||||
|
||||
set(keepassx_SOURCES
|
||||
autotype/AutoType.cpp
|
||||
autotype/AutoTypeAction.cpp
|
||||
autotype/AutoTypePlatformPlugin.h
|
||||
autotype/AutoTypeSelectDialog.cpp
|
||||
autotype/AutoTypeSelectView.cpp
|
||||
autotype/ShortcutWidget.cpp
|
||||
autotype/WildcardMatcher.cpp
|
||||
autotype/WindowSelectComboBox.cpp
|
||||
autotype/test/AutoTypeTestInterface.h
|
||||
core/AutoTypeAssociations.cpp
|
||||
core/Config.cpp
|
||||
core/Database.cpp
|
||||
core/DatabaseIcons.cpp
|
||||
core/DataPath.cpp
|
||||
core/Endian.cpp
|
||||
core/Entry.cpp
|
||||
core/EntryAttachments.cpp
|
||||
core/EntryAttributes.cpp
|
||||
core/FilePath.cpp
|
||||
core/Global.h
|
||||
core/Group.cpp
|
||||
core/InactivityTimer.cpp
|
||||
core/ListDeleter.h
|
||||
core/Metadata.cpp
|
||||
core/PasswordGenerator.cpp
|
||||
core/qsavefile.cpp
|
||||
core/qsavefile_p.h
|
||||
core/SignalMultiplexer.cpp
|
||||
core/TimeDelta.cpp
|
||||
core/TimeInfo.cpp
|
||||
core/Tools.cpp
|
||||
core/Uuid.cpp
|
||||
core/qcommandlineoption.cpp
|
||||
core/qcommandlineparser.cpp
|
||||
crypto/Crypto.cpp
|
||||
crypto/CryptoHash.cpp
|
||||
crypto/Random.cpp
|
||||
crypto/salsa20/ecrypt-config.h
|
||||
crypto/salsa20/ecrypt-machine.h
|
||||
crypto/salsa20/ecrypt-portable.h
|
||||
crypto/salsa20/ecrypt-sync.h
|
||||
crypto/salsa20/salsa20.c
|
||||
crypto/SymmetricCipher.cpp
|
||||
crypto/SymmetricCipherBackend.h
|
||||
crypto/SymmetricCipherGcrypt.cpp
|
||||
crypto/SymmetricCipherSalsa20.cpp
|
||||
format/KeePass1.h
|
||||
format/KeePass1Reader.cpp
|
||||
format/KeePass2.h
|
||||
format/KeePass2RandomStream.cpp
|
||||
format/KeePass2Reader.cpp
|
||||
@@ -50,81 +66,211 @@ set(keepassx_SOURCES
|
||||
format/KeePass2XmlReader.cpp
|
||||
format/KeePass2XmlWriter.cpp
|
||||
gui/AboutDialog.cpp
|
||||
gui/Application.cpp
|
||||
gui/ChangeMasterKeyWidget.cpp
|
||||
gui/DatabaseOpenDialog.cpp
|
||||
gui/Clipboard.cpp
|
||||
gui/DatabaseOpenWidget.cpp
|
||||
gui/DatabaseSettingsWidget.cpp
|
||||
gui/DatabaseTabWidget.cpp
|
||||
gui/DatabaseWidget.cpp
|
||||
gui/DialogyWidget.cpp
|
||||
gui/EditEntryWidget.cpp
|
||||
gui/EditGroupWidget.cpp
|
||||
gui/EntryAttachmentsModel.cpp
|
||||
gui/EntryAttributesModel.cpp
|
||||
gui/EntryModel.cpp
|
||||
gui/EntryView.cpp
|
||||
gui/DragTabBar.cpp
|
||||
gui/EditWidget.cpp
|
||||
gui/EditWidgetIcons.cpp
|
||||
gui/EditWidgetProperties.cpp
|
||||
gui/FileDialog.cpp
|
||||
gui/GroupModel.cpp
|
||||
gui/GroupView.cpp
|
||||
gui/IconModels.cpp
|
||||
gui/KeePass1OpenWidget.cpp
|
||||
gui/LineEdit.cpp
|
||||
gui/MainWindow.cpp
|
||||
gui/MessageBox.cpp
|
||||
gui/PasswordEdit.cpp
|
||||
gui/PasswordGeneratorWidget.cpp
|
||||
gui/PasswordComboBox.cpp
|
||||
gui/SettingsWidget.cpp
|
||||
gui/SortFilterHideProxyModel.cpp
|
||||
gui/UnlockDatabaseWidget.cpp
|
||||
gui/WelcomeWidget.cpp
|
||||
gui/entry/AutoTypeAssociationsModel.cpp
|
||||
gui/entry/EditEntryWidget.cpp
|
||||
gui/entry/EditEntryWidget_p.h
|
||||
gui/entry/EntryAttachmentsModel.cpp
|
||||
gui/entry/EntryAttributesModel.cpp
|
||||
gui/entry/EntryHistoryModel.cpp
|
||||
gui/entry/EntryModel.cpp
|
||||
gui/entry/EntryView.cpp
|
||||
gui/group/EditGroupWidget.cpp
|
||||
gui/group/GroupModel.cpp
|
||||
gui/group/GroupView.cpp
|
||||
keys/CompositeKey.cpp
|
||||
keys/CompositeKey_p.h
|
||||
keys/FileKey.cpp
|
||||
keys/Key.h
|
||||
keys/PasswordKey.cpp
|
||||
streams/HashedBlockStream.cpp
|
||||
streams/LayeredStream.cpp
|
||||
streams/qtiocompressor.cpp
|
||||
streams/StoreDataStream.cpp
|
||||
streams/SymmetricCipherStream.cpp
|
||||
)
|
||||
|
||||
if(NOT GCRYPT_HAS_SALSA20)
|
||||
set(keepassx_SOURCES
|
||||
${keepassx_SOURCES}
|
||||
crypto/salsa20/ecrypt-config.h
|
||||
crypto/salsa20/ecrypt-machine.h
|
||||
crypto/salsa20/ecrypt-portable.h
|
||||
crypto/salsa20/ecrypt-sync.h
|
||||
crypto/salsa20/salsa20.c
|
||||
crypto/SymmetricCipherSalsa20.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
set(keepassx_SOURCES_MAINEXE
|
||||
main.cpp
|
||||
)
|
||||
|
||||
set(keepassx_MOC
|
||||
autotype/AutoType.h
|
||||
autotype/AutoTypeSelectDialog.h
|
||||
autotype/AutoTypeSelectView.h
|
||||
autotype/ShortcutWidget.h
|
||||
autotype/WindowSelectComboBox.h
|
||||
core/AutoTypeAssociations.h
|
||||
core/Config.h
|
||||
core/Database.h
|
||||
core/Entry.h
|
||||
core/EntryAttachments.h
|
||||
core/EntryAttributes.h
|
||||
core/Group.h
|
||||
core/InactivityTimer.h
|
||||
core/Metadata.h
|
||||
core/qsavefile.h
|
||||
gui/AboutDialog.h
|
||||
gui/Application.h
|
||||
gui/ChangeMasterKeyWidget.h
|
||||
gui/DatabaseOpenDialog.h
|
||||
gui/Clipboard.h
|
||||
gui/DatabaseOpenWidget.h
|
||||
gui/DatabaseSettingsWidget.h
|
||||
gui/DatabaseTabWidget.h
|
||||
gui/DatabaseWidget.h
|
||||
gui/DialogyWidget.h
|
||||
gui/EditEntryWidget.h
|
||||
gui/EditGroupWidget.h
|
||||
gui/EntryAttachmentsModel.h
|
||||
gui/EntryAttributesModel.h
|
||||
gui/EntryModel.h
|
||||
gui/EntryView.h
|
||||
gui/GroupModel.h
|
||||
gui/GroupView.h
|
||||
gui/DragTabBar.h
|
||||
gui/EditWidget.h
|
||||
gui/EditWidgetIcons.h
|
||||
gui/EditWidgetProperties.h
|
||||
gui/IconModels.h
|
||||
gui/KeePass1OpenWidget.h
|
||||
gui/LineEdit.h
|
||||
gui/MainWindow.h
|
||||
gui/PasswordEdit.h
|
||||
gui/PasswordGeneratorWidget.h
|
||||
gui/PasswordComboBox.h
|
||||
gui/SettingsWidget.h
|
||||
gui/SortFilterHideProxyModel.h
|
||||
gui/UnlockDatabaseWidget.h
|
||||
gui/WelcomeWidget.h
|
||||
gui/entry/AutoTypeAssociationsModel.h
|
||||
gui/entry/EditEntryWidget.h
|
||||
gui/entry/EntryAttachmentsModel.h
|
||||
gui/entry/EntryAttributesModel.h
|
||||
gui/entry/EntryHistoryModel.h
|
||||
gui/entry/EntryModel.h
|
||||
gui/entry/EntryView.h
|
||||
gui/group/EditGroupWidget.h
|
||||
gui/group/GroupModel.h
|
||||
gui/group/GroupView.h
|
||||
keys/CompositeKey_p.h
|
||||
streams/HashedBlockStream.h
|
||||
streams/LayeredStream.h
|
||||
streams/qtiocompressor.h
|
||||
streams/StoreDataStream.h
|
||||
streams/SymmetricCipherStream.h
|
||||
)
|
||||
|
||||
set(keepassx_FORMS
|
||||
gui/AboutDialog.ui
|
||||
gui/ChangeMasterKeyWidget.ui
|
||||
gui/DatabaseOpenDialog.ui
|
||||
gui/DatabaseOpenWidget.ui
|
||||
gui/DatabaseSettingsWidget.ui
|
||||
gui/EditEntryWidget.ui
|
||||
gui/EditEntryWidgetAdvanced.ui
|
||||
gui/EditEntryWidgetMain.ui
|
||||
gui/EditEntryWidgetNotes.ui
|
||||
gui/EditGroupWidget.ui
|
||||
gui/EditWidget.ui
|
||||
gui/EditWidgetIcons.ui
|
||||
gui/EditWidgetProperties.ui
|
||||
gui/MainWindow.ui
|
||||
gui/PasswordGeneratorWidget.ui
|
||||
gui/SearchWidget.ui
|
||||
gui/SettingsWidgetGeneral.ui
|
||||
gui/SettingsWidgetSecurity.ui
|
||||
gui/WelcomeWidget.ui
|
||||
gui/entry/EditEntryWidgetAdvanced.ui
|
||||
gui/entry/EditEntryWidgetAutoType.ui
|
||||
gui/entry/EditEntryWidgetHistory.ui
|
||||
gui/entry/EditEntryWidgetMain.ui
|
||||
gui/group/EditGroupWidgetMain.ui
|
||||
)
|
||||
|
||||
if(MINGW)
|
||||
set(keepassx_SOURCES_MAINEXE
|
||||
${keepassx_SOURCES_MAINEXE}
|
||||
${CMAKE_SOURCE_DIR}/share/windows/icon.rc)
|
||||
endif()
|
||||
|
||||
qt4_wrap_ui(keepassx_SOURCES ${keepassx_FORMS})
|
||||
qt4_wrap_cpp(keepassx_SOURCES ${keepassx_MOC})
|
||||
|
||||
add_library( keepassx_core STATIC ${keepassx_SOURCES} )
|
||||
add_library(keepassx_core STATIC ${keepassx_SOURCES})
|
||||
set_target_properties(keepassx_core PROPERTIES COMPILE_DEFINITIONS KEEPASSX_BUILDING_CORE)
|
||||
|
||||
add_executable(${PROGNAME} WIN32 MACOSX_BUNDLE ${keepassx_SOURCES_MAINEXE})
|
||||
target_link_libraries(${PROGNAME}
|
||||
keepassx_core
|
||||
${QT_QTCORE_LIBRARY}
|
||||
${QT_QTGUI_LIBRARY}
|
||||
${GCRYPT_LIBRARIES}
|
||||
${ZLIB_LIBRARIES})
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
target_link_libraries(${PROGNAME} ${QT_QTDBUS_LIBRARY})
|
||||
endif()
|
||||
|
||||
set_target_properties(${PROGNAME} PROPERTIES ENABLE_EXPORTS ON)
|
||||
|
||||
if(APPLE)
|
||||
configure_file(${CMAKE_SOURCE_DIR}/share/macosx/Info.plist.cmake ${CMAKE_CURRENT_BINARY_DIR}/Info.plist)
|
||||
set_target_properties(${PROGNAME} PROPERTIES
|
||||
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_BINARY_DIR}/Info.plist)
|
||||
endif()
|
||||
|
||||
add_executable( ${PROGNAME} WIN32 MACOSX_BUNDLE main.cpp )
|
||||
target_link_libraries( ${PROGNAME} keepassx_core ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${GCRYPT_LIBRARIES} ${ZLIB_LIBRARIES} )
|
||||
install(TARGETS ${PROGNAME}
|
||||
BUNDLE DESTINATION .
|
||||
BUNDLE DESTINATION . COMPONENT Runtime
|
||||
RUNTIME DESTINATION ${BIN_INSTALL_DIR} COMPONENT Runtime)
|
||||
|
||||
add_subdirectory(autotype)
|
||||
|
||||
if(APPLE AND NOT (${CMAKE_VERSION} VERSION_LESS 2.8.8))
|
||||
if(QT_MAC_USE_COCOA AND EXISTS "${QT_LIBRARY_DIR}/Resources/qt_menu.nib")
|
||||
install(DIRECTORY "${QT_LIBRARY_DIR}/Resources/qt_menu.nib"
|
||||
DESTINATION "${DATA_INSTALL_DIR}")
|
||||
endif()
|
||||
|
||||
set(CPACK_GENERATOR "DragNDrop")
|
||||
set(CPACK_DMG_FORMAT "UDBZ")
|
||||
set(CPACK_DMG_VOLUME_NAME "${PROGNAME}")
|
||||
set(CPACK_SYSTEM_NAME "OSX")
|
||||
set(CPACK_STRIP_FILES ON)
|
||||
set(CPACK_PACKAGE_FILE_NAME "${PROGNAME}-${KEEPASSX_VERSION_NUM}")
|
||||
include(CPack)
|
||||
|
||||
include(DeployQt4)
|
||||
install_qt4_executable(${PROGNAME}.app "qjpeg;qgif;qico;qtaccessiblewidgets")
|
||||
endif()
|
||||
|
||||
if(MINGW AND NOT (${CMAKE_VERSION} VERSION_LESS 2.8.8))
|
||||
set(CPACK_GENERATOR "ZIP")
|
||||
set(CPACK_STRIP_FILES ON)
|
||||
set(CPACK_PACKAGE_FILE_NAME "${PROGNAME}-${KEEPASSX_VERSION_NUM}")
|
||||
include(CPack)
|
||||
|
||||
include(DeployQt4)
|
||||
install_qt4_executable(${PROGNAME}.exe "qjpeg;qgif;qico;qtaccessiblewidgets")
|
||||
endif()
|
||||
|
||||
552
src/autotype/AutoType.cpp
Normal file
@@ -0,0 +1,552 @@
|
||||
/*
|
||||
* Copyright (C) 2012 Felix Geyer <debfx@fobos.de>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 or (at your option)
|
||||
* version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "AutoType.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QPluginLoader>
|
||||
|
||||
#include "autotype/AutoTypePlatformPlugin.h"
|
||||
#include "autotype/AutoTypeSelectDialog.h"
|
||||
#include "autotype/WildcardMatcher.h"
|
||||
#include "core/Database.h"
|
||||
#include "core/Entry.h"
|
||||
#include "core/FilePath.h"
|
||||
#include "core/Group.h"
|
||||
#include "core/ListDeleter.h"
|
||||
#include "core/Tools.h"
|
||||
|
||||
AutoType* AutoType::m_instance = Q_NULLPTR;
|
||||
|
||||
AutoType::AutoType(QObject* parent, bool test)
|
||||
: QObject(parent)
|
||||
, m_inAutoType(false)
|
||||
, m_currentGlobalKey(static_cast<Qt::Key>(0))
|
||||
, m_currentGlobalModifiers(0)
|
||||
, m_pluginLoader(new QPluginLoader(this))
|
||||
, m_plugin(Q_NULLPTR)
|
||||
, m_executor(Q_NULLPTR)
|
||||
, m_windowFromGlobal(0)
|
||||
{
|
||||
// prevent crash when the plugin has unresolved symbols
|
||||
m_pluginLoader->setLoadHints(QLibrary::ResolveAllSymbolsHint);
|
||||
|
||||
QString pluginName = "keepassx-autotype-";
|
||||
if (!test) {
|
||||
pluginName += Tools::platform();
|
||||
}
|
||||
else {
|
||||
pluginName += "test";
|
||||
}
|
||||
|
||||
QString pluginPath = filePath()->pluginPath(pluginName);
|
||||
|
||||
if (!pluginPath.isEmpty()) {
|
||||
loadPlugin(pluginPath);
|
||||
}
|
||||
|
||||
connect(qApp, SIGNAL(aboutToQuit()), SLOT(unloadPlugin()));
|
||||
}
|
||||
|
||||
AutoType::~AutoType()
|
||||
{
|
||||
if (m_executor) {
|
||||
delete m_executor;
|
||||
m_executor = Q_NULLPTR;
|
||||
}
|
||||
}
|
||||
|
||||
void AutoType::loadPlugin(const QString& pluginPath)
|
||||
{
|
||||
m_pluginLoader->setFileName(pluginPath);
|
||||
|
||||
QObject* pluginInstance = m_pluginLoader->instance();
|
||||
if (pluginInstance) {
|
||||
m_plugin = qobject_cast<AutoTypePlatformInterface*>(pluginInstance);
|
||||
if (m_plugin) {
|
||||
m_executor = m_plugin->createExecutor();
|
||||
connect(pluginInstance, SIGNAL(globalShortcutTriggered()), SIGNAL(globalShortcutTriggered()));
|
||||
}
|
||||
}
|
||||
|
||||
if (!m_plugin) {
|
||||
qWarning("Unable to load auto-type plugin:\n%s", qPrintable(m_pluginLoader->errorString()));
|
||||
}
|
||||
}
|
||||
|
||||
AutoType* AutoType::instance()
|
||||
{
|
||||
if (!m_instance) {
|
||||
m_instance = new AutoType(qApp);
|
||||
}
|
||||
|
||||
return m_instance;
|
||||
}
|
||||
|
||||
void AutoType::createTestInstance()
|
||||
{
|
||||
Q_ASSERT(!m_instance);
|
||||
|
||||
m_instance = new AutoType(qApp, true);
|
||||
}
|
||||
|
||||
QStringList AutoType::windowTitles()
|
||||
{
|
||||
if (!m_plugin) {
|
||||
return QStringList();
|
||||
}
|
||||
|
||||
return m_plugin->windowTitles();
|
||||
}
|
||||
|
||||
void AutoType::performAutoType(const Entry* entry, QWidget* hideWindow, const QString& customSequence, WId window)
|
||||
{
|
||||
if (m_inAutoType || !m_plugin) {
|
||||
return;
|
||||
}
|
||||
m_inAutoType = true;
|
||||
|
||||
QString sequence;
|
||||
if (customSequence.isEmpty()) {
|
||||
sequence = autoTypeSequence(entry);
|
||||
}
|
||||
else {
|
||||
sequence = customSequence;
|
||||
}
|
||||
|
||||
QList<AutoTypeAction*> actions;
|
||||
ListDeleter<AutoTypeAction*> actionsDeleter(&actions);
|
||||
|
||||
if (!parseActions(sequence, entry, actions)) {
|
||||
m_inAutoType = false; // TODO: make this automatic
|
||||
return;
|
||||
}
|
||||
|
||||
if (hideWindow) {
|
||||
hideWindow->showMinimized();
|
||||
}
|
||||
|
||||
Tools::wait(m_plugin->initialTimeout());
|
||||
|
||||
if (!window) {
|
||||
window = m_plugin->activeWindow();
|
||||
}
|
||||
|
||||
Q_FOREACH (AutoTypeAction* action, actions) {
|
||||
if (m_plugin->activeWindow() != window) {
|
||||
qWarning("Active window changed, interrupting auto-type.");
|
||||
break;
|
||||
}
|
||||
|
||||
action->accept(m_executor);
|
||||
QCoreApplication::processEvents(QEventLoop::AllEvents, 10);
|
||||
}
|
||||
|
||||
m_inAutoType = false;
|
||||
}
|
||||
|
||||
void AutoType::performGlobalAutoType(const QList<Database*>& dbList)
|
||||
{
|
||||
if (m_inAutoType || !m_plugin) {
|
||||
return;
|
||||
}
|
||||
|
||||
QString windowTitle = m_plugin->activeWindowTitle();
|
||||
|
||||
if (windowTitle.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
m_inAutoType = true;
|
||||
|
||||
QList<Entry*> entryList;
|
||||
QHash<Entry*, QString> sequenceHash;
|
||||
|
||||
Q_FOREACH (Database* db, dbList) {
|
||||
Q_FOREACH (Entry* entry, db->rootGroup()->entriesRecursive()) {
|
||||
QString sequence = autoTypeSequence(entry, windowTitle);
|
||||
if (!sequence.isEmpty()) {
|
||||
entryList << entry;
|
||||
sequenceHash.insert(entry, sequence);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (entryList.isEmpty()) {
|
||||
m_inAutoType = false;
|
||||
}
|
||||
else if (entryList.size() == 1) {
|
||||
m_inAutoType = false;
|
||||
performAutoType(entryList.first(), Q_NULLPTR, sequenceHash[entryList.first()]);
|
||||
}
|
||||
else {
|
||||
m_windowFromGlobal = m_plugin->activeWindow();
|
||||
AutoTypeSelectDialog* selectDialog = new AutoTypeSelectDialog();
|
||||
connect(selectDialog, SIGNAL(entryActivated(Entry*,QString)),
|
||||
SLOT(performAutoTypeFromGlobal(Entry*,QString)));
|
||||
connect(selectDialog, SIGNAL(rejected()), SLOT(resetInAutoType()));
|
||||
selectDialog->setEntries(entryList, sequenceHash);
|
||||
selectDialog->show();
|
||||
// necessary when the main window is minimized
|
||||
selectDialog->activateWindow();
|
||||
}
|
||||
}
|
||||
|
||||
void AutoType::performAutoTypeFromGlobal(Entry* entry, const QString& sequence)
|
||||
{
|
||||
Q_ASSERT(m_inAutoType);
|
||||
|
||||
m_inAutoType = false;
|
||||
performAutoType(entry, Q_NULLPTR, sequence, m_windowFromGlobal);
|
||||
}
|
||||
|
||||
void AutoType::resetInAutoType()
|
||||
{
|
||||
Q_ASSERT(m_inAutoType);
|
||||
|
||||
m_inAutoType = false;
|
||||
}
|
||||
|
||||
void AutoType::unloadPlugin()
|
||||
{
|
||||
if (m_executor) {
|
||||
delete m_executor;
|
||||
m_executor = Q_NULLPTR;
|
||||
}
|
||||
|
||||
if (m_plugin) {
|
||||
m_plugin->unload();
|
||||
m_plugin = Q_NULLPTR;
|
||||
}
|
||||
}
|
||||
|
||||
bool AutoType::registerGlobalShortcut(Qt::Key key, Qt::KeyboardModifiers modifiers)
|
||||
{
|
||||
Q_ASSERT(key);
|
||||
Q_ASSERT(modifiers);
|
||||
|
||||
if (!m_plugin) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (key != m_currentGlobalKey || modifiers != m_currentGlobalModifiers) {
|
||||
if (m_currentGlobalKey && m_currentGlobalModifiers) {
|
||||
m_plugin->unregisterGlobalShortcut(m_currentGlobalKey, m_currentGlobalModifiers);
|
||||
}
|
||||
|
||||
if (m_plugin->registerGlobalShortcut(key, modifiers)) {
|
||||
m_currentGlobalKey = key;
|
||||
m_currentGlobalModifiers = modifiers;
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
void AutoType::unregisterGlobalShortcut()
|
||||
{
|
||||
if (m_plugin && m_currentGlobalKey && m_currentGlobalModifiers) {
|
||||
m_plugin->unregisterGlobalShortcut(m_currentGlobalKey, m_currentGlobalModifiers);
|
||||
}
|
||||
}
|
||||
|
||||
int AutoType::callEventFilter(void* event)
|
||||
{
|
||||
if (!m_plugin) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
return m_plugin->platformEventFilter(event);
|
||||
}
|
||||
|
||||
bool AutoType::parseActions(const QString& sequence, const Entry* entry, QList<AutoTypeAction*>& actions)
|
||||
{
|
||||
QString tmpl;
|
||||
bool inTmpl = false;
|
||||
|
||||
Q_FOREACH (const QChar& ch, sequence) {
|
||||
// TODO: implement support for {{}, {}} and {DELAY=X}
|
||||
|
||||
if (inTmpl) {
|
||||
if (ch == '{') {
|
||||
qWarning("Syntax error in auto-type sequence.");
|
||||
return false;
|
||||
}
|
||||
else if (ch == '}') {
|
||||
actions.append(createActionFromTemplate(tmpl, entry));
|
||||
inTmpl = false;
|
||||
tmpl.clear();
|
||||
}
|
||||
else {
|
||||
tmpl += ch;
|
||||
}
|
||||
}
|
||||
else if (ch == '{') {
|
||||
inTmpl = true;
|
||||
}
|
||||
else if (ch == '}') {
|
||||
qWarning("Syntax error in auto-type sequence.");
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
actions.append(new AutoTypeChar(ch));
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
QList<AutoTypeAction*> AutoType::createActionFromTemplate(const QString& tmpl, const Entry* entry)
|
||||
{
|
||||
QString tmplName = tmpl.toLower();
|
||||
int num = -1;
|
||||
QList<AutoTypeAction*> list;
|
||||
|
||||
QRegExp repeatRegEx("(.+) (\\d+)", Qt::CaseSensitive, QRegExp::RegExp2);
|
||||
if (repeatRegEx.exactMatch(tmplName)) {
|
||||
tmplName = repeatRegEx.cap(1);
|
||||
num = repeatRegEx.cap(2).toInt();
|
||||
|
||||
if (num == 0) {
|
||||
return list;
|
||||
}
|
||||
// some safety checks
|
||||
else if (tmplName == "delay") {
|
||||
if (num > 10000) {
|
||||
return list;
|
||||
}
|
||||
}
|
||||
else if (num > 100) {
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
||||
if (tmplName == "tab") {
|
||||
list.append(new AutoTypeKey(Qt::Key_Tab));
|
||||
}
|
||||
else if (tmplName == "enter") {
|
||||
list.append(new AutoTypeKey(Qt::Key_Enter));
|
||||
}
|
||||
else if (tmplName == "up") {
|
||||
list.append(new AutoTypeKey(Qt::Key_Up));
|
||||
}
|
||||
else if (tmplName == "down") {
|
||||
list.append(new AutoTypeKey(Qt::Key_Down));
|
||||
}
|
||||
else if (tmplName == "left") {
|
||||
list.append(new AutoTypeKey(Qt::Key_Left));
|
||||
}
|
||||
else if (tmplName == "right") {
|
||||
list.append(new AutoTypeKey(Qt::Key_Right));
|
||||
}
|
||||
else if (tmplName == "insert" || tmplName == "ins") {
|
||||
list.append(new AutoTypeKey(Qt::Key_Insert));
|
||||
}
|
||||
else if (tmplName == "delete" || tmplName == "del") {
|
||||
list.append(new AutoTypeKey(Qt::Key_Delete));
|
||||
}
|
||||
else if (tmplName == "home") {
|
||||
list.append(new AutoTypeKey(Qt::Key_Home));
|
||||
}
|
||||
else if (tmplName == "end") {
|
||||
list.append(new AutoTypeKey(Qt::Key_End));
|
||||
}
|
||||
else if (tmplName == "pgup") {
|
||||
list.append(new AutoTypeKey(Qt::Key_PageUp));
|
||||
}
|
||||
else if (tmplName == "pgdown") {
|
||||
list.append(new AutoTypeKey(Qt::Key_PageDown));
|
||||
}
|
||||
else if (tmplName == "backspace" || tmplName == "bs" || tmplName == "bksp") {
|
||||
list.append(new AutoTypeKey(Qt::Key_Backspace));
|
||||
}
|
||||
else if (tmplName == "break") {
|
||||
list.append(new AutoTypeKey(Qt::Key_Pause));
|
||||
}
|
||||
else if (tmplName == "capslock") {
|
||||
list.append(new AutoTypeKey(Qt::Key_CapsLock));
|
||||
}
|
||||
else if (tmplName == "esc") {
|
||||
list.append(new AutoTypeKey(Qt::Key_Escape));
|
||||
}
|
||||
else if (tmplName == "help") {
|
||||
list.append(new AutoTypeKey(Qt::Key_Help));
|
||||
}
|
||||
else if (tmplName == "numlock") {
|
||||
list.append(new AutoTypeKey(Qt::Key_NumLock));
|
||||
}
|
||||
else if (tmplName == "ptrsc") {
|
||||
list.append(new AutoTypeKey(Qt::Key_Print));
|
||||
}
|
||||
else if (tmplName == "scolllock") {
|
||||
list.append(new AutoTypeKey(Qt::Key_ScrollLock));
|
||||
}
|
||||
// Qt doesn't know about keypad keys so use the normal ones instead
|
||||
else if (tmplName == "add" || tmplName == "+") {
|
||||
list.append(new AutoTypeChar('+'));
|
||||
}
|
||||
else if (tmplName == "subtract") {
|
||||
list.append(new AutoTypeChar('-'));
|
||||
}
|
||||
else if (tmplName == "multiply") {
|
||||
list.append(new AutoTypeChar('*'));
|
||||
}
|
||||
else if (tmplName == "divide") {
|
||||
list.append(new AutoTypeChar('/'));
|
||||
}
|
||||
else if (tmplName == "^") {
|
||||
list.append(new AutoTypeChar('^'));
|
||||
}
|
||||
else if (tmplName == "%") {
|
||||
list.append(new AutoTypeChar('%'));
|
||||
}
|
||||
else if (tmplName == "~") {
|
||||
list.append(new AutoTypeChar('~'));
|
||||
}
|
||||
else if (tmplName == "(") {
|
||||
list.append(new AutoTypeChar('('));
|
||||
}
|
||||
else if (tmplName == ")") {
|
||||
list.append(new AutoTypeChar(')'));
|
||||
}
|
||||
else if (tmplName == "{") {
|
||||
list.append(new AutoTypeChar('{'));
|
||||
}
|
||||
else if (tmplName == "}") {
|
||||
list.append(new AutoTypeChar('}'));
|
||||
}
|
||||
else {
|
||||
QRegExp fnRegexp("f(\\d+)", Qt::CaseInsensitive, QRegExp::RegExp2);
|
||||
if (fnRegexp.exactMatch(tmplName)) {
|
||||
int fnNo = fnRegexp.cap(1).toInt();
|
||||
if (fnNo >= 1 && fnNo <= 16) {
|
||||
list.append(new AutoTypeKey(static_cast<Qt::Key>(Qt::Key_F1 - 1 + fnNo)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!list.isEmpty()) {
|
||||
for (int i = 1; i < num; i++) {
|
||||
list.append(list.at(0)->clone());
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
if (tmplName == "delay" && num > 0) {
|
||||
list.append(new AutoTypeDelay(num));
|
||||
}
|
||||
else if (tmplName == "clearfield") {
|
||||
list.append(new AutoTypeClearField());
|
||||
}
|
||||
|
||||
if (!list.isEmpty()) {
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
QString placeholder = QString("{%1}").arg(tmplName);
|
||||
QString resolved = entry->resolvePlaceholders(placeholder);
|
||||
if (placeholder != resolved) {
|
||||
Q_FOREACH (const QChar& ch, resolved) {
|
||||
list.append(new AutoTypeChar(ch));
|
||||
}
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
QString AutoType::autoTypeSequence(const Entry* entry, const QString& windowTitle)
|
||||
{
|
||||
if (!entry->autoTypeEnabled()) {
|
||||
return QString();
|
||||
}
|
||||
|
||||
bool enableSet = false;
|
||||
QString sequence;
|
||||
if (!windowTitle.isEmpty()) {
|
||||
bool match = false;
|
||||
Q_FOREACH (const AutoTypeAssociations::Association& assoc, entry->autoTypeAssociations()->getAll()) {
|
||||
if (windowMatches(windowTitle, assoc.window)) {
|
||||
if (!assoc.sequence.isEmpty()) {
|
||||
sequence = assoc.sequence;
|
||||
}
|
||||
else {
|
||||
sequence = entry->defaultAutoTypeSequence();
|
||||
}
|
||||
match = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!match) {
|
||||
return QString();
|
||||
}
|
||||
}
|
||||
else {
|
||||
sequence = entry->defaultAutoTypeSequence();
|
||||
}
|
||||
|
||||
const Group* group = entry->group();
|
||||
do {
|
||||
if (!enableSet) {
|
||||
if (group->autoTypeEnabled() == Group::Disable) {
|
||||
return QString();
|
||||
}
|
||||
else if (group->autoTypeEnabled() == Group::Enable) {
|
||||
enableSet = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (sequence.isEmpty()) {
|
||||
sequence = group->defaultAutoTypeSequence();
|
||||
}
|
||||
|
||||
group = group->parentGroup();
|
||||
} while (group && (!enableSet || sequence.isEmpty()));
|
||||
|
||||
if (sequence.isEmpty() && (!entry->username().isEmpty() || !entry->password().isEmpty())) {
|
||||
if (entry->username().isEmpty()) {
|
||||
sequence = "{PASSWORD}{ENTER}";
|
||||
}
|
||||
else if (entry->password().isEmpty()) {
|
||||
sequence = "{USERNAME}{ENTER}";
|
||||
}
|
||||
else {
|
||||
sequence = "{USERNAME}{TAB}{PASSWORD}{ENTER}";
|
||||
}
|
||||
}
|
||||
|
||||
return sequence;
|
||||
}
|
||||
|
||||
bool AutoType::windowMatches(const QString& windowTitle, const QString& windowPattern)
|
||||
{
|
||||
if (windowPattern.startsWith("//") && windowPattern.endsWith("//") && windowPattern.size() >= 4) {
|
||||
QRegExp regExp(windowPattern.mid(2, windowPattern.size() - 4), Qt::CaseInsensitive, QRegExp::RegExp2);
|
||||
return regExp.exactMatch(windowTitle);
|
||||
}
|
||||
else {
|
||||
return WildcardMatcher(windowTitle).match(windowPattern);
|
||||
}
|
||||
}
|
||||
89
src/autotype/AutoType.h
Normal file
@@ -0,0 +1,89 @@
|
||||
/*
|
||||
* Copyright (C) 2012 Felix Geyer <debfx@fobos.de>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 or (at your option)
|
||||
* version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef KEEPASSX_AUTOTYPE_H
|
||||
#define KEEPASSX_AUTOTYPE_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QStringList>
|
||||
#include <QWidget>
|
||||
|
||||
#include "core/Global.h"
|
||||
|
||||
class AutoTypeAction;
|
||||
class AutoTypeExecutor;
|
||||
class AutoTypePlatformInterface;
|
||||
class Database;
|
||||
class Entry;
|
||||
class QPluginLoader;
|
||||
|
||||
class AutoType : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
QStringList windowTitles();
|
||||
void performAutoType(const Entry* entry, QWidget* hideWindow = Q_NULLPTR,
|
||||
const QString& customSequence = QString(), WId window = 0);
|
||||
bool registerGlobalShortcut(Qt::Key key, Qt::KeyboardModifiers modifiers);
|
||||
void unregisterGlobalShortcut();
|
||||
int callEventFilter(void* event);
|
||||
|
||||
inline bool isAvailable() {
|
||||
return m_plugin;
|
||||
}
|
||||
|
||||
static AutoType* instance();
|
||||
static void createTestInstance();
|
||||
|
||||
public Q_SLOTS:
|
||||
void performGlobalAutoType(const QList<Database*>& dbList);
|
||||
|
||||
Q_SIGNALS:
|
||||
void globalShortcutTriggered();
|
||||
|
||||
private Q_SLOTS:
|
||||
void performAutoTypeFromGlobal(Entry* entry, const QString& sequence);
|
||||
void resetInAutoType();
|
||||
void unloadPlugin();
|
||||
|
||||
private:
|
||||
explicit AutoType(QObject* parent = Q_NULLPTR, bool test = false);
|
||||
~AutoType();
|
||||
void loadPlugin(const QString& pluginPath);
|
||||
bool parseActions(const QString& sequence, const Entry* entry, QList<AutoTypeAction*>& actions);
|
||||
QList<AutoTypeAction*> createActionFromTemplate(const QString& tmpl, const Entry* entry);
|
||||
QString autoTypeSequence(const Entry* entry, const QString& windowTitle = QString());
|
||||
bool windowMatches(const QString& windowTitle, const QString& windowPattern);
|
||||
|
||||
bool m_inAutoType;
|
||||
Qt::Key m_currentGlobalKey;
|
||||
Qt::KeyboardModifiers m_currentGlobalModifiers;
|
||||
QPluginLoader* m_pluginLoader;
|
||||
AutoTypePlatformInterface* m_plugin;
|
||||
AutoTypeExecutor* m_executor;
|
||||
WId m_windowFromGlobal;
|
||||
static AutoType* m_instance;
|
||||
|
||||
Q_DISABLE_COPY(AutoType)
|
||||
};
|
||||
|
||||
inline AutoType* autoType() {
|
||||
return AutoType::instance();
|
||||
}
|
||||
|
||||
#endif // KEEPASSX_AUTOTYPE_H
|
||||
93
src/autotype/AutoTypeAction.cpp
Normal file
@@ -0,0 +1,93 @@
|
||||
/*
|
||||
* Copyright (C) 2012 Felix Geyer <debfx@fobos.de>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 or (at your option)
|
||||
* version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "AutoTypeAction.h"
|
||||
|
||||
#include "core/Tools.h"
|
||||
|
||||
AutoTypeChar::AutoTypeChar(const QChar& character)
|
||||
: character(character)
|
||||
{
|
||||
}
|
||||
|
||||
AutoTypeAction* AutoTypeChar::clone()
|
||||
{
|
||||
return new AutoTypeChar(character);
|
||||
}
|
||||
|
||||
void AutoTypeChar::accept(AutoTypeExecutor* executor)
|
||||
{
|
||||
executor->execChar(this);
|
||||
}
|
||||
|
||||
|
||||
AutoTypeKey::AutoTypeKey(Qt::Key key)
|
||||
: key(key)
|
||||
{
|
||||
}
|
||||
|
||||
AutoTypeAction* AutoTypeKey::clone()
|
||||
{
|
||||
return new AutoTypeKey(key);
|
||||
}
|
||||
|
||||
void AutoTypeKey::accept(AutoTypeExecutor* executor)
|
||||
{
|
||||
executor->execKey(this);
|
||||
}
|
||||
|
||||
|
||||
AutoTypeDelay::AutoTypeDelay(int delayMs)
|
||||
: delayMs(delayMs)
|
||||
{
|
||||
}
|
||||
|
||||
AutoTypeAction* AutoTypeDelay::clone()
|
||||
{
|
||||
return new AutoTypeDelay(delayMs);
|
||||
}
|
||||
|
||||
void AutoTypeDelay::accept(AutoTypeExecutor* executor)
|
||||
{
|
||||
executor->execDelay(this);
|
||||
}
|
||||
|
||||
|
||||
AutoTypeClearField::AutoTypeClearField()
|
||||
{
|
||||
}
|
||||
|
||||
AutoTypeAction* AutoTypeClearField::clone()
|
||||
{
|
||||
return new AutoTypeClearField();
|
||||
}
|
||||
|
||||
void AutoTypeClearField::accept(AutoTypeExecutor* executor)
|
||||
{
|
||||
executor->execClearField(this);
|
||||
}
|
||||
|
||||
|
||||
void AutoTypeExecutor::execDelay(AutoTypeDelay* action)
|
||||
{
|
||||
Tools::wait(action->delayMs);
|
||||
}
|
||||
|
||||
void AutoTypeExecutor::execClearField(AutoTypeClearField* action)
|
||||
{
|
||||
// TODO: implement
|
||||
}
|
||||