Compare commits
910 Commits
release-4.
...
release-4.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0061b75200 | ||
|
|
420c93a99e | ||
|
|
93f1183cd7 | ||
|
|
b8fcc1fed2 | ||
|
|
2b91be1905 | ||
|
|
7c9ef96ef8 | ||
|
|
37b4b69199 | ||
|
|
fc18e6f8df | ||
|
|
4793a35e0b | ||
|
|
4599da3ce1 | ||
|
|
dec4e41fdd | ||
|
|
780ece0c25 | ||
|
|
aac8bfc398 | ||
|
|
1a06a18336 | ||
|
|
2d4f963d65 | ||
|
|
b54fe08201 | ||
|
|
d1d0300491 | ||
|
|
7fff06f07b | ||
|
|
3f9351042d | ||
|
|
9e01dbab0f | ||
|
|
d4a4b02cf6 | ||
|
|
1f2c7a6671 | ||
|
|
5a7b88c16c | ||
|
|
93351476e4 | ||
|
|
e1bfa95a63 | ||
|
|
7030cc08e7 | ||
|
|
a1da9812a5 | ||
|
|
8ebc0f529c | ||
|
|
e0d47649bc | ||
|
|
524d503860 | ||
|
|
cffafa8e9f | ||
|
|
0fda919268 | ||
|
|
7d98c34e17 | ||
|
|
93147e787b | ||
|
|
80435bae7e | ||
|
|
b367e5c197 | ||
|
|
5336c71da5 | ||
|
|
27f6db976d | ||
|
|
8223d61fa7 | ||
|
|
3eef12bd8f | ||
|
|
9e70a6c499 | ||
|
|
fec3a87421 | ||
|
|
59aac32eb9 | ||
|
|
5ef3917769 | ||
|
|
2f767d96d9 | ||
|
|
de24fdfdc2 | ||
|
|
3bb6a68c9d | ||
|
|
f2406eb2f3 | ||
|
|
4923ed7da0 | ||
|
|
82056355f6 | ||
|
|
f3bd2a295f | ||
|
|
cc96760839 | ||
|
|
ae95943f69 | ||
|
|
d3067f939e | ||
|
|
b6addd304c | ||
|
|
d1ae6e8d58 | ||
|
|
4445c2dab2 | ||
|
|
fcc1564a62 | ||
|
|
615eeb7144 | ||
|
|
855bb118b5 | ||
|
|
9f1eb3600a | ||
|
|
fb885d89c1 | ||
|
|
a846916beb | ||
|
|
a574c4a70a | ||
|
|
1e367f818d | ||
|
|
00599c8f02 | ||
|
|
332a836746 | ||
|
|
a1992acc16 | ||
|
|
c3f002a544 | ||
|
|
c28cbe0a74 | ||
|
|
435daaceed | ||
|
|
e29ab0087b | ||
|
|
aadd5a3312 | ||
|
|
7e354ffad3 | ||
|
|
ee6a071fb6 | ||
|
|
bc8b838953 | ||
|
|
5251d93b3d | ||
|
|
84f0dbecfe | ||
|
|
bba0c8b2cc | ||
|
|
2f90be8bd2 | ||
|
|
cb6b6296aa | ||
|
|
9d25fdce2a | ||
|
|
12b2732f1a | ||
|
|
8c9ece73ee | ||
|
|
a7db786387 | ||
|
|
e5bf65c9bd | ||
|
|
900e7d3a14 | ||
|
|
f1ff74a926 | ||
|
|
30bc4b837e | ||
|
|
050a4f8b23 | ||
|
|
487103d58f | ||
|
|
eeea69d4c1 | ||
|
|
00360ad418 | ||
|
|
a733253ae5 | ||
|
|
9788ee042b | ||
|
|
e9c9ea3bba | ||
|
|
312dfb989d | ||
|
|
75deafe5b1 | ||
|
|
4ca257a389 | ||
|
|
03375a78f2 | ||
|
|
423c7066d7 | ||
|
|
5cd5cc71a8 | ||
|
|
45d4d22055 | ||
|
|
916a92aa0d | ||
|
|
d1ebbcb35d | ||
|
|
2743d998a8 | ||
|
|
dbbfbaff9f | ||
|
|
0be8439cf6 | ||
|
|
66982c5524 | ||
|
|
85af8547f7 | ||
|
|
e26977ab2c | ||
|
|
ec1cc783a6 | ||
|
|
03b00ec045 | ||
|
|
5e90156e9e | ||
|
|
052206efa1 | ||
|
|
305d73180b | ||
|
|
80000bf0fd | ||
|
|
06ebe756e8 | ||
|
|
5fa3d9f19c | ||
|
|
5b4c6d3665 | ||
|
|
77bd0f17d1 | ||
|
|
03a702cfbd | ||
|
|
a932cd2ec1 | ||
|
|
8e5743380a | ||
|
|
8001eb0368 | ||
|
|
f214dc88fc | ||
|
|
5cff5ab135 | ||
|
|
82ba154b64 | ||
|
|
4ea44bbd2b | ||
|
|
a5e68a8725 | ||
|
|
70291014d1 | ||
|
|
1aabcfc30c | ||
|
|
aba80e2b1c | ||
|
|
be683fbcd3 | ||
|
|
2bcf09cfa5 | ||
|
|
697325af63 | ||
|
|
c21bd77be5 | ||
|
|
d5430adaaa | ||
|
|
9e99a0d3f5 | ||
|
|
d088ab6f43 | ||
|
|
820d510c12 | ||
|
|
676847fcd0 | ||
|
|
0204630ee6 | ||
|
|
b515c7eda4 | ||
|
|
73fcecac76 | ||
|
|
a7b82ebcb5 | ||
|
|
f8598b010d | ||
|
|
93779bcc4b | ||
|
|
938f5b9dd9 | ||
|
|
3b4d9f49d5 | ||
|
|
171c93af50 | ||
|
|
6f81e40106 | ||
|
|
e19b5cb2ce | ||
|
|
2c69faca58 | ||
|
|
9272151d0a | ||
|
|
d45ebf5a43 | ||
|
|
8074be7644 | ||
|
|
c99ac99a99 | ||
|
|
976e2450ec | ||
|
|
7e4db8fafd | ||
|
|
115a409d92 | ||
|
|
c203ab3d16 | ||
|
|
5dff96496d | ||
|
|
f813935011 | ||
|
|
2be719449f | ||
|
|
2094c870d5 | ||
|
|
4fe93ae8b8 | ||
|
|
fff1103cf4 | ||
|
|
8cede43a45 | ||
|
|
9b1fa3a5af | ||
|
|
409e73c074 | ||
|
|
c893729d62 | ||
|
|
945466968c | ||
|
|
54f080b755 | ||
|
|
bfad14d552 | ||
|
|
2972e1596d | ||
|
|
987d2aae88 | ||
|
|
4707d34fad | ||
|
|
2ffc09d097 | ||
|
|
afa8d6bb8f | ||
|
|
a37ead98e8 | ||
|
|
c73cd8d618 | ||
|
|
800a3aa61e | ||
|
|
ebd815be75 | ||
|
|
ef669acf89 | ||
|
|
ac6426eab1 | ||
|
|
b107b745f2 | ||
|
|
3d851a448f | ||
|
|
ce133f01aa | ||
|
|
492d378537 | ||
|
|
7ece484423 | ||
|
|
be5ad63e21 | ||
|
|
bdac8f8db8 | ||
|
|
bb893e70c5 | ||
|
|
57ec9db532 | ||
|
|
0287481001 | ||
|
|
0167496ecb | ||
|
|
d86cf193a0 | ||
|
|
246cad1108 | ||
|
|
23bf86a8a8 | ||
|
|
6ce4c885b9 | ||
|
|
faf84e483a | ||
|
|
576004c840 | ||
|
|
c93b05c293 | ||
|
|
55c3813fac | ||
|
|
725c6857be | ||
|
|
86767c9ab4 | ||
|
|
46aa631d2b | ||
|
|
7c61a937c9 | ||
|
|
b8d65dcc45 | ||
|
|
b9ab83eaf2 | ||
|
|
8b7b563992 | ||
|
|
b813a878d7 | ||
|
|
54e486c389 | ||
|
|
12d0a3acc1 | ||
|
|
6ad2a13386 | ||
|
|
2a9c401db9 | ||
|
|
ea5a29018f | ||
|
|
c8d0a715e8 | ||
|
|
2cfc6514ab | ||
|
|
1d78bc7206 | ||
|
|
e5577e43f8 | ||
|
|
17c0463906 | ||
|
|
4168772904 | ||
|
|
44f2186749 | ||
|
|
0c918bcc3a | ||
|
|
0a8925dc75 | ||
|
|
a446597597 | ||
|
|
54354a2732 | ||
|
|
d94b8f08ab | ||
|
|
0d8189efeb | ||
|
|
00c886e426 | ||
|
|
551fc35439 | ||
|
|
9ff17c8d9d | ||
|
|
ec37732e99 | ||
|
|
8a414f32a8 | ||
|
|
bac06acb49 | ||
|
|
ae1e3c2a81 | ||
|
|
67940eb0f9 | ||
|
|
007aa8480e | ||
|
|
dedec10c58 | ||
|
|
75219e21be | ||
|
|
10f5964f8e | ||
|
|
a4a64d51c0 | ||
|
|
1014313d88 | ||
|
|
e486bb4c29 | ||
|
|
5c3d9ffb46 | ||
|
|
2e474fd8db | ||
|
|
b2b110ae1f | ||
|
|
68a34e0738 | ||
|
|
38fa575958 | ||
|
|
6cfeefe054 | ||
|
|
8007971a53 | ||
|
|
d66bd30fae | ||
|
|
3fa59b1b12 | ||
|
|
20e7aff393 | ||
|
|
4b7ce87f57 | ||
|
|
2075533468 | ||
|
|
a4ad5c8d11 | ||
|
|
35f2f56757 | ||
|
|
e6f4aa6a2f | ||
|
|
92fc62bb0d | ||
|
|
44b57a59f5 | ||
|
|
97b8e02bf5 | ||
|
|
5df42420cb | ||
|
|
0ede11a1b7 | ||
|
|
7d9c282db9 | ||
|
|
bc0e0813a4 | ||
|
|
f3aebb3001 | ||
|
|
800f966df9 | ||
|
|
e33df4dd8c | ||
|
|
96d9d810fd | ||
|
|
8707a1bc86 | ||
|
|
0c988a5fd4 | ||
|
|
b396ca771d | ||
|
|
a37dfcf961 | ||
|
|
31989740cd | ||
|
|
501191289b | ||
|
|
8971e92d78 | ||
|
|
0c96e79d0d | ||
|
|
0704c0f5e6 | ||
|
|
9cb190ebe7 | ||
|
|
667f84995c | ||
|
|
7a93fae6e4 | ||
|
|
0d6deca15c | ||
|
|
f54d7d46f2 | ||
|
|
8cf00ba5e1 | ||
|
|
ecc9c6bbd9 | ||
|
|
e11199f988 | ||
|
|
e9ed621178 | ||
|
|
400743fc64 | ||
|
|
ea8c57be23 | ||
|
|
591cde53cf | ||
|
|
90bb67c654 | ||
|
|
8f7fda492c | ||
|
|
f92d85c536 | ||
|
|
55c98d8706 | ||
|
|
6e94b03c13 | ||
|
|
e3a82d4614 | ||
|
|
c61f641613 | ||
|
|
b64a51337e | ||
|
|
19dcf7851b | ||
|
|
fb346e15e8 | ||
|
|
827d8c0dad | ||
|
|
beef041e71 | ||
|
|
8b575484e6 | ||
|
|
d4b77a6541 | ||
|
|
4ba6334506 | ||
|
|
b78899cb9a | ||
|
|
0dec7b9f4f | ||
|
|
81a4f3ced0 | ||
|
|
b155b8609f | ||
|
|
970ad7cf28 | ||
|
|
c4625f50a8 | ||
|
|
001bd38557 | ||
|
|
7aae915a68 | ||
|
|
5f1ac96f66 | ||
|
|
68c2d81072 | ||
|
|
4dea03fc74 | ||
|
|
a70942ed53 | ||
|
|
7e8c72f424 | ||
|
|
e538eae726 | ||
|
|
898239a42e | ||
|
|
1055cc0f45 | ||
|
|
9f36b54b04 | ||
|
|
1f42ab8c4f | ||
|
|
3f0fbc0810 | ||
|
|
7e4b62c68d | ||
|
|
784b154228 | ||
|
|
ddba79ef3d | ||
|
|
7712d0ada0 | ||
|
|
38837db8de | ||
|
|
d997d887e5 | ||
|
|
341a971cd3 | ||
|
|
fa380c8b2c | ||
|
|
758c70283f | ||
|
|
747c70a58e | ||
|
|
6ca2e42bca | ||
|
|
cb505a07fe | ||
|
|
5819b6dd39 | ||
|
|
644e7d0450 | ||
|
|
b0e3d77975 | ||
|
|
643a209812 | ||
|
|
c3311e83a0 | ||
|
|
3301e9cb69 | ||
|
|
cf2c0bd47e | ||
|
|
df0c5c41c5 | ||
|
|
59e6757242 | ||
|
|
6bbcf9b3d6 | ||
|
|
208d21ff73 | ||
|
|
2df71dbde5 | ||
|
|
9e4f246c89 | ||
|
|
e4fc8e4156 | ||
|
|
883d4d81d5 | ||
|
|
041b86981f | ||
|
|
470e993c2d | ||
|
|
cbf10ebb7f | ||
|
|
89f06274bb | ||
|
|
c07cd440cd | ||
|
|
e90be67fec | ||
|
|
37ea01bd44 | ||
|
|
ccc91e2e52 | ||
|
|
d31954761f | ||
|
|
aa122b062e | ||
|
|
65921eaf7b | ||
|
|
bfbd978d3f | ||
|
|
1876dbd523 | ||
|
|
ea7eb7c0ec | ||
|
|
19c733ce95 | ||
|
|
2ba5dd1344 | ||
|
|
61eddfce90 | ||
|
|
0840556f77 | ||
|
|
f564e8a1c4 | ||
|
|
315d9835b2 | ||
|
|
ed03456999 | ||
|
|
e1a14007f8 | ||
|
|
a15cfae03a | ||
|
|
c2a195360a | ||
|
|
a4f99995bb | ||
|
|
16616f4e0e | ||
|
|
a5294e1e08 | ||
|
|
a8dbff06a3 | ||
|
|
d9cd5d4680 | ||
|
|
ac42ccb5e4 | ||
|
|
68ca95faf0 | ||
|
|
8d285c66aa | ||
|
|
1f28122428 | ||
|
|
6ec179e0f7 | ||
|
|
423511765a | ||
|
|
c061d67b14 | ||
|
|
4863078744 | ||
|
|
88881de8c6 | ||
|
|
690c439ae6 | ||
|
|
e78b5202bc | ||
|
|
c9be1d0a19 | ||
|
|
3348eef423 | ||
|
|
931af6c97e | ||
|
|
cea2948593 | ||
|
|
a468c84b30 | ||
|
|
7278625f53 | ||
|
|
7b3e692f68 | ||
|
|
fdb0d97b28 | ||
|
|
08a2439f46 | ||
|
|
6767487e40 | ||
|
|
141a2d2856 | ||
|
|
2eea57e609 | ||
|
|
0b185e347b | ||
|
|
1e1db31ab5 | ||
|
|
7233274110 | ||
|
|
d4e2b21534 | ||
|
|
4f206f987a | ||
|
|
dfddda57b9 | ||
|
|
0cacd71503 | ||
|
|
fdf3ebbb6c | ||
|
|
a3d9e457a0 | ||
|
|
ffb5c0635e | ||
|
|
b4f23d8154 | ||
|
|
ed310c2dac | ||
|
|
50167d40d7 | ||
|
|
5261d4375f | ||
|
|
0b56cd5fa0 | ||
|
|
e22946ef61 | ||
|
|
0457fd260e | ||
|
|
c60b7b213e | ||
|
|
c759c4301e | ||
|
|
307736e263 | ||
|
|
7aa5bc4bc1 | ||
|
|
c47e4efade | ||
|
|
b0781e820c | ||
|
|
1aca3b0adc | ||
|
|
20c4b0ee0c | ||
|
|
3df4a7ac2e | ||
|
|
efdeb81af1 | ||
|
|
34295a78f2 | ||
|
|
57163612ff | ||
|
|
1a9b009951 | ||
|
|
9406b4b226 | ||
|
|
38dc6ab8cf | ||
|
|
55c3db339b | ||
|
|
34456a7459 | ||
|
|
02b029abbe | ||
|
|
b26eb3d146 | ||
|
|
7cb6100c9c | ||
|
|
ef06485c45 | ||
|
|
1c2d9c1fe4 | ||
|
|
6f7f7d87c6 | ||
|
|
817aadd52d | ||
|
|
058bad0af3 | ||
|
|
0e421ae415 | ||
|
|
2227c3afc1 | ||
|
|
050af8a793 | ||
|
|
6207855f3b | ||
|
|
a65a70ab48 | ||
|
|
4110bb874f | ||
|
|
5c74f374af | ||
|
|
a8420a43f9 | ||
|
|
279bce2014 | ||
|
|
f3d370870d | ||
|
|
0e30659c26 | ||
|
|
f34dfca5e6 | ||
|
|
cec68c3fd7 | ||
|
|
5c2f698cb4 | ||
|
|
f5fc2d52b8 | ||
|
|
edef85fa3e | ||
|
|
6244ad5fa8 | ||
|
|
aba23f67a0 | ||
|
|
1a913c502b | ||
|
|
078982ada6 | ||
|
|
3035184d25 | ||
|
|
fccdc7ebdc | ||
|
|
e0c74c2d39 | ||
|
|
288f372914 | ||
|
|
ba331436fa | ||
|
|
afd4069eb4 | ||
|
|
387f9b1230 | ||
|
|
2114817890 | ||
|
|
dac2ab5409 | ||
|
|
b87ca60c5a | ||
|
|
6d44075662 | ||
|
|
69af205094 | ||
|
|
8a2e3f5d93 | ||
|
|
3f79726ab9 | ||
|
|
d1c4b1599a | ||
|
|
a0842a1e68 | ||
|
|
29042e4841 | ||
|
|
3e2cfb5136 | ||
|
|
0d55599e02 | ||
|
|
ea1b0b26b1 | ||
|
|
176b2eb18b | ||
|
|
98a1c111b9 | ||
|
|
47048d8410 | ||
|
|
882fa7ecd4 | ||
|
|
d07ece53e6 | ||
|
|
afd2f6ba14 | ||
|
|
226b0d4194 | ||
|
|
44e4b5d238 | ||
|
|
c59d2575c8 | ||
|
|
f50b4724a6 | ||
|
|
48cbccff1e | ||
|
|
e31ec20ec4 | ||
|
|
b9ec216aa5 | ||
|
|
2ac3004762 | ||
|
|
543cbc6d1c | ||
|
|
27d8dbf13b | ||
|
|
e487b31877 | ||
|
|
2845a791d0 | ||
|
|
024df8c53f | ||
|
|
12d97475da | ||
|
|
5154d431f6 | ||
|
|
0fc1ad664f | ||
|
|
bb683bd393 | ||
|
|
69df8174b9 | ||
|
|
56ccf28000 | ||
|
|
0a45fc9ffe | ||
|
|
a56262401b | ||
|
|
ebea0d91af | ||
|
|
d6cea2f76d | ||
|
|
4386fd9f89 | ||
|
|
1c18edac76 | ||
|
|
247b93e8ec | ||
|
|
6470f9acb9 | ||
|
|
65e0aa6b82 | ||
|
|
53cc8e1115 | ||
|
|
72b8ec8f3b | ||
|
|
29e24232ad | ||
|
|
6d0cceca83 | ||
|
|
8e9b928b61 | ||
|
|
df81e84fc2 | ||
|
|
e6a1b72354 | ||
|
|
e48b97466c | ||
|
|
84b9929025 | ||
|
|
5c50dba9e1 | ||
|
|
55b9b8fc91 | ||
|
|
fb698896c9 | ||
|
|
95c32221a2 | ||
|
|
230fc8e11e | ||
|
|
9b919b6c34 | ||
|
|
49d3b7bf30 | ||
|
|
1d778676cd | ||
|
|
e887b3106f | ||
|
|
be5600dae2 | ||
|
|
686fb701bf | ||
|
|
a73c4d57b1 | ||
|
|
e6ce1dd0b0 | ||
|
|
25ab660c14 | ||
|
|
38d3eea6ee | ||
|
|
13f69a2245 | ||
|
|
ec337a8a84 | ||
|
|
267362a7a0 | ||
|
|
11f26bfefd | ||
|
|
87c3f5163e | ||
|
|
22bdf98617 | ||
|
|
e5001e8f40 | ||
|
|
ddd6c82dd7 | ||
|
|
155dc49c5a | ||
|
|
c2c0dd2717 | ||
|
|
27cf98a962 | ||
|
|
aaaa67050c | ||
|
|
52ae118e3c | ||
|
|
cb929f7e59 | ||
|
|
94b64884f8 | ||
|
|
8a590c7472 | ||
|
|
b11c33b2d9 | ||
|
|
eb201003ee | ||
|
|
cf9bad03aa | ||
|
|
c5127d2eec | ||
|
|
0a35adbdba | ||
|
|
38d68d9d97 | ||
|
|
8494c6c5d4 | ||
|
|
cbfdb7df56 | ||
|
|
ea44923cce | ||
|
|
e75f8603b0 | ||
|
|
5437974b85 | ||
|
|
99abc21dab | ||
|
|
5156399c68 | ||
|
|
c8a5ef8c5d | ||
|
|
5b52835377 | ||
|
|
b8277614ec | ||
|
|
fb6bdbefd5 | ||
|
|
53c33317f9 | ||
|
|
d534973650 | ||
|
|
ed154d35ba | ||
|
|
ff7e5da6de | ||
|
|
d7fa5b6b6b | ||
|
|
d57bd62add | ||
|
|
0f6dff6315 | ||
|
|
97b4e4a3d3 | ||
|
|
84c84160fd | ||
|
|
60c9926834 | ||
|
|
fcde1ba09c | ||
|
|
8dcf326576 | ||
|
|
22b0ebb5a8 | ||
|
|
c5d99a12f3 | ||
|
|
240f5b6718 | ||
|
|
d184bd8c82 | ||
|
|
98a2dedb32 | ||
|
|
c405cb2f1c | ||
|
|
5ea100352e | ||
|
|
86c5a8df75 | ||
|
|
a05562cdc5 | ||
|
|
ee37f1db3d | ||
|
|
c9720cad81 | ||
|
|
2124ef261a | ||
|
|
aae6030064 | ||
|
|
b234fcec9c | ||
|
|
1a45145c1e | ||
|
|
c1a282aa7b | ||
|
|
e23c5614b6 | ||
|
|
f457937980 | ||
|
|
eac8838dc2 | ||
|
|
74d281526b | ||
|
|
7a8128eec4 | ||
|
|
a55be5e58f | ||
|
|
4c317f1e4a | ||
|
|
48c46dc79a | ||
|
|
b9339bb727 | ||
|
|
e1f8e6aa6f | ||
|
|
76c95d8c6c | ||
|
|
a7da714b13 | ||
|
|
916cfcdb03 | ||
|
|
b8fc415870 | ||
|
|
428cb9c986 | ||
|
|
99341409f4 | ||
|
|
f07333acc9 | ||
|
|
342f5f1a09 | ||
|
|
d74efd839f | ||
|
|
af898e9117 | ||
|
|
c0e48627ae | ||
|
|
534ed91d04 | ||
|
|
c58d0af88f | ||
|
|
ca5c1e8a15 | ||
|
|
4e96a1065e | ||
|
|
c9a8d19e6c | ||
|
|
81f5fdda15 | ||
|
|
a38730eb9e | ||
|
|
1a9e650936 | ||
|
|
ae5177b20f | ||
|
|
27090f0cfb | ||
|
|
433b5a46cf | ||
|
|
034d71dce3 | ||
|
|
c3de2310c5 | ||
|
|
b9478e0f00 | ||
|
|
94aeac992c | ||
|
|
4927d26877 | ||
|
|
ae1634623e | ||
|
|
296c7d3c13 | ||
|
|
22add258ae | ||
|
|
77f66be493 | ||
|
|
f41cb8089d | ||
|
|
32a686a037 | ||
|
|
236abcf3f1 | ||
|
|
325f9f629d | ||
|
|
88a771c9ff | ||
|
|
b960e41cfa | ||
|
|
9f461d0fe6 | ||
|
|
9db1f3baca | ||
|
|
af5a02d971 | ||
|
|
71bb6538db | ||
|
|
06ecc45d13 | ||
|
|
31607c4d18 | ||
|
|
84bb214642 | ||
|
|
d821bdc9f3 | ||
|
|
63461e0895 | ||
|
|
08755a211b | ||
|
|
a3c9c1c386 | ||
|
|
0de2f1776e | ||
|
|
da0db92b9f | ||
|
|
95bf63330e | ||
|
|
04cec39277 | ||
|
|
7b95785954 | ||
|
|
7d0342e366 | ||
|
|
21bc08d643 | ||
|
|
ffa6f7ea34 | ||
|
|
6b0449dde7 | ||
|
|
aa4107478e | ||
|
|
9f8e7917a8 | ||
|
|
1b652c882e | ||
|
|
601234e492 | ||
|
|
6c804edadf | ||
|
|
3a5c0d9818 | ||
|
|
2194a05e60 | ||
|
|
a89c1a8d9a | ||
|
|
86215f8483 | ||
|
|
a1b01c1b40 | ||
|
|
09cb95d3da | ||
|
|
48d7bdee0e | ||
|
|
5157fc201c | ||
|
|
492ea5bceb | ||
|
|
e8cf351b6a | ||
|
|
fc0628d35b | ||
|
|
1f7391737e | ||
|
|
acdb7a27dc | ||
|
|
1fed324f91 | ||
|
|
e4771ba508 | ||
|
|
6a36a3b1d9 | ||
|
|
2956b28a32 | ||
|
|
50471ec8c8 | ||
|
|
3aa9ff5fba | ||
|
|
b6be5afb89 | ||
|
|
157b809e21 | ||
|
|
f74e2b0130 | ||
|
|
c887a162ba | ||
|
|
52df71ad3a | ||
|
|
d6ddc90199 | ||
|
|
9600e7f5ad | ||
|
|
f3603d05e7 | ||
|
|
8cd243b06b | ||
|
|
1da3437a4a | ||
|
|
c72fb92318 | ||
|
|
954448863e | ||
|
|
eec6009398 | ||
|
|
ce362f0e5e | ||
|
|
4940a77d12 | ||
|
|
4e77e01a67 | ||
|
|
5acdcb6c09 | ||
|
|
8400d855de | ||
|
|
bd07cb91bb | ||
|
|
d7e0a9b1ad | ||
|
|
dc600d47ec | ||
|
|
0d3952eef5 | ||
|
|
30a4ce40b9 | ||
|
|
9d0ab0ae5f | ||
|
|
e78d8b9fcc | ||
|
|
f350977cb4 | ||
|
|
7a652c0a8c | ||
|
|
a652baadb5 | ||
|
|
66b86888fc | ||
|
|
e07501252c | ||
|
|
2977ba9ec2 | ||
|
|
db35bb54e1 | ||
|
|
19bb6f5fe0 | ||
|
|
aab752dd2e | ||
|
|
8c75fdcb4c | ||
|
|
df03b69151 | ||
|
|
aca7a851bb | ||
|
|
e9caefdfce | ||
|
|
16ac20b594 | ||
|
|
a3e071b734 | ||
|
|
5d3b9d2f22 | ||
|
|
27a7e86599 | ||
|
|
d93d0ab19e | ||
|
|
776627eee9 | ||
|
|
5185eeb7ef | ||
|
|
083bc71315 | ||
|
|
b1b931922e | ||
|
|
0717f0d60c | ||
|
|
525fdd6c2b | ||
|
|
f27e75e8fa | ||
|
|
0ad5290389 | ||
|
|
7895afb8e9 | ||
|
|
2626378dfd | ||
|
|
1378245a63 | ||
|
|
05c92e652c | ||
|
|
6c0dd81528 | ||
|
|
bd1d775ca9 | ||
|
|
b3207b8144 | ||
|
|
4c8dd0ca9d | ||
|
|
61d9fcd753 | ||
|
|
c5607f07c8 | ||
|
|
49802be7d4 | ||
|
|
3d932b1cce | ||
|
|
66a6674cbc | ||
|
|
2d12c126eb | ||
|
|
3ec992474d | ||
|
|
15babe97ea | ||
|
|
308fd3dcac | ||
|
|
e8250104c8 | ||
|
|
796cd674d7 | ||
|
|
1fe9272a8f | ||
|
|
c285de87d4 | ||
|
|
058062d586 | ||
|
|
3b4fd35dde | ||
|
|
2a6bd5de35 | ||
|
|
64e539fcfb | ||
|
|
de6ca29dcd | ||
|
|
ef63202be2 | ||
|
|
62493c672d | ||
|
|
8c58a69be6 | ||
|
|
2eb3ec1a6e | ||
|
|
e3da17caa8 | ||
|
|
c7e35a1801 | ||
|
|
83c6b22d30 | ||
|
|
fc5d49bf9a | ||
|
|
473ed45b3f | ||
|
|
c5ddbcfb5b | ||
|
|
72b0ba36ae | ||
|
|
b107c0671d | ||
|
|
b9e233601d | ||
|
|
8f16388915 | ||
|
|
d143929454 | ||
|
|
45a0c5558a | ||
|
|
b6596f9957 | ||
|
|
7059b947e8 | ||
|
|
4eafe7a2c8 | ||
|
|
d165da9c6c | ||
|
|
a341b793e4 | ||
|
|
a1d46a278b | ||
|
|
c6cf3a98a4 | ||
|
|
56887efdf5 | ||
|
|
4ec193042f | ||
|
|
6b33db3ae3 | ||
|
|
855772ae5a | ||
|
|
467ba380b2 | ||
|
|
93ed8e98c1 | ||
|
|
5c18db240c | ||
|
|
915ec81f83 | ||
|
|
8c545d2947 | ||
|
|
cbfbae1409 | ||
|
|
728b7dec3e | ||
|
|
7b5730723d | ||
|
|
71844e13af | ||
|
|
c6dfdf9135 | ||
|
|
4cd3a37b4a | ||
|
|
5efb4b522f | ||
|
|
64d5e329c0 | ||
|
|
ee9caa4305 | ||
|
|
39b56ac598 | ||
|
|
551ffb88ab | ||
|
|
698bd431e6 | ||
|
|
ccd3b305c2 | ||
|
|
b47c90f0e0 | ||
|
|
1afd5f70dd | ||
|
|
4cb304def8 | ||
|
|
f2af308e6d | ||
|
|
a6868e2b25 | ||
|
|
7a96ddccc6 | ||
|
|
bda5be8e4c | ||
|
|
93f5d4058d | ||
|
|
98dd2be673 | ||
|
|
ea7c1ace2a | ||
|
|
2da2054ccf | ||
|
|
3f5fa0025d | ||
|
|
f4be165767 | ||
|
|
55a1628a5e | ||
|
|
6c32f6beff | ||
|
|
21ec8fe53f | ||
|
|
4185209036 | ||
|
|
6150e0c56b | ||
|
|
42b811e578 | ||
|
|
ef1597e45b | ||
|
|
1e677c6728 | ||
|
|
9ef1e32327 | ||
|
|
173f6fd75d | ||
|
|
bbe7821483 | ||
|
|
65ca490b64 | ||
|
|
907f222a73 | ||
|
|
b649d61e8b | ||
|
|
ea793368a9 | ||
|
|
3331526865 | ||
|
|
cccb22f0e3 | ||
|
|
4f0d9605fe | ||
|
|
19fcd3dad6 | ||
|
|
eb8ff91c5d | ||
|
|
f98edcab5c | ||
|
|
e5ea3bd707 | ||
|
|
c87c1d2359 | ||
|
|
7bb9c69c08 | ||
|
|
25eb2edb86 | ||
|
|
c2a8970109 | ||
|
|
59c14801cc | ||
|
|
ea749bb052 | ||
|
|
1cb69c9b43 | ||
|
|
89d8a2fe72 | ||
|
|
4846b0ec28 | ||
|
|
771033a449 | ||
|
|
16d7301046 | ||
|
|
e2893fe68f | ||
|
|
8d913d77dd | ||
|
|
0522db3f19 | ||
|
|
50cea9d912 | ||
|
|
cff6a64e9f | ||
|
|
219a6b3ad1 | ||
|
|
798c230634 | ||
|
|
3801150a7a | ||
|
|
91b2b14ba5 | ||
|
|
1b8cda7924 | ||
|
|
31a4309077 | ||
|
|
db3fd24cea | ||
|
|
62b956946f | ||
|
|
04552f7921 | ||
|
|
9417105990 | ||
|
|
593c24e5bd | ||
|
|
7380bfa9e4 | ||
|
|
6f0d16bca5 | ||
|
|
78dafc9cbe | ||
|
|
2da5800665 | ||
|
|
6270433237 | ||
|
|
8214d25f9f | ||
|
|
df7565c9e2 | ||
|
|
d48218bfe9 | ||
|
|
db653cbdac | ||
|
|
766f70c81a | ||
|
|
3e9311b096 | ||
|
|
1bfb8d35cd | ||
|
|
07a85a1018 | ||
|
|
145641ac41 | ||
|
|
08aa827366 | ||
|
|
4d8a939291 | ||
|
|
e1f514042f | ||
|
|
7d78457fe0 | ||
|
|
f067b8b37c | ||
|
|
6043584305 | ||
|
|
bb02ccd574 | ||
|
|
64b250903f | ||
|
|
c5e73219bf | ||
|
|
5f47d3b021 | ||
|
|
d22b626a02 | ||
|
|
af9c0cca23 | ||
|
|
a641c0bb2f | ||
|
|
6c3ab99e3c |
@@ -45,8 +45,7 @@ before_build:
|
||||
- CALL "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars32.bat"
|
||||
- SET PATH=%PATH%;c:\qbt\qt5_32\bin;%CACHE_DIR%\jom;
|
||||
# setup project
|
||||
- COPY /Y "%CACHE_DIR%\winconf.pri" "%REPO_DIR%"
|
||||
- COPY /Y "%CACHE_DIR%\winconf-msvc.pri" "%REPO_DIR%"
|
||||
- COPY /Y "%CACHE_DIR%\conf.pri" "%REPO_DIR%"
|
||||
# workarounds
|
||||
- MKLINK /J "c:\qbt\base" "%CACHE_DIR%\base"
|
||||
|
||||
|
||||
18
.github/ISSUE_TEMPLATE.md
vendored
@@ -1,14 +1,20 @@
|
||||
**Please provide the following information**
|
||||
|
||||
### qBittorrent version and Operating System:
|
||||
### qBittorrent version and Operating System
|
||||
(type here)
|
||||
|
||||
### If on linux, libtorrent and Qt version:
|
||||
### If on linux, libtorrent and Qt version
|
||||
(type here)
|
||||
|
||||
### What is the problem:
|
||||
### What is the problem
|
||||
(type here)
|
||||
|
||||
### What is the expected behavior:
|
||||
### What is the expected behavior
|
||||
(type here)
|
||||
|
||||
### Steps to reproduce:
|
||||
### Steps to reproduce
|
||||
(type here)
|
||||
|
||||
### Extra info(if any):
|
||||
### Extra info(if any)
|
||||
(type here)
|
||||
|
||||
|
||||
1
.gitignore
vendored
@@ -22,6 +22,7 @@ qrc_*.cpp
|
||||
ui_*.h
|
||||
*.moc
|
||||
src/lang/qbittorrent_*.qm
|
||||
src/webui/www/translations/webui_*.qm
|
||||
.DS_Store
|
||||
.qmake.stash
|
||||
src/qbittorrent.app
|
||||
|
||||
45
.travis.yml
@@ -3,7 +3,6 @@ language: cpp
|
||||
os:
|
||||
- linux
|
||||
- osx
|
||||
osx_image: xcode7.3
|
||||
|
||||
env:
|
||||
matrix:
|
||||
@@ -76,10 +75,13 @@ before_install:
|
||||
|
||||
- shopt -s expand_aliases
|
||||
- alias make="colormake -j3" # Using nprocs/2 sometimes may fail (gcc is killed by system)
|
||||
#- libt_path="$HOME/libt_install"
|
||||
#- ltconf="$ltconf --prefix="$libt_path" --disable-geoip"
|
||||
- qbt_path="$HOME/qbt_install"
|
||||
- qbtconf="$qbtconf --prefix="$qbt_path" PKG_CONFIG_PATH="$libt_path/lib/pkgconfig":/opt/qt55/lib/pkgconfig:$PKG_CONFIG_PATH"
|
||||
- |
|
||||
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
|
||||
qbtconf="$qbtconf --prefix="$qbt_path" PKG_CONFIG_PATH=/opt/qt55/lib/pkgconfig:$PKG_CONFIG_PATH"
|
||||
else
|
||||
qbtconf="$qbtconf --prefix="$qbt_path""
|
||||
fi
|
||||
|
||||
# options for specific branches
|
||||
- if [ "$gui" = false ]; then qbtconf="$qbtconf --disable-gui" ; fi
|
||||
@@ -118,34 +120,16 @@ install:
|
||||
# dependencies
|
||||
brew update > /dev/null
|
||||
brew outdated "pkg-config" || brew upgrade "pkg-config"
|
||||
brew install colormake ccache zlib qt
|
||||
brew install colormake ccache zlib qt libtorrent-rasterbar
|
||||
PATH="/usr/local/opt/ccache/libexec:$PATH"
|
||||
brew link --force zlib qt
|
||||
|
||||
wget https://builds.shiki.hu/homebrew/version
|
||||
if ! cmp --quiet "version" "$HOME/hombebrew_cache/version" ; then
|
||||
echo "Cached files are different from server. Downloading new ones."
|
||||
# First delete old files
|
||||
rm -r "$HOME/hombebrew_cache"
|
||||
mkdir "$HOME/hombebrew_cache"
|
||||
cp "version" $HOME/hombebrew_cache
|
||||
cd "$HOME/hombebrew_cache"
|
||||
wget https://builds.shiki.hu/homebrew/libtorrent-rasterbar.rb
|
||||
wget https://builds.shiki.hu/homebrew/libtorrent-rasterbar-1.0.11+git20172003.8736a59adc.el_capitan.bottle.tar.gz
|
||||
fi
|
||||
|
||||
# Copy custom libtorrent bottle to homebrew's cache so it can find and install it
|
||||
# Also install our custom libtorrent formula by passing the local path to it
|
||||
# These 2 files are restored from Travis' cache.
|
||||
cp "$HOME/hombebrew_cache/libtorrent-rasterbar-1.0.11+git20172003.8736a59adc.el_capitan.bottle.tar.gz" "$(brew --cache)"
|
||||
brew install "$HOME/hombebrew_cache/libtorrent-rasterbar.rb"
|
||||
|
||||
if [ "$build_system" = "cmake" ]; then
|
||||
brew outdated cmake || brew upgrade cmake
|
||||
brew install ninja
|
||||
|
||||
ln -s /usr/local/opt/qt/mkspecs /usr/local/mkspecs
|
||||
ln -s /usr/local/opt/qt/plugins /usr/local/plugins
|
||||
sudo ln -s /usr/local/opt/qt/mkspecs /usr/local/mkspecs
|
||||
sudo ln -s /usr/local/opt/qt/plugins /usr/local/plugins
|
||||
fi
|
||||
|
||||
MY_CMAKE_OPENSSL_HINT="-DOPENSSL_ROOT_DIR=/usr/local/opt/openssl/"
|
||||
@@ -163,16 +147,23 @@ script:
|
||||
if [ "$build_system" = "cmake" ]; then
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DGUI=${gui} -DCMAKE_INSTALL_PREFIX="$qbt_path" "$MY_CMAKE_OPENSSL_HINT" \
|
||||
if [ "$gui" = "false" ]; then
|
||||
DISABLE_GUI_OPTION="-DCMAKE_DISABLE_FIND_PACKAGE_Qt5Widgets=ON"
|
||||
fi
|
||||
cmake $DISABLE_GUI_OPTION -DCMAKE_INSTALL_PREFIX="$qbt_path" "$MY_CMAKE_OPENSSL_HINT" \
|
||||
-G "Ninja" -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE ..
|
||||
BUILD_TOOL="ninja"
|
||||
fi
|
||||
if [ "$build_system" = "qmake" ]; then
|
||||
./bootstrap.sh && ./configure $qbtconf
|
||||
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
|
||||
# For some reason for RC_1_1 we need to also specify the OpenSSL compiler/linker flags
|
||||
# Homebrew doesn't symlink OpenSSL for security reasons
|
||||
./bootstrap.sh && ./configure $qbtconf CXXFLAGS="$(PKG_CONFIG_PATH="/usr/local/opt/openssl/lib/pkgconfig:$PKG_CONFIG_PATH" pkg-config --cflags openssl)" LDFLAGS="$(PKG_CONFIG_PATH="/usr/local/opt/openssl/lib/pkgconfig:$PKG_CONFIG_PATH" pkg-config --libs openssl)"
|
||||
sed -i "" -e "s/^\(CC.*&&\).*$/\1 $CC/" src/Makefile # workaround for Qt & ccache: https://bugreports.qt.io/browse/QTBUG-31034
|
||||
sed -i "" -e "s/^\(CXX.*&&\).*$/\1 $CXX/" src/Makefile
|
||||
sed -i "" -e 's/^\(CXXFLAGS.*\)$/\1 -Wno-unused-local-typedefs -Wno-inconsistent-missing-override/' src/Makefile
|
||||
else
|
||||
./bootstrap.sh && ./configure $qbtconf
|
||||
fi
|
||||
BUILD_TOOL="make"
|
||||
fi
|
||||
|
||||
@@ -12,7 +12,7 @@ mode = developer
|
||||
|
||||
|
||||
[qbittorrent.qbittorrentdesktop_master]
|
||||
source_file = src/icons/qBittorrent.desktop
|
||||
source_file = dist/unix/qbittorrent.desktop
|
||||
source_lang = en
|
||||
type = DESKTOP
|
||||
minimum_perc = 23
|
||||
|
||||
16
AUTHORS
@@ -34,6 +34,14 @@ Code from other projects:
|
||||
license: GPLv2/3
|
||||
|
||||
Images Authors:
|
||||
* files: src/icons/skin/qbittorrent-tray.svg (and related pngs)
|
||||
copyright: Provided by HVS <hvs linuxmail org> (raster first proposal) and Atif Afzal(@atfzl github) <atif5801@gmail.com> (vectorized and modified)
|
||||
license: GPLv2+
|
||||
|
||||
* files: src/qbittorrent_file.ico src/icons/fileicon.svg
|
||||
copyright: 'uknown.svg' (LGPLv3+) from Oxygen Icon Theme was used as base which was slightly modified and 'qbittorrent-tray.svg' (GPLv2+) was overlayed above it.
|
||||
license: GPLv3+
|
||||
|
||||
* files: src/icons/*.png
|
||||
copyright: Gnome Icon Theme
|
||||
license: GPLv2
|
||||
@@ -44,10 +52,10 @@ Images Authors:
|
||||
license: LGPL
|
||||
url: http://www.oxygen-icons.org
|
||||
|
||||
* files: src/icons/flags/*.png
|
||||
copyright: Mark James <mjames@gmail.com>
|
||||
license: Public Domain
|
||||
url: http://www.famfamfam.com
|
||||
* files: src/icons/flags/*.svg
|
||||
copyright: lipis/flag-icon-css
|
||||
license: MIT
|
||||
url: https://github.com/lipis/flag-icon-css/
|
||||
|
||||
* files: src/icons/skin/*.png
|
||||
files: src/menuicons/YYxYY/*.png
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
cmake_policy(VERSION 3.5)
|
||||
cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
|
||||
|
||||
message(AUTHOR_WARNING "If the build fails, please try the autotools/qmake method.")
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules)
|
||||
include(FunctionReadVersion)
|
||||
@@ -22,40 +23,32 @@ add_definitions(-DQBT_VERSION_MINOR=${VER_MINOR})
|
||||
add_definitions(-DQBT_VERSION_BUGFIX=${VER_BUGFIX})
|
||||
add_definitions(-DQBT_VERSION_BUILD=${VER_BUILD})
|
||||
|
||||
# os2 {
|
||||
# DEFINES += DQBT_VERSION=\'\"v$${PROJECT_VERSION}\"\'
|
||||
# DEFINES += DQBT_VERSION_2=\'\"$${PROJECT_VERSION}\"\'
|
||||
# } else {
|
||||
add_definitions(-DQBT_VERSION="v${PROJECT_VERSION}")
|
||||
add_definitions(-DQBT_VERSION_2="${PROJECT_VERSION}")
|
||||
# }
|
||||
|
||||
if (UNIX AND NOT APPLE)
|
||||
include(GNUInstallDirs)
|
||||
endif (UNIX AND NOT APPLE)
|
||||
include(GNUInstallDirs)
|
||||
include(FeatureSummary)
|
||||
|
||||
# version requirements
|
||||
set(requiredBoostVersion 1.35)
|
||||
set(requiredQtVersion 5.5.1)
|
||||
|
||||
if(WIN32)
|
||||
include(winconf)
|
||||
endif(WIN32)
|
||||
|
||||
# we need options here, because they are used not only in "src" subdir, but in the "dist" dir too
|
||||
include(CMakeDependentOption)
|
||||
|
||||
option(SYSTEM_QTSINGLEAPPLICATION
|
||||
"Use the system qtsingleapplication library or shipped one otherwise")
|
||||
|
||||
option(GUI "Allows to disable GUI for headless running. Disables QtDBus and the GeoIP Database" ON)
|
||||
|
||||
option(WEBUI "Allows to disable the WebUI." ON)
|
||||
|
||||
if (WIN32)
|
||||
option(STACKTRACE_WIN "")
|
||||
else (WIN32)
|
||||
cmake_dependent_option(SYSTEMD "Install the systemd service file (headless only)" OFF
|
||||
"NOT GUI" OFF)
|
||||
cmake_dependent_option(DBUS "Enable use of QtDBus (GUI only)" ON "GUI" OFF)
|
||||
endif(WIN32)
|
||||
# we need options here, at the top level, because they are used not only in "src" subdir, but in the "dist" dir too
|
||||
include(CompileFeature)
|
||||
|
||||
optional_compile_definitions(COUNTRIES_RESOLUTION FEATURE DESCRIPTION "Enable resolving peers IP addresses to countries"
|
||||
DEFAULT ON DISABLED DISABLE_COUNTRIES_RESOLUTION)
|
||||
optional_compile_definitions(STACKTRACE FEATURE DESCRIPTION "Enable stacktraces"
|
||||
DEFAULT ON ENABLED STACKTRACE)
|
||||
optional_compile_definitions(WEBUI FEATURE DESCRIPTION "Enables built-in HTTP server for headless use"
|
||||
DEFAULT ON DISABLED DISABLE_WEBUI)
|
||||
|
||||
add_subdirectory(src)
|
||||
add_subdirectory(dist)
|
||||
|
||||
feature_summary(DESCRIPTION "\nConfiguration results:" WHAT ALL)
|
||||
|
||||
@@ -1,15 +1,43 @@
|
||||
All new code must follow the following coding guidelines.
|
||||
If you make changes in a file that still uses another coding style, make sure that you follow these guidelines for your changes instead.
|
||||
All new code **must** follow the following coding guidelines.
|
||||
If you make changes in a file that still uses another coding style, make sure that you follow these guidelines for your changes.
|
||||
For programming languages other than C++ (e.g. JavaScript) used in this repository and submodules, unless otherwise specified, coding guidelines listed here applies as much as possible.
|
||||
|
||||
**Note 1:** I will not take your head if you forget and use another style. However, most probably the request will be delayed until you fix your coding style.
|
||||
**Note 2:** You can use the `uncrustify` program/tool to clean up any source file. Use it with the `uncrustify.cfg` configuration file found in the root folder.
|
||||
**Note 3:** There is also a style for QtCreator but it doesn't cover all cases. In QtCreator `Tools->Options...->C++->Code Style->Import...` and choose the `codingStyleQtCreator.xml` file found in the root folder.
|
||||
|
||||
### 1. Curly braces ###
|
||||
### Table Of Contents
|
||||
|
||||
* [1. New lines & curly braces](#1-new-lines--curly-braces)
|
||||
* [a. Function blocks, class/struct definitions, namespaces](#a-function-blocks-classstruct-definitions-namespaces)
|
||||
* [b. Other code blocks](#b-other-code-blocks)
|
||||
* [c. Blocks in switch's case labels](#c-blocks-in-switchs-case-labels)
|
||||
* [d. If-else statements](#d-if-else-statements)
|
||||
* [e. Single statement if blocks](#e-single-statement-if-blocks)
|
||||
* [f. Acceptable conditions to omit braces](#f-acceptable-conditions-to-omit-braces)
|
||||
* [g. Brace enclosed initializers](#g-brace-enclosed-initializers)
|
||||
* [2. Indentation](#2-indentation)
|
||||
* [3. File encoding and line endings](#3-file-encoding-and-line-endings)
|
||||
* [4. Initialization lists](#4-initialization-lists)
|
||||
* [5. Enums](#5-enums)
|
||||
* [6. Names](#6-names)
|
||||
* [a. Type names and namespaces](#a-type-names-and-namespaces)
|
||||
* [b. Variable names](#b-variable-names)
|
||||
* [c. Private member variable names](#c-private-member-variable-names)
|
||||
* [7. Header inclusion order](#7-header-inclusion-order)
|
||||
* [8. Include guard](#8-include-guard)
|
||||
* [9. Misc](#9-misc)
|
||||
* [10. Git commit message](#10-git-commit-message)
|
||||
* [11. Not covered above](#11-not-covered-above)
|
||||
---
|
||||
|
||||
### 1. New lines & curly braces ###
|
||||
|
||||
#### a. Function blocks, class/struct definitions, namespaces ####
|
||||
```c++
|
||||
int myFunction(int a)
|
||||
{
|
||||
//code
|
||||
// code
|
||||
}
|
||||
|
||||
void myFunction() {} // empty body
|
||||
@@ -17,29 +45,29 @@ void myFunction() {} // empty body
|
||||
MyClass::MyClass(int *parent)
|
||||
: m_parent(parent)
|
||||
{
|
||||
//initialize
|
||||
// initialize
|
||||
}
|
||||
|
||||
int MyClass::myMethod(int a)
|
||||
{
|
||||
//code
|
||||
// code
|
||||
}
|
||||
|
||||
class MyOtherClass
|
||||
{
|
||||
public:
|
||||
//code
|
||||
|
||||
// code
|
||||
|
||||
protected:
|
||||
//code
|
||||
|
||||
// code
|
||||
|
||||
private:
|
||||
//code
|
||||
// code
|
||||
};
|
||||
|
||||
namespace Name
|
||||
{
|
||||
//code
|
||||
// code
|
||||
}
|
||||
|
||||
// Lambdas
|
||||
@@ -54,20 +82,20 @@ namespace Name
|
||||
#### b. Other code blocks ####
|
||||
```c++
|
||||
if (condition) {
|
||||
//code
|
||||
// code
|
||||
}
|
||||
|
||||
for (int a = 0; a < b; ++b) {
|
||||
//code
|
||||
// code
|
||||
}
|
||||
|
||||
switch (a) {
|
||||
case 1:
|
||||
//blah
|
||||
// blah
|
||||
case 2:
|
||||
//blah
|
||||
// blah
|
||||
default:
|
||||
//blah
|
||||
// blah
|
||||
}
|
||||
```
|
||||
|
||||
@@ -75,21 +103,81 @@ default:
|
||||
```c++
|
||||
switch (var) {
|
||||
case 1: {
|
||||
//declare local variables
|
||||
//code
|
||||
// declare local variables
|
||||
// code
|
||||
}
|
||||
break;
|
||||
case 2: {
|
||||
//declare local variables
|
||||
//code
|
||||
// declare local variables
|
||||
// code
|
||||
}
|
||||
break;
|
||||
default:
|
||||
//code
|
||||
// code
|
||||
}
|
||||
```
|
||||
|
||||
#### d. Brace enclosed initializers ####
|
||||
#### d. If-else statements ####
|
||||
The `else if`/`else` must be on their own lines:
|
||||
```c++
|
||||
if (condition) {
|
||||
// code
|
||||
}
|
||||
else if (condition) {
|
||||
// code
|
||||
}
|
||||
else {
|
||||
// code
|
||||
}
|
||||
```
|
||||
|
||||
#### e. Single statement if blocks ####
|
||||
Most single statement if blocks should look like this:
|
||||
```c++
|
||||
if (condition)
|
||||
a = a + b;
|
||||
```
|
||||
|
||||
One acceptable exception to this can be `return`, `break` or `continue` statements,
|
||||
provided that the test condition isn't very long and its body statement occupies only one line.
|
||||
However you can still choose to use the first rule.
|
||||
```c++
|
||||
if (a > 0) return;
|
||||
|
||||
while (p) {
|
||||
// ...
|
||||
if (!b) continue;
|
||||
}
|
||||
```
|
||||
|
||||
#### f. Acceptable conditions to omit braces ####
|
||||
When the conditional statement in `if`/`else` has only one line and its body occupy only one line,
|
||||
this also applies to loops statements.
|
||||
Notice that for a series of `if - else` branches, if one branch needs braces then all branches must add braces.
|
||||
```c++
|
||||
if (a < b) // conditional statement
|
||||
do(a); // body
|
||||
|
||||
if (a < b)
|
||||
do(a);
|
||||
else if (a > b)
|
||||
do(b);
|
||||
else
|
||||
do(c);
|
||||
|
||||
if (a < b) {
|
||||
do(a);
|
||||
}
|
||||
else if (a > b) { // curly braces required here, then all branches should also add them
|
||||
do(b);
|
||||
do(d);
|
||||
}
|
||||
else {
|
||||
do(c);
|
||||
}
|
||||
```
|
||||
|
||||
#### g. Brace enclosed initializers ####
|
||||
Unlike single-line functions, you must not insert spaces between the brackets and concluded expressions.<br/>
|
||||
But you must insert a space between the variable name and initializer.
|
||||
```c++
|
||||
@@ -99,53 +187,14 @@ Class obj {expr1, /*...,*/ exprN};
|
||||
QVariantMap map {{"key1", 5}, {"key2", 10}};
|
||||
```
|
||||
|
||||
### 2. If blocks ###
|
||||
#### a. Multiple tests ####
|
||||
```c++
|
||||
if (condition) {
|
||||
//code
|
||||
}
|
||||
else if (condition) {
|
||||
//code
|
||||
}
|
||||
else {
|
||||
//code
|
||||
}
|
||||
```
|
||||
The `else if`/`else` must be on their own lines.
|
||||
|
||||
#### b. Single statement if blocks ####
|
||||
**Most** single statement if blocks should look like this:
|
||||
```c++
|
||||
if (condition)
|
||||
a = a + b;
|
||||
```
|
||||
|
||||
One acceptable exception to this **can be** `return`, `break` or `continue` statements, provided that the test condition isn't very long. However you can choose to use the first rule instead.
|
||||
```c++
|
||||
a = myFunction();
|
||||
b = a * 1500;
|
||||
|
||||
if (b > 0) return;
|
||||
c = 100 / b;
|
||||
```
|
||||
|
||||
#### c. Using curly braces for single statement if blocks ####
|
||||
|
||||
However, there are cases where curly braces for single statement if blocks **should** be used.
|
||||
* If some branch needs braces then all others should use them. Unless you have multiple `else if` in a row and the one needing the braces is only for a very small sub-block of code.
|
||||
* Another exception would be when we have nested if blocks or generally multiple levels of code that affect code readability.
|
||||
|
||||
Generally it will depend on the particular piece of code and would be determined on how readable that piece of code is. **If in doubt** always use braces if one of the above exceptions applies.
|
||||
|
||||
### 3. Indentation ###
|
||||
### 2. Indentation ###
|
||||
4 spaces.
|
||||
|
||||
### 4. File encoding and line endings. ###
|
||||
### 3. File encoding and line endings ###
|
||||
|
||||
UTF-8 and Unix-like line ending (LF). Unless some platform specific files need other encodings/line endings.
|
||||
|
||||
### 5. Initialization lists. ###
|
||||
### 4. Initialization lists ###
|
||||
Initialization lists should be vertical. This will allow for more easily readable diffs. The initialization colon should be indented and in its own line along with first argument. The rest of the arguments should be indented too and have the comma prepended.
|
||||
```c++
|
||||
myClass::myClass(int a, int b, int c, int d)
|
||||
@@ -154,11 +203,11 @@ myClass::myClass(int a, int b, int c, int d)
|
||||
, m_c(c)
|
||||
, m_d(d)
|
||||
{
|
||||
//code
|
||||
// code
|
||||
}
|
||||
```
|
||||
|
||||
### 6. Enums. ###
|
||||
### 5. Enums ###
|
||||
Enums should be vertical. This will allow for more easily readable diffs. The members should be indented.
|
||||
```c++
|
||||
enum Days
|
||||
@@ -173,7 +222,7 @@ enum Days
|
||||
};
|
||||
```
|
||||
|
||||
### 7. Names. ###
|
||||
### 6. Names ###
|
||||
All names should be camelCased.
|
||||
|
||||
#### a. Type names and namespaces ####
|
||||
@@ -207,40 +256,89 @@ class MyClass
|
||||
}
|
||||
```
|
||||
|
||||
### 8. Header inclusion order. ###
|
||||
The headers should be placed in the following order:
|
||||
1. Module header (in .cpp)
|
||||
2. System/Qt/Boost etc. headers (splitted in subcategories if you have many).
|
||||
3. Application headers, starting from *Base* headers.
|
||||
### 7. Header inclusion order ###
|
||||
The headers should be placed in the following group order:
|
||||
1. Module header (in .cpp)
|
||||
2. C++ Standard Library headers
|
||||
3. System headers
|
||||
4. Boost library headers
|
||||
5. Libtorrent headers
|
||||
6. Qt headers
|
||||
7. qBittorrent's own headers, starting from the *base* headers.
|
||||
|
||||
The headers should be ordered alphabetically within each group.
|
||||
If there are conditionals for the same header group, then put them at the bottom of the respective group.
|
||||
If there are conditionals that contain headers from several different header groups, then put them above the "qBittorrent's own headers" group.
|
||||
|
||||
One exception is the header containing the library version (for example, QtGlobal), this particular header isn't constrained by the aforementioned order.
|
||||
|
||||
The headers should be ordered alphabetically within each group (subgroup).<br/>
|
||||
<br/>
|
||||
Example:
|
||||
```c++
|
||||
// examplewidget.cpp
|
||||
// file: examplewidget.cpp
|
||||
|
||||
// Module header
|
||||
#include "examplewidget.h"
|
||||
|
||||
#include <cmath>
|
||||
// exceptions, headers containing version number
|
||||
#include <boost/version.hpp>
|
||||
#include <libtorrent/version.hpp>
|
||||
#include <QtGlobal>
|
||||
|
||||
// C++ Standard Library headers
|
||||
#include <cstdio>
|
||||
|
||||
#include <QDateTime>
|
||||
#include <QList>
|
||||
#ifdef Q_OS_WIN // conditional
|
||||
#include <cmath>
|
||||
#endif
|
||||
|
||||
// System headers
|
||||
#ifdef Q_OS_WIN
|
||||
#include <Windows.h>
|
||||
#endif
|
||||
|
||||
// Boost library headers
|
||||
#include <boost/circular_buffer.hpp>
|
||||
|
||||
// Libtorrent headers
|
||||
#include <libtorrent/session.hpp>
|
||||
|
||||
// Qt headers
|
||||
#include <QString>
|
||||
#include <QUrl>
|
||||
|
||||
#include <libtorrent/version.hpp>
|
||||
#ifdef Q_OS_MAC // conditional
|
||||
#include <QFont>
|
||||
#endif
|
||||
|
||||
#include "base/bittorrent/session.h"
|
||||
// conditional that contains headers from several different header groups
|
||||
#if LIBTORRENT_VERSION_NUM >= 10100
|
||||
#include <memory>
|
||||
#include <QElapsedTimer>
|
||||
#endif
|
||||
|
||||
// qBittorrent's own headers
|
||||
#include "base/bittorrent/infohash.h"
|
||||
#include "base/utils/fs.h"
|
||||
#include "base/utils/misc.h"
|
||||
#include "base/utils/string.h"
|
||||
#include "anothermodule.h"
|
||||
#include "ui_examplewidget.h"
|
||||
```
|
||||
|
||||
### 8. Include guard ###
|
||||
`#pragma once` should be used instead of "include guard" in new code:
|
||||
```c++
|
||||
// examplewidget.h
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
class ExampleWidget : public QWidget
|
||||
{
|
||||
// (some code omitted)
|
||||
};
|
||||
|
||||
```
|
||||
|
||||
### 9. Misc. ###
|
||||
### 9. Misc ###
|
||||
|
||||
* Line breaks for long lines with operation:
|
||||
|
||||
@@ -282,20 +380,32 @@ auto spinBox = static_cast<QSpinBox*>(sender());
|
||||
// we know the variable type based on the right-hand expression
|
||||
```
|
||||
|
||||
* Space around operations eg `a = b + c` or `a=b+c`:
|
||||
|
||||
Before and after the assignment and other binary (and ternary) operators there should be a space.<br/>
|
||||
There should not be a space between increment/decrement and its operand.<br/>
|
||||
Some valid use cases:
|
||||
* Notice the spaces in the following specific situations:
|
||||
```c++
|
||||
// Before and after the assignment and other binary (and ternary) operators there should be a space
|
||||
// There should not be a space between increment/decrement and its operand
|
||||
a += 20;
|
||||
a = (b <= MAX_B ? b : MAX_B);
|
||||
++a;
|
||||
b--;
|
||||
--b;
|
||||
|
||||
for (int a = 0; a < b; ++b) {
|
||||
// code
|
||||
}
|
||||
|
||||
// Range-based for loop, spaces before and after the colon
|
||||
for (auto i : container) {
|
||||
}
|
||||
|
||||
// Derived class, spaces before and after the colon
|
||||
class Derived : public Base
|
||||
{
|
||||
};
|
||||
```
|
||||
|
||||
* Prefer pre-increment, pre-decrement operators
|
||||
```c++
|
||||
++i, --j; // Yes
|
||||
i++, j--; // No
|
||||
```
|
||||
|
||||
* private/public/protected must not be indented
|
||||
@@ -304,5 +414,16 @@ for (int a = 0; a < b; ++b) {
|
||||
|
||||
* Method definitions aren't allowed in header files
|
||||
|
||||
### 10. Not covered above ###
|
||||
If something isn't covered above, just follow the same style the file you are editing has. If that particular detail isn't present in the file you are editing, then use whatever the rest of the project uses.
|
||||
### 10. Git commit message ###
|
||||
1. Limit the subject line to 50 characters. Subject should contain only the very essence of the changes (you should avoid extra details and internals)
|
||||
2. Separate subject from body with a blank line
|
||||
3. Capitalize the subject line
|
||||
4. Do not end the subject line with a period
|
||||
5. Use the imperative mood in the subject line (it's like you're ordering the program to do something (e.g. "Don't create temporary substrings")
|
||||
6. Wrap the body at 72 characters
|
||||
7. Use the body to explain what and why vs. how
|
||||
8. If commit fixes a reported issue, mention it in the message body (e.g. `Closes #4134.`)
|
||||
|
||||
### 11. Not covered above ###
|
||||
If something isn't covered above, just follow the same style the file you are editing has.
|
||||
*This guide is not exhaustive and the style for a particular piece of code not specified here will be determined by project members on code review.*
|
||||
|
||||
238
CONTRIBUTING.md
@@ -1,35 +1,221 @@
|
||||
# Filing an issue
|
||||
# How to contribute to qBittorrent
|
||||
|
||||
### Must read
|
||||
* If you aren't sure, you can ask on the [**forum**](http://forum.qbittorrent.org) or read our [**wiki**](http://wiki.qbittorrent.org) first.
|
||||
* Do a quick **search**. Others might already reported the issue.
|
||||
* Write in **English**!
|
||||
* Provide **version** information: (You can find version numbers at menu `Help -> About -> Libraries`)
|
||||
```
|
||||
qBittorrent:
|
||||
Qt:
|
||||
libtorrent:
|
||||
boost:
|
||||
OS version:
|
||||
```
|
||||
* Provide **steps** to reproduce the problem, it will be easier to pinpoint the fault.
|
||||
* **Screenshots**! A screenshot is worth a thousand words. just upload it. [(How?)](https://help.github.com/articles/file-attachments-on-issues-and-pull-requests)
|
||||
There are three main ways to contribute to the project.
|
||||
Read the respective section to find out more.
|
||||
|
||||
### Good to know
|
||||
* **Be patient**. The dev team is small and resource limited. Devs finding their free time, analyzing the problem and fixing the issue, it all takes time. :clock3:
|
||||
* If you can code, why not become a **contributor** by fixing the issue and open a pull request? :wink:
|
||||
* Harsh words or threats won't help your situation. What's worse, your complain will (very likely) to be **ignored**. :fearful:
|
||||
### Table Of Contents
|
||||
|
||||
* **[Bug reporting etiquette](#bug-reporting-etiquette)**
|
||||
|
||||
|
||||
* **[Submitting an issue/bug report](#submitting-an-issuebug-report)**
|
||||
* [What is an actual bug report?](#what-is-an-actual-bug-report)
|
||||
* [Before submitting a bug report](#before-submitting-a-bug-report)
|
||||
* [Steps to ensure a good bug report](#steps-to-ensure-a-good-bug-report)
|
||||
|
||||
|
||||
* **[Suggesting enhancements/feature requests](#suggesting-enhancementsfeature-requests)**
|
||||
* [Before submitting an enhancement/feature request](#before-submitting-an-enhancementfeature-request)
|
||||
* [Steps to ensure a good enhancement/feature suggestion](#steps-to-ensure-a-good-enhancementfeature-suggestion)
|
||||
|
||||
|
||||
* **[Opening a pull request](#opening-a-pull-request)**
|
||||
* [Must read](#must-read)
|
||||
* [Good to know](#good-to-know)
|
||||
|
||||
# Bug reporting etiquette
|
||||
|
||||
* Issues, pull requests, and comments must always be in **English.**
|
||||
|
||||
* This project is supported by volunteers, do not expect "customer support"-style interaction.
|
||||
|
||||
* **Be patient.** The development team is small and resource limited. Developers and contributors take from their free time to analyze the problem and fix the issue. :clock3:
|
||||
|
||||
* Harsh words or threats won't help your situation. What's worse, your complain will (very likely) be **ignored.** :fearful:
|
||||
|
||||
# Submitting an issue/bug report
|
||||
|
||||
This section guides you through submitting an issue/bug report for qBittorrent.
|
||||
|
||||
Following these guidelines helps maintainers and the community understand your report, reproduce the behavior, and find related reports.
|
||||
|
||||
Make sure to follow these rules carefully when submitting a bug report. Failure to do so will result in the issue being closed.
|
||||
|
||||
## What is an actual bug report?
|
||||
|
||||
Developers and contributors are not supposed to deal with issues for which little to no investigation to find the actual cause of a purported issue was made by the reporter.
|
||||
|
||||
Positive contributions are those which are reported with efforts to find the actual cause of an issue, or at the very least efforts were made to narrow it as much as possible.
|
||||
|
||||
Requiring people to investigate as much as possible before opening an issue will more than likely avoid burdening the project with invalid issues or issues unrelated to qBittorrent.
|
||||
|
||||
The following are _not_ bug reports. **Check the [wiki][wiki-url], [forum][forum-url] or other places for help and support for issues like these**:
|
||||
|
||||
- Explanation of qBittorrent options (see [wiki][wiki-url]).
|
||||
- Help with WebUI setup.
|
||||
- Help with embedded tracker setup.
|
||||
- Help about BitTorrent in general.
|
||||
- Issues with specific search plugins.
|
||||
- Asking for specific builds of qBittorrent other than the current one. You can install older releases at your own risk or for regression testing purposes. Previous Windows and macOS builds are available [here][builds-url].
|
||||
- If you want older Linux builds, you will have to compile them yourself from the corresponding commits, or ask someone on the [forum][forum-url] to do it for you.
|
||||
- Possibly others. Read on and use common sense.
|
||||
|
||||
The issue tracker is for provable issues only: You will have to make the case that the issue is really with qBittorrent and not something else on your side.
|
||||
|
||||
To make a case means to provide detailed steps so that anybody can reproduce the issue.
|
||||
Be sure to rule out that the issue is not caused by something specific on your side.
|
||||
|
||||
Issue reports for bugs that apparently aren't easily reproducible or that you can't figure out what triggers it even though you tried are OK.
|
||||
|
||||
Any issue opened without effort to provide the required details for developers, contributors or anybody else to reproduce the problem will be closed as invalid.
|
||||
For example:
|
||||
- Crash reports with just a stack trace.
|
||||
- Speculated performance issues that do not come with actual profiling data + analysis supporting the claim.
|
||||
|
||||
## Before submitting a bug report
|
||||
|
||||
- **Do some basic troubleshooting (examples)**:
|
||||
- Restart qBittorrent.
|
||||
- Restart your PC.
|
||||
- Update your OS (e.g. Windows updates).
|
||||
- Update your network card drivers.
|
||||
- Fully reinstall qBittorrent.
|
||||
- etc...
|
||||
- Make sure the problem is not caused by anti-virus or other program messing with your files.
|
||||
- Check if you can reproduce the problem in the latest version of qBittorrent.
|
||||
- **Check [forum][forum-url] and [wiki][wiki-url].** You might be able to find the cause of the problem and fix things yourself.
|
||||
- **Check if the issue exists already in the issue tracker.**
|
||||
- If it does and the issue is still open, add a comment to the existing issue instead of opening a new one.
|
||||
- If you find a Closed issue that seems like it is the same thing that you're experiencing, open a new issue and include a link to the original issue in the body of your new one.
|
||||
- If the issue is with the search functionality:
|
||||
- **Make sure you have [`python`][python-url] installed correctly (remember the search functionality requires a working python installation).**
|
||||
- Make sure it is in fact a problem with the search functionality itself, and not a problem with the plugins. If something does not work properly with the search functionality, the first step is to rule out search plugin-related issues.
|
||||
- For search plugin issues, report on the respective search plugin support page, or at [qbittorrent/search-plugins][search-plugins-url].
|
||||
|
||||
## Steps to ensure a good bug report
|
||||
|
||||
**Follow these guidelines** in order to provide as much useful information as possible right away. Not all of them are applicable to all issues, but you are expected to follow most of these steps (use common sense).
|
||||
Otherwise, we've noticed that a lot of your time (and the developers') gets thrown away on exchanging back and forth to get this information.
|
||||
|
||||
* Use a **clear and descriptive title** for the issue to identify the problem.
|
||||
|
||||
* Post only **one specific issue per submission.**
|
||||
|
||||
* **Fill out the issue template properly.**
|
||||
|
||||
- **Make sure you are using qBittorrent on a supported platform.** Do not submit issues which can only be reproduced on beta/unsupported releases of supported operating systems (e.g. Windows 10 Insider, Ubuntu 12.04 LTS, etc).
|
||||
These are unstable/unsupported platforms, and in all likelihood, whatever the issue is, it is not related to qBittorrent.
|
||||
|
||||
* **Specify the OS you're using, its version and architecture.**
|
||||
* Examples: Windows 8.1 32-bit, Linux Mint 17.1 64-bit, Windows 10 Fall creators Update 64-bit, etc.
|
||||
|
||||
|
||||
* **Report only if you run into the issue with an official stable release, a beta release, or with the most recent upstream changes (in this last case specify the specific commit you are on).** (beta testing is encouraged :smile:). We do not provide support for bugs on unofficial Windows builds.
|
||||
|
||||
* **Specify the version of qBittorrent** you are using, as well as its **architecture** (x86 or x64) and its **libraries' versions** (Help -> About -> Libraries).
|
||||
|
||||
* Specify **how you installed**:
|
||||
- Linux: either from the PPA, your distribution's repositories, or compiled from source, or even possibly third-party repositories.
|
||||
- Windows: either from the installer, or compiled from source, or even possibly third-party repositories.
|
||||
- macOS: either from the installer, or compiled from source, or even possibly third-party repositories.
|
||||
|
||||
|
||||
* **Describe the exact steps which reproduce the problem in as many details as possible.**
|
||||
- For example, start by explaining how you started qBittorrent, e.g. was it via the terminal? Desktop icon? Did you start it as root or normal user?
|
||||
- **When listing steps, don't just say what you did, but explain how you did it.**
|
||||
- For example, if you added a torrent for download, did you do so via a `.torrent` file or via a magnet link? If it was with a torrent file did you do so by dragging the torrent file from the file manager to the transfer list, or did you use the "Add Torrent File" in the Top Bar?
|
||||
- Describe the behavior you observed after following the steps and point out what exactly is the problem with that behavior; this is what we'll be looking for after executing the steps.
|
||||
|
||||
|
||||
* **Explain which behavior you expected to see instead** and why.
|
||||
|
||||
* Use **screenshots/animated GIFs to help describe the issue** whenever appropriate [(How?)][attachments-howto-url].
|
||||
|
||||
* If the problem wasn't triggered by a specific action, describe what you were doing before the problem happened.
|
||||
|
||||
* **If you are reporting that qBittorrent crashes**, include the stack trace in the report; include it in a code block, a file attachment, or put it in a gist and provide link to that gist.
|
||||
|
||||
* **For performance-related issues**, include as much profiling data as you can (resource usage graphs, etc).
|
||||
|
||||
* Paste the **qBittorrent log** (or put the contents of the log in a gist and provide a link to the gist). The log can be viewed in the GUI (View -> Log -> tick all boxes). If you can't do that, the file is at:
|
||||
- Linux: `~/.local/share/data/qBittorrent/logs/qBittorrent.log`
|
||||
- Windows: `%LocalAppData%\qBittorrent\logs`
|
||||
- macOS: `~/Library/Application Support/qBittorrent/qBittorrent.log`
|
||||
|
||||
|
||||
* **Do NOT post comments like "+1" or "me too!"** without providing new relevant info on the issue. Using the built-in reactions is OK though. Remember that you can use the "subscribe" button to receive notifications of that report without having to comment first.
|
||||
|
||||
* If there seems to be an **issue with specific torrent files/magnet links**:
|
||||
- Don't post private `.torrent` files/magnet links, or ones that point to copyrighted content. If you are willing, offer to email a link or the `.torrent` file itself to whoever developer is debugging it and requests it.
|
||||
- Make sure you can't reproduce the problem with another client, to rule out the possibility that the issue is with the `.torrent` file/magnet link itself.
|
||||
|
||||
|
||||
* A screenshot, transcription or file upload of any of **qBittorrent's preferences that differ from the defaults.** Please include everything different from the defaults whether or not it seems relevant to your issue.
|
||||
|
||||
* **Attachment rules**:
|
||||
- Short logs and error messages can be pasted as quotes/code whenever small enough; otherwise make a gist with the contents and post the link to the gist.
|
||||
- Avoid linking/attaching impractical file formats such as PDFs/Word documents with images. If you want to post an image, just post the image.
|
||||
|
||||
### Provide more context by answering these questions (if applicable):
|
||||
|
||||
- Can you **reliably reproduce the issue?** If not, provide details about how often the problem happens and under which conditions it normally happens (e.g. only happens with extremely large torrents/only happens after qBittorrent is open for more than 2 days/etc...)
|
||||
|
||||
- Did the problem start happening recently (e.g. after updating to a new version of qBittorrent) or was this always a problem?
|
||||
|
||||
- If the problem started happening recently, can you reproduce the problem in an older version of qBittorrent?
|
||||
|
||||
- Are you saving files locally (in a disk in your machine), or are you saving them remotely (e.g. network drives)?
|
||||
|
||||
- Are you using qBittorrent with multiple monitors? If so, can you reproduce the problem when you use a single monitor?
|
||||
|
||||
Good read: [How to Report Bugs Effectively][howto-report-bugs-url]
|
||||
|
||||
# Suggesting enhancements/feature requests
|
||||
|
||||
This section guides you through submitting an enhancement suggestion for qBittorrent, including completely new features and minor improvements to existing functionality.
|
||||
|
||||
Following these guidelines helps maintainers and the community understand your suggestion and find related suggestions.
|
||||
|
||||
## Before submitting an enhancement/feature request
|
||||
|
||||
* Check the [wiki][wiki-url] and [forum][forum-url] for tips — you might discover that the enhancement is already available.
|
||||
* Most importantly, check if you're using the latest version of qBittorrent and if you can get the desired behavior by changing qBittorrent's settings.
|
||||
* Check in the [releases][releases-url] page or on the [forum][forum-url], see if there's already a alpha/beta version with that enhancement.
|
||||
* Perform a cursory search to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one.
|
||||
|
||||
## Steps to ensure a good enhancement/feature suggestion
|
||||
|
||||
- Specify which version of qBittorrent you're using.
|
||||
- Specify the name and version of the OS you're using.
|
||||
- Provide a step-by-step description of the suggested enhancement in as many details as possible.
|
||||
- Describe the current behavior and explain which behavior you expected to see instead and why.
|
||||
- Include screenshots and animated GIFs which help you demonstrate the steps or point out the part of qBittorrent which the suggestion is related to.
|
||||
- If this enhancement exists in other BitTorrent clients, list those clients.
|
||||
|
||||
# Opening a pull request
|
||||
|
||||
### Must read
|
||||
* Read our [**coding guidelines**](https://github.com/qbittorrent/qBittorrent/blob/master/CODING_GUIDELINES.md). There are some scripts to help you: [uncrustify script](https://raw.githubusercontent.com/qbittorrent/qBittorrent/master/uncrustify.cfg), [astyle script](https://gist.github.com/Chocobo1/539cee860d1eef0acfa6), [(related thread)](https://github.com/qbittorrent/qBittorrent/issues/2192).
|
||||
* Keep the title **short** and provide a **clear** description about what your pull request does.
|
||||
* Provide **screenshots** for UI related changes.
|
||||
* Keep your git commit history **clean** and **precise**. Commits like `xxx fixup` should not appear.
|
||||
* If your commit fix a reported issue (for example #4134), add the following message to the commit `Closes #4134.`. Example [here](https://github.com/qbittorrent/qBittorrent/commit/a74bac20c4e8de9776bf9bb77fdc7526135d1988).
|
||||
* Read our [**coding guidelines**][coding-guidelines-url]. There are some scripts to help you: [uncrustify script][uncrustify-script-url], [astyle script][astyle-script-url], [(related thread)][coding-guidelines-thread-url].
|
||||
* Keep the title **short** and provide a **clear** description about what your pull request does.
|
||||
* Provide **screenshots** for UI related changes.
|
||||
* Keep your git commit history **clean** and **precise.** Refer to the section about "Git commit messages" in the [**coding guidelines**][coding-guidelines-url].
|
||||
* If your commit fixes a reported issue (for example #4134), add the following message to the commit `Closes #4134.`. Example [here][commit-message-fix-issue-example-url].
|
||||
|
||||
### Good to know
|
||||
* **Search** pull request history! Others might already implemented your idea and is waiting to be merged (or got rejected already). Save your precious time by doing a search first.
|
||||
* When resolving merge conflicts, do `git rebase <target_branch_name>`, don't do `git pull`. Then you can start fixing the conflicts. Here is a good explanation: [link](https://www.atlassian.com/git/tutorials/merging-vs-rebasing).
|
||||
* **Search** pull request history! Others might have already implemented your idea and it is waiting to be merged (or got rejected already). Save your precious time by doing a search first.
|
||||
* When resolving merge conflicts, do `git rebase <target_branch_name>`, don't do `git pull`. Then you can start fixing the conflicts. Here is a good explanation: [link][merging-vs-rebasing-url].
|
||||
|
||||
[astyle-script-url]: https://gist.github.com/Chocobo1/539cee860d1eef0acfa6
|
||||
[attachments-howto-url]: https://help.github.com/articles/file-attachments-on-issues-and-pull-requests
|
||||
[coding-guidelines-url]: https://github.com/qbittorrent/qBittorrent/blob/master/CODING_GUIDELINES.md
|
||||
[coding-guidelines-thread-url]: https://github.com/qbittorrent/qBittorrent/issues/2192
|
||||
[commit-message-fix-issue-example-url]: https://github.com/qbittorrent/qBittorrent/commit/c07cd440cd46345297debb47cb260f8688975f50
|
||||
[forum-url]: http://forum.qbittorrent.org/
|
||||
[howto-report-bugs-url]: https://www.chiark.greenend.org.uk/~sgtatham/bugs.html
|
||||
[merging-vs-rebasing-url]: https://www.atlassian.com/git/tutorials/merging-vs-rebasing
|
||||
[python-url]: https://www.python.org/
|
||||
[releases-url]: https://github.com/qbittorrent/qBittorrent/releases
|
||||
[search-plugins-url]: https://github.com/qbittorrent/search-plugins
|
||||
[uncrustify-script-url]: https://raw.githubusercontent.com/qbittorrent/qBittorrent/master/uncrustify.cfg
|
||||
[wiki-url]: https://github.com/qbittorrent/qBittorrent/wiki
|
||||
[builds-url]: https://sourceforge.net/projects/qbittorrent/files/
|
||||
|
||||
393
Changelog
@@ -1,4 +1,290 @@
|
||||
Unreleased - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.4.0
|
||||
* Mon Nov 19 2018 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v4.1.4
|
||||
- FEATURE: Recognize *.ts files as previewable (silver)
|
||||
- FEATURE: Allow to disable speed graphs (dzmat)
|
||||
- FEATURE: Clear LineEdit on ESC (silverqx)
|
||||
- BUGFIX: Fix divide-by-zero crash (Chocobo1)
|
||||
- BUGFIX: Remove speed limit checkbox in Options dialog (Chocobo1)
|
||||
- BUGFIX: Fix speed graph "high speeds" bug (dzmat)
|
||||
- BUGFIX: Don't update torrent status unnecessarily (glassez)
|
||||
- BUGFIX: Improve force recheck of paused torrent (glassez)
|
||||
- BUGFIX: Restore torrent in two steps (glassez)
|
||||
- BUGFIX: Improve scaling of speed graphs (dzmat)
|
||||
- BUGFIX: Add isNetworkFileSystem() detection on Windows. This allows network mounts to be monitored correctly by polling timer. (Chocobo1)
|
||||
- BUGFIX: Reduce horizontal graphs resolution. Improves perfomance. (dzmat)
|
||||
- BUGFIX: Don't recheck just checked torrent (mj-p, glassez)
|
||||
- BUGFIX: Add SMB2 magic number (Chocobo1)
|
||||
- BUGFIX: Restore startup perfomance to v4.1.2 times. Needs at least libtorrent 1.1.10 (sledgehammer999)
|
||||
- BUGFIX: Make strings actually translatable (sledgehammer999)
|
||||
- WEBUI: Handle downloading .torrent file as success (Tom Piccirello)
|
||||
- WEBUI: Fix Alternative Web UI to be available (glassez)
|
||||
- WEBUI: Consider empty locale setting as not set (glassez)
|
||||
- WEBUI: Add free disk space to WebUI status bar (Thomas Piccirello)
|
||||
- WEBUI: Add WebUI search API controller (Thomas Piccirello)
|
||||
- WEBUI: Fix WebUI Auto TMM context menu bug (Thomas Piccirello)
|
||||
- WEBUI: Use independent translation for WebUI (glassez)
|
||||
- WEBUI: Add categories WebAPI (Thomas Piccirello)
|
||||
- WEBUI: Fix minor JavaScript defects (Thomas Piccirello)
|
||||
- WEBUI: Add locale to js file path (Thomas Piccirello)
|
||||
- WEBUI: Translate WebUI torrents Status column (Thomas Piccirello)
|
||||
- WEBUI: Bump Web API version
|
||||
- RSS: Allow to disable downloading REPACK/PROPER matches (Stephen Dawkins)
|
||||
- RSS: Improve RSS Feed updating (glassez)
|
||||
- SEARCH: Allow resizing search filter in search job (thalieht)
|
||||
- SEARCH: Improve parser for search engine versions.txt (Chocobo1)
|
||||
- SEARCH: Update Python URLs (Chocobo1)
|
||||
- SEARCH: Fix asking to install Python (Chocobo1)
|
||||
- SEARCH: Reformat python code to be compliant with PEP8 (Chocobo1)
|
||||
- OTHER: cmake: restore out-of-source build (Eugene Shalygin)
|
||||
- OTHER: cmake: cmake: use C++14 when available (Eugene Shalygin)
|
||||
|
||||
* Tue Sep 18 2018 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v4.1.3
|
||||
- FEATURE: Preselect name without extension when renaming files (thalieht)
|
||||
- FEATURE: Allow setting seq & first/last from context menu without metadata (thalieht)
|
||||
- BUGFIX: Show "N/A" if there is no scrape (thalieht)
|
||||
- BUGFIX: Save option about tracker favicons under correct key (sledgehammer999)
|
||||
- BUGFIX: When file data are unreachable pause torrent and show "Missing Files" status (temporary fix) (sledgehammer999)
|
||||
- BUGFIX: Don't disable DHT when using force proxy (Thomas Piccirello)
|
||||
- BUGFIX: Correctly save torrent queue position/state/priority changes in fastresume (glassez, thalieht, sledgehammer999)
|
||||
- BUGFIX: Fix icon height/width ratio (Chocobo1)
|
||||
- BUGFIX: Fix values sorted wrong in "Last Activity" column (Chocobo1)
|
||||
- BUGFIX: Replace png icons with svg (Chocobo1)
|
||||
- WEBUI: Allow WebUI sidebar filters to be hidden (Thomas Piccirello)
|
||||
- WEBUI: Increase WebUI Options initial height (Thomas Piccirello)
|
||||
- WEBUI: Adjust WebUI Options form alignment (Thomas Piccirello)
|
||||
- WEBUI: Fix WebUI unreachable issue (Chocobo1)
|
||||
- WEBUI: Require torrent category creation to be explicit (Thomas Piccirello)
|
||||
- WEBUI: Include category save path in web api sync data (Thomas Piccirello)
|
||||
- WEBUI: Add save path and editing to WebUI new category dialog (Thomas Piccirello)
|
||||
- WEBUI: Bump Web API version
|
||||
- SEARCH: Refactor in searchjob to always color visited entries (thalieht)
|
||||
- SEARCH: Set "enter" as shortcut to download the selected torrents in search job (thalieht)
|
||||
- SEARCH: Add regex option in the search filter's context menu (thalieht)
|
||||
- LINUX: Fix GUI scaling issue on Linux (Chocobo1)
|
||||
- LINUX: Fix regression that broke installing desktop file (Eli Schwartz)
|
||||
- OPENBSD: Better filesystem support for filewatcher (Elias M. Mariani)
|
||||
|
||||
* Sun Aug 12 2018 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v4.1.2
|
||||
- FEATURE: New options for "inhibit sleep" (Lukas Greib)
|
||||
- FEATURE: Add option for regexps in the transferlist search filter's context menu (thalieht)
|
||||
- FEATURE: Add async io threads option to AdvancedSettings (tjjh89017)
|
||||
- FEATURE: Allow save resume interval to be disabled (Chocobo1)
|
||||
- FEATURE: Add checkbox for recursive download dialog (Chocobo1)
|
||||
- FEATURE: Add changelog link in program updater (Chocobo1)
|
||||
- BUGFIX: Avoid allocating large memory when loading a .torrent file (Couchy)
|
||||
- BUGFIX: Notify users on 1st time close/minimize to tray (sledgehammer999)
|
||||
- BUGFIX: Fix I/O error after fetching magnet metadata (Chocobo1)
|
||||
- BUGFIX: Never save resume data for already paused torrents (glassez)
|
||||
- BUGFIX: Make ProgramUpdater upgrade to 64-bit qbt when running on 64-bit Windows (Chocobo1)
|
||||
- BUGFIX: Put temporary files in qbt own temp folder (Chocobo1)
|
||||
- BUGFIX: Avoid potentially setting the wrong piece priorities (Chocobo1)
|
||||
- BUGFIX: Various code refactorings/improvements (Chocobo1, thalieht, glassez)
|
||||
- BUGFIX: Add options "Download in sequential order" and "Download first and last pieces first" in AddNewTorrentDialog (Chocobo1)
|
||||
- BUGFIX: Download favicon using appropriate protocol (glassez)
|
||||
- BUGFIX: Apply proxy settings on DownloadManager creation (glassez)
|
||||
- BUGFIX: Improve torrent initialization (glassez)
|
||||
- BUGFIX: Save resume data on torrent change events (glassez)
|
||||
- BUGFIX: Increase default resume data save interval (Chocobo1)
|
||||
- BUGFIX: Work around crash when procesing recursive download. Closes #9086 (Chocobo1)
|
||||
- BUGFIX: Reduce queries to python version (Chocobo1)
|
||||
- BUGFIX: Disable certain mouse wheel events in Options dialog (Chocobo1)
|
||||
- WEBUI: Send all rechecks in one request (Thomas Piccirello)
|
||||
- WEBUI: Add WebUI Force Reannounce option (Thomas Piccirello)
|
||||
- WEBUI: Create non-existing path in setLocationAction() (Goshik)
|
||||
- WEBUI: Add WebUI support for Mac ⌘ (Command) key (Thomas Piccirello)
|
||||
- WEBUI: Show current save path in 'Set location' window (Goshik)
|
||||
- WEBUI: Fix WebUI cache behavior for css files (Chocobo1)
|
||||
- WEBUI: Send Cache-Control header in WebUI responses (Chocobo1)
|
||||
- WEBUI: Add form-action to CSP (Thomas Piccirello)
|
||||
- WEBUI: Add upgrade-insecure-requests to CSP when HTTPS is enabled (Thomas Piccirello)
|
||||
- WEBUI: Reset WebUI ban counter on login success (Chocobo1)
|
||||
- WEBUI: Add logging messages in WebUI login action (Chocobo1)
|
||||
- WEBUI: Add option to control CSRF protection (Chocobo1)
|
||||
- WEBUI: Add option to control WebUI clickjacking protection (Chocobo1)
|
||||
- RSS: Implement "Sequential downloading" feature. Closes #6835 (glassez)
|
||||
- RSS: Don't use RSS feed URLs as base for file names. Closes #8399 (glassez)
|
||||
- SEARCH: Add a name filter for search results (thalieht)
|
||||
- SEARCH: Fix python version detection (Chocobo1)
|
||||
- SEARCH: Clear python cache conditionally (Chocobo1)
|
||||
- SEARCH: Properly normalize version string before parsing it (hannsen)
|
||||
- WINDOWS: Turn on Control Flow Guard for MSVC builds (Chocobo1)
|
||||
- MACOS: Replace deprecated function IOPMAssertionCreate() on macOS (Chocobo1)
|
||||
- OTHER: Fix CMake build with QtSingleApplication. Fixes #9196 (Eugene Shalygin)
|
||||
|
||||
* Sun May 27 2018 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v4.1.1
|
||||
- FEATURE: Add 'Moving' state for torrents being relocated/moved (sledgehammer999)
|
||||
- FEATURE: Show rechecking progress (sledgehammer999)
|
||||
- FEATURE: Add option to remember last used save path (glassez)
|
||||
- FEATURE: Torrent name is also renamed if the content was renamed in the "Add New Torrent" dialog (glassez)
|
||||
- FEATURE: Relax behavior of "Download first and last piece first". It applies to all files and not only to the previewable. (Chocobo1)
|
||||
- BUGFIX: Fix issues with translatable strings (Chocobo1)
|
||||
- BUGFIX: Fix displayed tracker messages (Chocobo1)
|
||||
- BUGFIX: Make settings file recovery more robust (Chocobo1)
|
||||
- BUGFIX: Retry saving settings when operation failed (Chocobo1)
|
||||
- BUGFIX: Log successful torrent move (sledgehammer999)
|
||||
- BUGFIX: Fix deletion of old logs (sledgehammer999)
|
||||
- BUGFIX: Delete non-commited fastresume files (sledgehammer999)
|
||||
- BUGFIX: Don't migrate torrents that have newer fastresumes (sledgehammer999)
|
||||
- BUGFIX: Fix adding multiple torrents at once from WebUI (glassez)
|
||||
- BUGFIX: Improve "Run External Program" behavior. On Windows, a backslash isn't appended to paths from path variables (Chocobo1)
|
||||
- BUGFIX: Suppress multiple I/O errors for the same torrent (sledgehammer999)
|
||||
- BUGFIX: Replace raster qbt logo with vector version (Chocobo1)
|
||||
- WEBUI: Fix wrong API method names (glassez)
|
||||
- WEBUI: Filter torrent info endpoint by hashes (Marcel Petersen)
|
||||
- WEBUI: Fix invalid API calls in WebUI (glassez)
|
||||
- WEBUI: Improve legacy API params handling (glassez)
|
||||
- WEBUI: Fix params handling for some legacy API methods (glassez)
|
||||
- WEBUI: Apply locale changes immediately in WebUI (Chocobo1)
|
||||
- WEBUI: Use 32px icons for favicon (Chocobo1)
|
||||
- WEBUI/RSS: Properly set RSS settings via API (glassez)
|
||||
- RSS: Fix auto-downloading rule when Smart filter with regular Episode filter are used (glassez)
|
||||
- RSS: Make "Ignoring days" to behave like other filters (glassez)
|
||||
- RSS: Place "Use Smart Episode Filter" more correctly (glassez)
|
||||
- RSS: Use RSS feed update time as a fallback (glassez)
|
||||
- COSMETIC: Fix Stats dialog size (sledgehammer999)
|
||||
- MACOS: Fix GUI scaling factor on macOS (Chocobo1)
|
||||
- WINDOWS: Update icons (adem4ik)
|
||||
- LINUX: Fix open destination folder with Nautilus > 3.28 (Evgeny Lensky)
|
||||
- OTHER: Code improvements and refactoring (thalieht, Nick Korotysh, Chocobo1)
|
||||
|
||||
* Sat May 05 2018 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v4.1.0
|
||||
- FEATURE: Add "Coalesce reads & writes" checkbox in advanced options (Chocobo1)
|
||||
- FEATURE: Smart Filter for RSS (Stephen Dawkins)
|
||||
- FEATURE: Possibility to configure at which speed a torrent is considered slow (thalieht)
|
||||
- FEATURE: When creating a torrent you can choose to preserve the file order (toster, Chocobo1)
|
||||
- FEATURE: A new, redesigned and refactored WebAPI (glassez)
|
||||
- BUGFIX: Redefine CacheStatus.readRatio field. (Chocobo1)
|
||||
- BUGFIX: Clarify some terms in stats dialog (Chocobo1)
|
||||
- BUGFIX: Fix possible crash when using both share limits (thalieht)
|
||||
- BUGFIX: Disable options when `Disable connections not supported by proxies` is enabled (Thomas Piccirello)
|
||||
- BUGFIX: Add link to an explanation of `Disable connections not supported by proxies` (Thomas Piccirello)
|
||||
- BUGFIX: Fix typo in a log message (Andrei Stepanov)
|
||||
- BUGFIX: Fix loading very large torrents. Closes #8449. (Chocobo1)
|
||||
- BUGFIX: Fix reverting backslashes to slashes in run external program. Closes #7800 (Chocobo1)
|
||||
- BUGFIX: Use https for documentation links (Chocobo1)
|
||||
- BUGFIX: Use original scheme when downloading favicons (Chocobo1)
|
||||
- BUGFIX: Parse URL query string at application level (glassez)
|
||||
- BUGFIX: Properly reply to announce request (embedded tracker) (glassez)
|
||||
- BUGFIX: Add `Tags` parameter to "Run External Program" (Chocobo1)
|
||||
- BUGFIX: Fix various typos (Chocobo1)
|
||||
- BUGFIX: Refactor filesystem watcher. Delay before processing new files. (Chocobo1)
|
||||
- BUGFIX: Don't strip empty arguments passed to external program. Closes #8454. (Chocobo1)
|
||||
- BUGFIX: Stop creating Download folder on start (Chocobo1)
|
||||
- BUGFIX: Avoid data corruption when rechecking paused torrents (sledgehammer999)
|
||||
- BUGFIX: Fix crashes due to invalid iterator use (Luís Pereira)
|
||||
- BUGFIX: Fix renaming completed files (Chocobo1)
|
||||
- BUGFIX: Fix path separator in log messages (Chocobo1)
|
||||
- WEBUI: Switch built-in Web UI html to HTML5 (glassez)
|
||||
- WEBUI: WebUI Save user's resized window sizes (Thomas Piccirello)
|
||||
- WEBUI: Make download + upload windows resizable (Thomas Piccirello)
|
||||
- WEBUI: Add option to show/hide webui status bar (Thomas Piccirello)
|
||||
- WEBUI: Add "Use proxy only for torrents" option to webui (Thomas Piccirello)
|
||||
- WEBUI: Various fixes in the html code (Thomas Piccirello)
|
||||
- WEBUI: Don't unselect selected torrents after a few seconds (Thomas Piccirello)
|
||||
- WEBUI: Enable Http/1.1 persistence connection (Chocobo1)
|
||||
- WEBUI: Format Read cache hits as percentage (Thomas Piccirello)
|
||||
- WEBUI: Re-order and rename stats (Thomas Piccirello)
|
||||
- WEBUI: Right align stat values (Thomas Piccirello)
|
||||
- WEBUI: Enable Statistics window to be scrolled and resized (Tom Piccirello)
|
||||
- WEBUI: Save WebUI Statistics window size (Thomas Piccirello)
|
||||
- WEBUI: Make WebUI iframe windows scrollable on iOS (Thomas Piccirello)
|
||||
- WEBUI: Remove unused CSS from WebUI login page (Thomas Piccirello)
|
||||
- WEBUI: Consolidate CSS into style.css (Thomas Piccirello)
|
||||
- WEBUI: Resolve JavaScript errors (Thomas Piccirello)
|
||||
- WEBUI: Fix spacing in login form(Thomas Piccirello)
|
||||
- WEBUI: Update WebUI to be more compliant with HTML5 standard (Chocobo1)
|
||||
- WEBUI: Update clipboard.js to v2.0.0 (Chocobo1)
|
||||
- WEBUI: Remove unused JavaScript library (Chocobo1)
|
||||
- WEBUI: Fix setting preferences via WebAPI (glassez)
|
||||
- WEBUI: Rename property to match its definition (Thomas Piccirello)
|
||||
- WEBUI: Add Limit Share Ratio context menu option (Thomas Piccirello)
|
||||
- RSS: Disable Auto TMM when RSS rule has save path (glassez)
|
||||
- RSS: Process loaded RSS articles in case of error (glassez)
|
||||
- RSS: Resolve (X)HTML entities in RSS content (glassez)
|
||||
- SEARCH: Improve Search handling (glassez)
|
||||
- SEARCH: Calculate supported categories based on selected plugin (Thomas Piccirello)
|
||||
- SEARCH: Fix memory leak (Chocobo1)
|
||||
- COSMETIC: Use spinbox suffix to display rate/time units (thalieht)
|
||||
- COSMETIC: Avoid showing an empty row in AdvancedSettings (Chocobo1)
|
||||
- OTHER: Various code optimizations and fixes (Luís Pereira, Chocobo1)
|
||||
- OTHER: Fix build when using Clang under CMake (Luís Pereira)
|
||||
- OTHER: Allow to disable Stacktrace support (Nick Korotysh)
|
||||
- OTHER: Use RNG provided by OS (Chocobo1)
|
||||
|
||||
* Fri Feb 16 2018 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v4.0.4
|
||||
- FEATURE: Add source field in Torrent creator. Closes #7965. (Chocobo1)
|
||||
- FEATURE: Torrent creator: raise maximum piece size to 32 MiB (Chocobo1)
|
||||
- FEATURE: Add a force reannounce option in the transfer list context menu. Closes #6448. (Jesse Bryan)
|
||||
- BUGFIX: Fix sorting of country flags column in Peers tab. (sledgehammer999)
|
||||
- BUGFIX: Fix natural sorting when the common part of 2 strings ends partially in a number which continues in the uncommon part. Closes #8080 #6732. (sledgehammer999)
|
||||
- BUGFIX: Fix application of speed limits on LAN and μTP connections. Closes #7745. (sledgehammer999)
|
||||
- BUGFIX: Make peer information flags in peerlist more readable. (thalieht)
|
||||
- BUGFIX: Fix gui issues on high DPI monitor. (Chocobo1)
|
||||
- BUGFIX: Fix dialog and column size on high DPI monitors. (Chocobo1)
|
||||
- BUGFIX: Fix constant status of '[F] Downloading'. Closes #7628. (sledgehammer999)
|
||||
- BUGFIX: Fix translation context. Closes #8211. (sledgehammer999)
|
||||
- BUGFIX: Separate subnet whitelist options into two lines. (Thomas Piccirello)
|
||||
- BUGFIX: Don't set application name twice. (Luís Pereira)
|
||||
- BUGFIX: Set default file log size to 65 KiB and delete backup logs older than 1 month. (sledgehammer999)
|
||||
- WEBUI: Only prepend scheme when it is not present. Closes #8057. (Chocobo1)
|
||||
- WEBUI: Add "Remaining" and "Availability" columns to webui Content tab. (Thomas Piccirello)
|
||||
- WEBUI: Make value formatting consistent with GUI (Thomas Piccirello)
|
||||
- WEBUI: Reposition Total Size column to match gui (Thomas Piccirello)
|
||||
- WEBUI: Add Tags and Time Active columns (Thomas Piccirello)
|
||||
- WEBUI: Use https for www.qbittorrent.org (Thomas Piccirello)
|
||||
- WEBUI: Match webui statuses to gui, closes #7516 (Thomas Piccirello)
|
||||
- WEBUI: Right-align stat values (Thomas Piccirello)
|
||||
- WEBUI: Add missing units. (Thomas Piccirello)
|
||||
- RSS: Fix crash when deleting rule because it tries to update. Closes #8094 (glassez)
|
||||
- RSS: Don't process new/updated RSS rules when disabled (glassez)
|
||||
- RSS: Remove legacy and corrupted RSS settings (glassez)
|
||||
- SEARCH: Search only when category is supported by plugin. Closes #8053. (jan.karberg)
|
||||
- SEARCH: Only add search separators as needed. (Thomas Piccirello)
|
||||
- COSMETIC: Tweak spacing in torrent properties widget and speed widget. (Chocobo1)
|
||||
- WINDOWS: Use standard folder icon for open file behavior on Windows. Closes #7880. (Chocobo1)
|
||||
- WINDOWS: Revert "Run external program" function. Now you will not be able to directly run batch scripts. (Chocobo1)
|
||||
- MACOS: Fix torrent file selection in Finder on mac (vit9696)
|
||||
- MACOS: Fix Finder reveal in preview and torrent contents (vit9696)
|
||||
- MACOS: Fix cmd+w not closing the main window on macOS (vit9696)
|
||||
- OTHER: Fix splitting of compiler flags in configure. Autoconf removes a set of [] during script translation, resulting in a wrong sed command. (sledgehammer999)
|
||||
- OTHER: configure: Parse all compiler related flags together. (sledgehammer999)
|
||||
- OTHER: Update copyright year. (sledgehammer999)
|
||||
|
||||
* Sun Dec 17 2017 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v4.0.3
|
||||
- BUGFIX: Add height padding to the transfer list icons. Closes #7951. (sledgehammer999)
|
||||
- BUGFIX: Allow to drag-n-drop URLs into mainwindow to initiate download. (Chocobo1)
|
||||
- BUGFIX: Fix crash when fitlering search results. Stable sorting is removed. Closes #7952.(Chocobo1)
|
||||
- WEBUI: Fix missing qbt logo on login page in webUI. Closes #7953. (Chocobo1)
|
||||
- WEBUI: Add check to avoid type error after logout. (Chocobo1)
|
||||
- WEBUI: Use POST for logout command. This is to avoid browser being smart to prefetch the link then logging out the user. (Chocobo1)
|
||||
- WEBUI: Fix WebUI is not reachable via IPv6. (glassez)
|
||||
- WINDOWS: Disable the "?" help button in all dialogs on Windows. Closes #7365. Requires Qt 5.10. (Chocobo1)
|
||||
|
||||
* Fri Dec 01 2017 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v4.0.2
|
||||
- BUGFIX: Fix crash on some systems when creating address object for 255.255.255.255. Closes #7735. (sledgehammer999)
|
||||
- PERFORMANCE: Change MixedModeAlgorithm default to TCP. This was the v3_3_x default and should sustain higher speeds. Closes #7779. (Chocobo1)
|
||||
- PERFORMANCE: Stop logging IP filter parsing errors after a while, otherwise the GUI freezes or qBittorrent doesn't start. (sledgehammer999)
|
||||
- GUI: Implement stable sort. Rows in transfer list shouldn't flicker anymore. (Chocobo1)
|
||||
- WEBUI: Fix build when webui is disabled. (Heiko Becker)
|
||||
- RSS: Fix build because of missing header. Closes #7805. (thoradia)
|
||||
- RSS: Fix RSS parser. (glassez)
|
||||
- RSS: Implement Import/Export RSS rules in legacy(aka v3_3_x) format. (glassez)
|
||||
- RSS: Implement Import/Export RSS rules in JSON format. (glassez)
|
||||
- WINDOWS: Fixed blurry text under Windows by setting DPI awareness to default. (TheNicker)
|
||||
- LINUX: Fix i386 build. (Evgeny Lensky)
|
||||
|
||||
* Wed Nov 22 2017 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v4.0.1
|
||||
- BUGFIX: Fix crash on opening torrent/magnet (uninitialized pointer). Closes #7739 #7723. (sledgehammer999)
|
||||
- BUGFIX: Enable preferences Apply button when ip banlist is modified (Thomas Piccirello)
|
||||
- BUGFIX: Allow drag-n-drop magnet links to mainwindow. Closes #7742. (Chocobo1)
|
||||
- BUGFIX: Fix crash when aborting a torrent creation process. Closes #7783. (Chocobo1)
|
||||
- BUGFIX: Correctly check if torrent passed during application start already exists. (sledgehammer999)
|
||||
- WEBUI: Add ip subnet whitelist for bypassing webui auth (Thomas Piccirello)
|
||||
- WEBUI: Fix logo missing in login page (Chocobo1)
|
||||
- COSMETIC: Fix english typo. (sledgehammer999)
|
||||
- OTHER: cmake: qtsingleapplication should always be built statically (luigino)
|
||||
|
||||
* Mon Nov 20 2017 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v4.0.0
|
||||
- FEATURE: Change qbittorrent logo. Issue #6467. (HVS, Atif Afzal, sledgehammer999)
|
||||
- FEATURE: New icon theme with SVG source, so we can scale it appropriately in the future. (Bert Verhelst)
|
||||
- FEATURE: Drop Qt 4 support. Raise minimum Qt version to 5.5.1 (evsh)
|
||||
- FEATURE: UI for managing locally banned IP list (dzmat)
|
||||
@@ -18,20 +304,85 @@ Unreleased - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.4.0
|
||||
- FEATURE: Fetch Favicons via google as a final fallback (KingLucius)
|
||||
- FEATURE: Add a Tags (multi-label) feature to the GUI. Closes #13. (tgregerson)
|
||||
- FEATURE: Use the system icons for each file type in the Content tab (evsh)
|
||||
- FEATURE: Use SVG files for monochrome tray icons. Closes #6085. (evsh)
|
||||
- FEATURE: Prefill torrent name when creating a new torrent. Closes #7229. (Chocobo1)
|
||||
- FEATURE: Expose more libtorrent options in advanced settings (Chocobo1)
|
||||
- FEATURE: Add comboBox for selecting BitTorrent protocol. Closes #6316. (Chocobo1)
|
||||
- FEATURE: Allow SMTP sender to be set. Closes #7575. (Chocobo1)
|
||||
- FEATURE: Allow to specify if announcing to all tiers is desired. (sledgehammer999)
|
||||
- FEATURE: Configurable number of history of paths in Add New Torrent dialog. (evsh)
|
||||
- BUGFIX: Adjust icons names to better fit FDO scheme (evsh)
|
||||
- BUGFIX: Optimized IP filter parsing, making blazingly fast (sledgehammer999, evsh)
|
||||
- BUGFIX: Fix dialogs didn't position on the correct screen which qBittorrent window is on. Closes #1690, #2474, #3538. (Chocobo1)
|
||||
- BUGFIX: Refactor and improve StatusBar (glassez)
|
||||
- BUGFIX: Set expiration date for newly added cookie to +2 years from now, instead of +99 years. (Chocobo1)
|
||||
- BUGFIX: Don't create subfolder inside temp folder (glassez)
|
||||
- BUGFIX: Don't replace existing files when relocating torrent (glassez)
|
||||
- BUGFIX: Fix explicit Torrent Management Mode in Add New Torrent dialog. Closes #5602. (sledgehammer999)
|
||||
- BUGFIX: Fix calculation of 'Average time in queue' stat under libtorrent 1.1.x (sledgehammer999)
|
||||
- BUGFIX: Don't disable bandwidth scheduler when manually switching speed limits. Closes #7306. (glassez)
|
||||
- BUGFIX: Fix dereferencing freed pointer. Closes #7420. (Chocobo1)
|
||||
- BUGFIX: Change the default cache size to 64MiB. (Chocobo1)
|
||||
- BUGFIX: The previous "Disk write cache size" is not accurate since it is also being used for read cache, so rename it to "Disk cache". (Chocobo1)
|
||||
- BUGFIX: Replace dialog ok-cancel buttons with QDialogButtonBox, which follows the platform specific button order. (Chocobo1)
|
||||
- BUGFIX: Better reporting of success/failure of torrent and file deletion. (sledgehammer999)
|
||||
- BUGFIX: Fix last activity calculation. Closes #7461. (Chocobo1)
|
||||
- BUGFIX: Save state of options windows on cancel too. (silverqx)
|
||||
- BUGFIX: Persist size and treeview header state in preview dialog. (silverqx)
|
||||
- BUGFIX: Show torrent name in "add new torrent" dialog on merging trackers (Chocobo1)
|
||||
- BUGFIX: Properly pre-select the selected torrent's current ratio limiting options in UpDownRatioDlg dialogs. Fixes #7352 (thalieht)
|
||||
- BUGFIX: Optimize code for SpeedWidget. (dzmat)
|
||||
- BUGFIX: Disable processing events when adding torrents(prevents crashes). Closes #7436. (Chocobo1)
|
||||
- BUGFIX: Open links in browser. Closes #7651. (Chocobo1)
|
||||
- BUGFIX: Change default settings for tracker/tier announces to mimic μTorrent behavior. (sledgehammer999)
|
||||
- BUGFIX: Explicitly set UPnP state on start-up. Closes #7338. (Chocobo1)
|
||||
- BUGFIX: Include/print caught signal in stackdump (Chocobo1)
|
||||
- COSMETIC: Trackerlist: Set text alignment of columns with numbers to the right (thalieht)
|
||||
- COSMETIC: Enable alternatingRowColors for "Manage Cookie" dialog (Chocobo1)
|
||||
- COSMETIC: Remove indentation for category/tag filter widgets in all platforms (thalieht)
|
||||
- COSMETIC: Add space between widgets in left side panel. Closes #7224. (Chocobo1, glassez)
|
||||
- COSMETIC: Unify preference window borders across the tabs (vit9696)
|
||||
- COSMETIC: Center Options dialog when showed. (silverqx)
|
||||
- COSMETIC: Show delete accelerator key in menu. closes #7508 (Nick Korotysh)
|
||||
- COSMETIC: Set QTextOption::NoWrap property in "Download from URLs" dialog (Chocobo1)
|
||||
- COSMETIC: Use SVG icons for the country flags. Closes #6223. (sledgehammer999)
|
||||
- WEBUI: Allow to load/use ECDSA certificate in webUI. (Chocobo1)
|
||||
- WEBUI: Add copy options to webui context menu (addresses #6815) (#7036) (Tom Piccirello)
|
||||
- WEBUI: Set torrent location from webui context menu (addresses #6815) (#7062) (Tom Piccirello)
|
||||
- WEBUI: Add option to rename torrent from WebUI (Thomas Piccirello)
|
||||
- WEBUI: Add auto torrent management to webui context menu (addresses #6815) (Thomas Piccirello)
|
||||
- WEBUI: Option for "Create subfolder" when adding new torrent. (thalieht)
|
||||
- WEBUI: Fix addPaused wrong default behavior. (Chocobo1)
|
||||
- WEBUI: Reposition "Priority" menu option in WebUI to match gui. Closes #7072. (Thomas Piccirello)
|
||||
- WEBUI: Report TCPServer errorString() if webui fails to listen to port. (Matthew Fioravante)
|
||||
- WEBUI: Exit gracefully when failed to initialize web server with qbt-nox (Chocobo1)
|
||||
- WEBUI: Add file-to-piece-index mappings in /query/propertiesFiles command (Chocobo1)
|
||||
- WEBUI: Add optional parameters for /command/download & /command/upload (Chocobo1)
|
||||
- WEBUI: Print error messages upon receiving invalid header fields. (Chocobo1)
|
||||
- WEBUI: Add WebUi\Address config option. (Matthew Fioravante)
|
||||
- WEBUI: Reinitialize webUI server when "IP address" setting changed. An app restart won't be necessary from now on. (Chocobo1)
|
||||
- WEBUI: Improve log and error messages (Chocobo1)
|
||||
- SEARCH: Use explicit class for search plugin versions (evsh)
|
||||
- SEARCH: Remove all search plugins from repo. There is another repo named 'search-plugins'. (sledgehammer999)
|
||||
- SEARCH: Update the backend when a new plugin favicon is downloaded. (sledgehammer999)
|
||||
- SEARCH: Allow search plugins sorting. Closes #7526. (Nick Korotysh)
|
||||
- RSS: Redesigned RSS subsystem (glassez)
|
||||
- RSS: Do not use hardcoded colors in RSS feed view (evsh)
|
||||
- RSS: Improve RSS events logging (glassez)
|
||||
- WINDOWS: Use dpiawareness=1 on Windows. Closes #5393. (sledgehammer999)
|
||||
- WINDOWS: Reformat Windows build configuration files. (glassez)
|
||||
- LINUX: Allow custom tray icons when system icon theme is used. Closes #7403. (evsh)
|
||||
- MACOS: Various macOS UI improvements (vit9696)
|
||||
- MACOS: Fix main menu item location on macOS (vit9696)
|
||||
- MACOS: Fix macOS window restoration after using hide icon (vit9696)
|
||||
- MACOS: Fix notification display on macOS (vit9696)
|
||||
- OTHER: Use new classes/methods from libtorrent and stop using deprecate ones. (glassez)
|
||||
- OTHER: Various string fixes (Allan Nordhøy, sledgehammer999)
|
||||
- OTHER: cmake: do not use Qt5Widgets when locating QtSingleApplication. Closes #7551. (evsh)
|
||||
- OTHER: Update BOOST m4 macros and simplify AX_BOOST_BASE usage (Chocobo1)
|
||||
- OTHER: Drop OS/2 support. (sledgehammer999)
|
||||
- OTHER: Optimize file size of PNG and SVG files. (sledgehammer999)
|
||||
- OTHER: Add new translators in the About page.
|
||||
|
||||
* Thu Jun 01 2017 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.3.13
|
||||
- BUGFIX: Fixed UI glitch about torrent numbers in the sidepanel. Fixes #6454. (evsh)
|
||||
@@ -114,7 +465,7 @@ Unreleased - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.4.0
|
||||
- FEATURE: Use Ctrl+F to search torrents. Closes #5797. (Tim Delaney)
|
||||
- FEATURE: Transferlist: add hotkeys for double click and recheck selected torrents (thalieht)
|
||||
- FEATURE: Add hotkey for execution log tab, Trackerlist, Peerlist etc (thalieht)
|
||||
- FEATURE: Seperate seeds from peers for DHT, PeX and LSD (thalieht)
|
||||
- FEATURE: Separate seeds from peers for DHT, PeX and LSD (thalieht)
|
||||
- BUGFIX: Do not remove added files unconditionally. Closes #6248 (Eugene Shalygin)
|
||||
- BUGFIX: Ignore mouse wheel events in Advanced Settings. Closes #866. (Chocobo1)
|
||||
- BUGFIX: Add queue repair code. It should fix missing torrents after restarting. (Eugene Shalygin, nxd4)
|
||||
@@ -126,7 +477,7 @@ Unreleased - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.4.0
|
||||
- BUGFIX: TransferListWidget: keep columns width even if they are hidden on qBittorrent startup (unless something goes wrong) (thalieht)
|
||||
- BUGFIX: fix index overflow for torrents with invalid meta data or empty progress (Falco)
|
||||
- BUGFIX: Immediately update torrent_status after manipulating super seeding mode. Partially fixes #6072. (sledgehammer999)
|
||||
- BUGFIX: Use case-insensitive comparsion for torrent content window. Closes #6327. (Chocobo1)
|
||||
- BUGFIX: Use case-insensitive comparison for torrent content window. Closes #6327. (Chocobo1)
|
||||
- BUGFIX: Fixed sort order for datetime columns with empty values (closes #2988) (Vladimir Sinenko)
|
||||
- BUGFIX: Disable proxy in WebUI HTTP server. Closes #6349. (Eugene Shalygin)
|
||||
- COSMETIC: Use a disabled progressbar's palette for unselected files. (sledgehammer999)
|
||||
@@ -254,12 +605,12 @@ Unreleased - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.4.0
|
||||
- FEATURE: Add option to automatically remove .torrent files upon adding (Eugene Shalygin)
|
||||
- FEATURE: Add option to bind directly to an IP instead of using a network Interface (Sjoerd van der Berg, sledgehammer999)
|
||||
- FEATURE: Detailed tooltips on the progress and availability bars in the General button of each torrent. (Eugene Shalygin)
|
||||
- FEATURE: Let user able to specifiy a filter when choosing an IP filter file (Chocobo1)
|
||||
- FEATURE: Let user able to specify a filter when choosing an IP filter file (Chocobo1)
|
||||
- FEATURE: Improve usability of "Run External Program". Users can write (platform dependent) shell scripts now. (Chocobo1)
|
||||
- PERFORMANCE: Optimize drawing in speed graph (Anton Lashkov, Chocobo1)
|
||||
- BUGFIX: Fix memory leak. (sledgehammer999)
|
||||
- BUGFIX: Fix resizing bug in "add torrent dialog". Closes #5036. (Chocobo1)
|
||||
- BUGFIX: Fix qBittorrent doesn't exit immediately when "all donwloads are done -> exit" option enabled. (glassez, Chocobo1)
|
||||
- BUGFIX: Fix qBittorrent doesn't exit immediately when "all downloads are done -> exit" option enabled. (glassez, Chocobo1)
|
||||
- BUGFIX: Display the filepath when a torrent fails to load. Closes #100 and #805. (sledgehammer999)
|
||||
- BUGFIX: Fix Add tracker dialog empty trackers (ngosang)
|
||||
- BUGFIX: Fix Add tracker dialog URL download (ngosang)
|
||||
@@ -312,7 +663,7 @@ Unreleased - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.4.0
|
||||
- OTHER: Enable access to shutdown functions when configured with `--disable-gui` option (Chocobo1)
|
||||
- OTHER: Delete Import Torrent Dialog. Just use the "add new torrent" dialog. (glassez)
|
||||
- OTHER: Optimize code for natural sorting (Chocobo1)
|
||||
- OTHER: Use new alert dispathing API for libtorrent 1.1.x (glassez)
|
||||
- OTHER: Use new alert dispatching API for libtorrent 1.1.x (glassez)
|
||||
- OTHER: Fix gcc 6 compilation with qmake. See #5237. (sledgehammer999)
|
||||
|
||||
* Tue Mar 29 2016 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.3.4
|
||||
@@ -636,7 +987,7 @@ Unreleased - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.4.0
|
||||
- SEARCH: Fix thepiratebay. Closes #3012 (ngosang)
|
||||
- SEARCH: Improve torrentz engine to return more results (ngosang)
|
||||
- SEARCH: Change width of columns in search tab. Closes #764 (ngosang)
|
||||
- SEARCH: Make strings translatable in seach engine (ngosang)
|
||||
- SEARCH: Make strings translatable in search engine (ngosang)
|
||||
- SEARCH: Aborting search engine process during closure. Close #2671 (DoumanAsh)
|
||||
- SEARCH: Perform searches in parallel (DoumanAsh)
|
||||
- SEARCH: Add Demonoid search engine (ngosang)
|
||||
@@ -803,7 +1154,7 @@ Unreleased - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.4.0
|
||||
- WEBUI: Removed broken 'Documentation'. Improves fix for #1343 (Benjamin Hutchins)
|
||||
- WEBUI: Removed essentially useless 'Visit website' iframe and changed it to a regular link. Improves fix for #1343 (Benjamin Hutchins)
|
||||
- BUGFIX: Fix RSS feed icon. The tmp file gets deleted in the feed destructor. Closes #1639 (sledgehammer999)
|
||||
- BUGFIX: fix issue #1674: AddNewTorrentDialog is shown again and again even if checkbox "dont ask me again" is set (Ivan Sorokin)
|
||||
- BUGFIX: fix issue #1674: AddNewTorrentDialog is shown again and again even if checkbox "don't ask me again" is set (Ivan Sorokin)
|
||||
- BUGFIX: Don't show availability bar for magnet links (Ivan Sorokin)
|
||||
- BUGFIX: Fix crash when the selected torrent disappears from the transfer list. Closes #1661 (sledgehammer999)
|
||||
- BUGFIX: Fix tracker announcing problem(hit-and-run) when many torrents are being active. Closes #1571 (sledgehammer999)
|
||||
@@ -937,7 +1288,7 @@ Unreleased - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.4.0
|
||||
- FEATURE: Show external IP in the log. Closes #968. (sledgehammer999)
|
||||
- FEATURE: Enable gzip compression in the webui. It should be faster now. (sledgehammer999)
|
||||
- FEATURE: Torrents show more states(queued for checking, downloading metadata, allocating, checking resume). (sledgehammer999)
|
||||
- FEATURE: Reenable "force reannounce" to all trackers. (sledgehammer999)
|
||||
- FEATURE: Re-enable "force reannounce" to all trackers. (sledgehammer999)
|
||||
- FEATURE: Allow to clear the UI lock password. Closes #973. (sledgehammer999)
|
||||
- FEATURE: New translations: English(Australia) and English(United Kingdom)
|
||||
- BUGFIX: Expose all available translation in the WebUI. Closes #976. (sledgehammer999)
|
||||
@@ -986,8 +1337,8 @@ Unreleased - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.4.0
|
||||
- OTHER: Make peer tab sortable by ip too (Gelmir)
|
||||
- OTHER: Translations moved to Transifex(https://www.transifex.com/projects/p/qbittorrent/)
|
||||
- OTHER: New Translation - Vietnamese (Anh Phan)
|
||||
- PERFORMANCE: Impove drawing speed of tranferlist when there are many torrents(>100)
|
||||
- PERFORMANCE: Impove drawing speed of peers list when there are many peers
|
||||
- PERFORMANCE: Improve drawing speed of tranferlist when there are many torrents(>100)
|
||||
- PERFORMANCE: Improve drawing speed of peers list when there are many peers
|
||||
|
||||
* Mon Jul 29 2013 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.0.11
|
||||
- FEATURE: Allow more fine tuning of upload slots. It should improve speed (sledgehammer999)
|
||||
@@ -1027,8 +1378,8 @@ Unreleased - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.4.0
|
||||
- LIBTORRENT: SOCKS5 fixes (0.16.10)
|
||||
- LIBTORRENT: Fix hanging issue on Windows when closing files (0.16.10)
|
||||
- LIBTORRENT: Cache can now be returned to the OS (0.16.10)
|
||||
- PERFORMANCE: Impove drawing speed of tranferlist when there are many torrents(>100) (sledgehammer999)
|
||||
- PERFORMANCE: Impove drawing speed of peers list when there are many peers (sledgehammer999)
|
||||
- PERFORMANCE: Improve drawing speed of tranferlist when there are many torrents(>100) (sledgehammer999)
|
||||
- PERFORMANCE: Improve drawing speed of peers list when there are many peers (sledgehammer999)
|
||||
|
||||
* Sat Mar 16 2013 - Christophe Dumez <chris@qbittorrent.org> - v3.0.9
|
||||
- BUGFIX: Raise qBittorrent windows when another instance is launched
|
||||
@@ -1052,7 +1403,7 @@ Unreleased - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.4.0
|
||||
- BUGFIX: Fix "Couldn't set environment variable..." message on start up (closes #245)
|
||||
- BUGFIX: Use right path separator in torrent addition dialog on Windows
|
||||
- BUGFIX: Fix "Set as default save path" setting (closes #254)
|
||||
- BUGFIX: Reenable disk cache on Windows since the memory issue seems to be gone
|
||||
- BUGFIX: Re-enable disk cache on Windows since the memory issue seems to be gone
|
||||
- BUGFIX: Fixed several search engine plugins and removed the dead ones
|
||||
- BUGFIX: Use https links in search plugins when possible
|
||||
- BUGFIX: Bump Mootools to v1.4.5 (Web UI)
|
||||
@@ -1188,7 +1539,7 @@ Unreleased - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.4.0
|
||||
- I18N: Add Georgian translation
|
||||
|
||||
* Sat Oct 29 2011 - Christophe Dumez <chris@qbittorrent.org> - v2.9.2
|
||||
- BUGFIX: Fix mimimum dimensions for torrent addition dialog
|
||||
- BUGFIX: Fix minimum dimensions for torrent addition dialog
|
||||
- BUGFIX: Remove dependency on boost-datetime
|
||||
- BUGFIX: Remove dependency on boost-filesystem (libtorrent v0.16.x)
|
||||
|
||||
@@ -1399,7 +1750,7 @@ Unreleased - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.4.0
|
||||
- BUGFIX: Update RSS feed as soon as feed downloader is enabled
|
||||
- BUGFIX: RSS Feed downloader ignores articles above maximum number of articles
|
||||
- BUGFIX: Fix possible bug when deleting a RSS folder
|
||||
- BUGFIX: Remove persistant data when a RSS feed is deleted
|
||||
- BUGFIX: Remove persistent data when a RSS feed is deleted
|
||||
- BUGFIX: RSS filters are now alphabetically sorted
|
||||
- BUGFIX: Fix crash when renaming currently displayed RSS filter
|
||||
- BUGFIX: Remove overwriting confirmation when exporting RSS filters since Qt takes care of it
|
||||
@@ -1435,7 +1786,7 @@ Unreleased - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.4.0
|
||||
- BUGFIX: Use the save path set in program preferences as a default in torrent addition dialog
|
||||
|
||||
* Fri Dec 18 2009 - Christophe Dumez <chris@qbittorrent.org> - v2.0.2
|
||||
- BUGFIX: Fix .qbittorrent folder not being created (critical bug introduced in v2.0.1 that makes qBittorrent unusuable for new users)
|
||||
- BUGFIX: Fix .qbittorrent folder not being created (critical bug introduced in v2.0.1 that makes qBittorrent unusable for new users)
|
||||
- BUGFIX: Fix RSS Feed downloader for some feeds
|
||||
- BUGFIX: Do not use home folder as a fallback when the save path is not accessible
|
||||
- BUGFIX: Fix Mininova, ThePirateBay search engine plugins
|
||||
@@ -1525,7 +1876,7 @@ Unreleased - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.4.0
|
||||
- BUGFIX: Fix trackers addition to torrents (bug introduced in v1.5.4)
|
||||
- BUGFIX: Suppress compilation warning regarding sortNewsList() not being used
|
||||
- BUGFIX: Make sure scan folder is different than qBittorrent backup directory to avoid torrents deletion
|
||||
- BUGFIX: Added safety mecanism which adds the torrents back to the list in case qbittorrent-resume.conf gets deleted or corrupted.
|
||||
- BUGFIX: Added safety mechanism which adds the torrents back to the list in case qbittorrent-resume.conf gets deleted or corrupted.
|
||||
|
||||
* Sun Oct 25 2009 - Christophe Dumez <chris@qbittorrent.org> - v1.5.4
|
||||
- BUGFIX: Updated man page
|
||||
@@ -1592,7 +1943,7 @@ Unreleased - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.4.0
|
||||
- FEATURE: Added right click menu in search engine to clear completion history
|
||||
- FEATURE: Allow to set a different port for DHT (UDP) than the one used for Bittorrent
|
||||
- FEATURE: Updated spoofing code to avoid trackers ban
|
||||
- BUGFIX: Provide more helpful explanation when an I/O error occured
|
||||
- BUGFIX: Provide more helpful explanation when an I/O error occurred
|
||||
- BUGFIX: Stop enforcing UTF-8 and use system locale instead
|
||||
- COSMETIC: Redesigned program preferences
|
||||
- COSMETIC: Updated icons set
|
||||
@@ -1610,7 +1961,7 @@ Unreleased - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.4.0
|
||||
- BUGFIX: Suppressed QLayout: Attempting to add QLayout "" to properties "properties" warning message when opening a properties dialog
|
||||
- BUGFIX: Fixed a little bug in search engine plugins helper file
|
||||
- BUGFIX: Fixed compilation problems with Qt 4.3
|
||||
- BUGFIX: Percentages no longer disapear with default cleanlooks style
|
||||
- BUGFIX: Percentages no longer disappear with default cleanlooks style
|
||||
- BUGFIX: Cleanly fixed popup menus position in lists (no more workarounds)
|
||||
- BUGFIX: Fixed memory leak in search engine
|
||||
- BUGFIX: Torrents with an infinite ratio are no longer affected by ratio_limit set in program preferences
|
||||
@@ -1855,7 +2206,7 @@ Unreleased - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.4.0
|
||||
- FEATURE: Number of complete/incomplete sources are now displayed in download list for each torrent
|
||||
- FEATURE: Implemented close to systray
|
||||
- FEATURE: Added Autocompletion to search engine
|
||||
- FEATURE: Splitted BT & GUI parts (huge code rewriting & optimization)
|
||||
- FEATURE: Split BT & GUI parts (huge code rewriting & optimization)
|
||||
- FEATURE: New parameters for configure file to point to custom locations for libtorrent/libcurl
|
||||
- FEATURE: Update application style according to the system (WindowsXP, MacOS, X11)
|
||||
- BUGFIX: Two torrents can now have the same name although they are different (use their hash)
|
||||
|
||||
49
INSTALL
@@ -1,54 +1,49 @@
|
||||
qBittorrent - A BitTorrent client in C++ / Qt4
|
||||
qBittorrent - A BitTorrent client in C++ / Qt
|
||||
------------------------------------------
|
||||
|
||||
1) Compile and install qBittorrent with Qt4 Graphical Interface
|
||||
1) Compile and install qBittorrent with Qt graphical interface
|
||||
|
||||
$ ./configure
|
||||
$ make && make install
|
||||
$ qbittorrent
|
||||
|
||||
will install and execute qBittorrent hopefully without any problems.
|
||||
will install and execute qBittorrent.
|
||||
|
||||
Dependencies:
|
||||
- Qt >= 4.6.0 (libqtgui, libqtcore, libqtnetwork, libqtxml, libqtdbus/optional)
|
||||
- Qt >= 5.5.1
|
||||
|
||||
- pkg-config executable
|
||||
- pkg-config
|
||||
|
||||
- libtorrent-rasterbar by Arvid Norberg (>= 1.0.6)
|
||||
-> http://www.libtorrent.net
|
||||
Be careful: another library (the one used by rTorrent) uses a similar name.
|
||||
- libtorrent-rasterbar >= 1.0.6 (by Arvid Norberg)
|
||||
* https://www.libtorrent.org/
|
||||
* Be careful: another library (the one used by rTorrent) uses a similar name
|
||||
|
||||
- libboost >= 1.35.x (libboost-system)
|
||||
- Boost >= 1.35
|
||||
|
||||
- python >= 2.3 (needed by search engine)
|
||||
* Run time only dependency
|
||||
- Python >= 2.7.9 / 3.3.0 (optional, runtime only)
|
||||
* Required by the internal search engine
|
||||
|
||||
- geoip-database (optional)
|
||||
* If qBittorrent cannot find this database, it will try to resolve countries using the Internet but it will be a lot slower.
|
||||
* Run time only dependency
|
||||
|
||||
2) Compile and install qBittorrent without Qt4 Graphical interface
|
||||
2) Compile and install qBittorrent without Qt graphical interface
|
||||
|
||||
$ ./configure --disable-gui
|
||||
$ make && make install
|
||||
$ qbittorrent
|
||||
$ qbittorrent-nox
|
||||
|
||||
will install and execute qBittorrent hopefully without any problems.
|
||||
will install and execute qBittorrent.
|
||||
|
||||
Dependencies:
|
||||
- Qt >= 4.4.0 (libqt-devel, libqtcore, libqtnetwork)
|
||||
- Qt >= 5.5.1
|
||||
|
||||
- pkg-config executable
|
||||
- pkg-config
|
||||
|
||||
- libtorrent-rasterbar by Arvid Norberg (>= v1.0.6)
|
||||
-> http://www.libtorrent.net
|
||||
Be careful: another library (the one used by rTorrent) uses a similar name.
|
||||
|
||||
- libboost: libboost-filesystem, libboost-date-time, libboost-thread, libboost-serialization
|
||||
- libtorrent-rasterbar >= 1.0.6 (by Arvid Norberg)
|
||||
* https://www.libtorrent.org/
|
||||
* Be careful: another library (the one used by rTorrent) uses a similar name
|
||||
|
||||
- Boost >= 1.35
|
||||
|
||||
DOCUMENTATION:
|
||||
Please note that there is a documentation with a "compiling howto" at http://wiki.qbittorrent.org.
|
||||
Please note that there is a "Compilation" section at http://wiki.qbittorrent.org.
|
||||
|
||||
------------------------------------------
|
||||
Christophe Dumez <chris@qbittorrent.org>
|
||||
sledgehammer999 <sledgehammer999@qbittorrent.org>
|
||||
|
||||
@@ -35,7 +35,7 @@ You can also download it from [here](https://github.com/qbittorrent/qBittorrent/
|
||||
|
||||
### Misc:
|
||||
For more information please visit:
|
||||
http://www.qbittorrent.org
|
||||
https://www.qbittorrent.org
|
||||
|
||||
or our wiki here:
|
||||
http://wiki.qbittorrent.org
|
||||
|
||||
74
README.os2
@@ -1,74 +0,0 @@
|
||||
qBittorrent - A BitTorrent client in Qt4
|
||||
------------------------------------------
|
||||
|
||||
This is the eComStation (OS/2) qBittorrent part of the readme. See also README for more general information.
|
||||
|
||||
|
||||
Building qBittorrent
|
||||
********************
|
||||
|
||||
|
||||
Requirements
|
||||
============
|
||||
|
||||
- gcc based build env (recommended gcc v4.4.2 or greater)
|
||||
|
||||
- Qt4 for eCS (OS/2) dev package (see http://svn.netlabs.org/qt4 for more information)
|
||||
|
||||
- libtorrent-rasterbar for eCS (OS/2) port (see http://svn.netlabs.org/ports for more information)
|
||||
|
||||
- boost for eCS (OS/2) port (see http://svn.netlabs.org/ports for more information)
|
||||
|
||||
|
||||
How to build
|
||||
============
|
||||
|
||||
First you need to create the conf.pri file in the same dir as this readme.os2 is.
|
||||
the conf.pri file has the following content:
|
||||
|
||||
##### conf.pri content begin #####
|
||||
BINDIR = ./bin
|
||||
INCDIR = ./include
|
||||
LIBDIR = ./lib
|
||||
DATADIR = ./share
|
||||
|
||||
CONFIG += staticlib
|
||||
INCLUDEPATH += x:/trees/libtorrent/trunk/include
|
||||
LIBS += -Lx:/trees/libtorrent/trunk/src/.libs \
|
||||
-Lx:/trees/boost/trunk/stage/lib \
|
||||
-Lx:/trees/openssl \
|
||||
-Lx:/extras/lib
|
||||
##### conf.pri content end #####
|
||||
|
||||
Of course all the above path references have to be adjusted to your build env.
|
||||
|
||||
Now you can either do a normal build or a shadow build. A shadow build has the
|
||||
advantage that no created files are in the same dir as the sources are.
|
||||
|
||||
For a normal build do the following:
|
||||
|
||||
Simply type:
|
||||
$ qmake
|
||||
|
||||
Followed by:
|
||||
$ make
|
||||
|
||||
For a shadow build do the following:
|
||||
given your sources are in x:\trees\qbittorrent\trunk create a
|
||||
x:\trees\qbittorrent\build directory
|
||||
|
||||
Now switch to the created directory and type:
|
||||
$ qmake ..\trunk
|
||||
|
||||
Followed by:
|
||||
$ make
|
||||
|
||||
If all works fine you should get a working qbittorrent executable.
|
||||
|
||||
If you have any question regarding the eCS (OS/2) port of qBittorrent you can meet me (_diver) on IRC:
|
||||
#netlabs on irc.freenode.net
|
||||
|
||||
------------------------------------------
|
||||
Silvan Scherrer <silvan.scherrer@aroa.ch>
|
||||
|
||||
|
||||
22
cmake/Modules/CompileFeature.cmake
Normal file
@@ -0,0 +1,22 @@
|
||||
# Helper function for coupling add_feature_info(), option(), and add_definitions()
|
||||
|
||||
function(optional_compile_definitions _name)
|
||||
set(options FEATURE)
|
||||
set(oneValueArgs DESCRIPTION DEFAULT)
|
||||
set(multiValueArgs ENABLED DISABLED)
|
||||
cmake_parse_arguments(OCD "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
||||
option(${_name} "${OCD_DESCRIPTION}" ${OCD_DEFAULT})
|
||||
if (${${_name}})
|
||||
set_property(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" APPEND PROPERTY COMPILE_DEFINITIONS ${OCD_ENABLED})
|
||||
else()
|
||||
set_property(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" APPEND PROPERTY COMPILE_DEFINITIONS ${OCD_DISABLED})
|
||||
endif()
|
||||
if(${OCD_FEATURE})
|
||||
add_feature_info(${_name} ${_name} "${OCD_DESCRIPTION}")
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
macro(feature_option _name _description _default)
|
||||
option(${_name} "${_description}" ${_default})
|
||||
add_feature_info(${_name} ${_name} "${_description}")
|
||||
endmacro()
|
||||
@@ -99,6 +99,7 @@ list(FIND LibtorrentRasterbar_DEFINITIONS -DTORRENT_USE_OPENSSL LibtorrentRaster
|
||||
if(LibtorrentRasterbar_ENCRYPTION_INDEX GREATER -1)
|
||||
find_package(OpenSSL REQUIRED)
|
||||
set(LibtorrentRasterbar_LIBRARIES ${LibtorrentRasterbar_LIBRARIES} OpenSSL::SSL OpenSSL::Crypto)
|
||||
list(APPEND LibtorrentRasterbar_INCLUDE_DIRS "${OPENSSL_INCLUDE_DIR}")
|
||||
set(LibtorrentRasterbar_OPENSSL_ENABLED ON)
|
||||
endif()
|
||||
|
||||
@@ -113,10 +114,10 @@ mark_as_advanced(LibtorrentRasterbar_INCLUDE_DIR LibtorrentRasterbar_LIBRARY
|
||||
LibtorrentRasterbar_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES
|
||||
LibtorrentRasterbar_ENCRYPTION_INDEX)
|
||||
|
||||
if (LibtorrentRasterbar_FOUND AND NOT TARGET LibtorrentRasterbar::LibTorrent)
|
||||
add_library(LibtorrentRasterbar::LibTorrent UNKNOWN IMPORTED)
|
||||
if (LibtorrentRasterbar_FOUND AND NOT TARGET LibtorrentRasterbar::torrent-rasterbar)
|
||||
add_library(LibtorrentRasterbar::torrent-rasterbar UNKNOWN IMPORTED)
|
||||
|
||||
set_target_properties(LibtorrentRasterbar::LibTorrent PROPERTIES
|
||||
set_target_properties(LibtorrentRasterbar::torrent-rasterbar PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
||||
IMPORTED_LOCATION "${LibtorrentRasterbar_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${LibtorrentRasterbar_INCLUDE_DIRS}"
|
||||
|
||||
@@ -1,94 +1,79 @@
|
||||
# - Try to find the QtSingleApplication includes and library
|
||||
# which defines
|
||||
#
|
||||
# QTSINGLEAPPLICATION_FOUND - system has QtSingleApplication
|
||||
# QTSINGLEAPPLICATION_INCLUDE_DIR - where to find header QtSingleApplication
|
||||
# QTSINGLEAPPLICATION_LIBRARIES - the libraries to link against to use QtSingleApplication
|
||||
# QTSINGLEAPPLICATION_LIBRARY - where to find the QtSingleApplication library (not for general use)
|
||||
# QtSingleApplication_FOUND - system has QtSingleApplication
|
||||
# QtSingleApplication_INCLUDE_DIR - where to find header QtSingleApplication
|
||||
# QtSingleApplication_LIBRARIES - the libraries to link against to use QtSingleApplication
|
||||
# QtSingleApplication_LIBRARY - where to find the QtSingleApplication library (not for general use)
|
||||
|
||||
# copyright (c) 2013 TI_Eugene ti.eugene@gmail.com
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the FreeBSD license.
|
||||
|
||||
SET(QTSINGLEAPPLICATION_FOUND FALSE)
|
||||
SET(QtSingleApplication_FOUND FALSE)
|
||||
|
||||
IF(QT4_FOUND)
|
||||
message(STATUS "Looking for Qt4 single application library")
|
||||
FIND_PATH(QTSINGLEAPPLICATION_INCLUDE_DIR QtSingleApplication
|
||||
# standard locations
|
||||
/usr/include
|
||||
/usr/include/QtSolutions
|
||||
# qt4 location except mac's frameworks
|
||||
"${QT_INCLUDE_DIR}/QtSolutions"
|
||||
# mac's frameworks
|
||||
${FRAMEWORK_INCLUDE_DIR}/QtSolutions
|
||||
)
|
||||
if (Qt5Widgets_FOUND)
|
||||
set(_includeFileName qtsingleapplication.h)
|
||||
else()
|
||||
set(_includeFileName qtsinglecoreapplication.h)
|
||||
endif()
|
||||
|
||||
SET(QTSINGLEAPPLICATION_NAMES ${QTSINGLEAPPLICATION_NAMES}
|
||||
QtSolutions_SingleApplication-2.6 libQtSolutions_SingleApplication-2.6)
|
||||
FIND_LIBRARY(QTSINGLEAPPLICATION_LIBRARY
|
||||
NAMES ${QTSINGLEAPPLICATION_NAMES}
|
||||
PATHS ${QT_LIBRARY_DIR}
|
||||
)
|
||||
ELSEIF(Qt5Widgets_FOUND)
|
||||
message(STATUS "Looking for Qt5 single application library")
|
||||
FOREACH(TOP_INCLUDE_PATH in ${Qt5Widgets_INCLUDE_DIRS} ${FRAMEWORK_INCLUDE_DIR})
|
||||
FIND_PATH(QTSINGLEAPPLICATION_INCLUDE_DIR QtSingleApplication ${TOP_INCLUDE_PATH}/QtSolutions)
|
||||
FOREACH(TOP_INCLUDE_PATH in ${Qt5Core_INCLUDE_DIRS} ${FRAMEWORK_INCLUDE_DIR})
|
||||
FIND_PATH(QtSingleApplication_INCLUDE_DIR ${_includeFileName} ${TOP_INCLUDE_PATH}/QtSolutions)
|
||||
|
||||
IF(QTSINGLEAPPLICATION_INCLUDE_DIR)
|
||||
BREAK()
|
||||
ENDIF()
|
||||
ENDFOREACH()
|
||||
IF(QtSingleApplication_INCLUDE_DIR)
|
||||
BREAK()
|
||||
ENDIF()
|
||||
ENDFOREACH()
|
||||
|
||||
SET(QTSINGLEAPPLICATION_NAMES ${QTSINGLEAPPLICATION_NAMES}
|
||||
Qt5Solutions_SingleApplication-2.6 libQt5Solutions_SingleApplication-2.6
|
||||
QtSolutions_SingleApplication-2.6 libQtSolutions_SingleApplication-2.6)
|
||||
GET_TARGET_PROPERTY(QT5_WIDGETSLIBRARY Qt5::Widgets LOCATION)
|
||||
GET_FILENAME_COMPONENT(QT5_WIDGETSLIBRARYPATH ${QT5_WIDGETSLIBRARY} PATH)
|
||||
SET(QtSingleApplication_NAMES ${QtSingleApplication_NAMES}
|
||||
Qt5Solutions_SingleApplication-2.6 libQt5Solutions_SingleApplication-2.6
|
||||
QtSolutions_SingleApplication-2.6 libQtSolutions_SingleApplication-2.6)
|
||||
GET_TARGET_PROPERTY(_QT5_CORELIBRARY Qt5::Core LOCATION)
|
||||
GET_FILENAME_COMPONENT(_QT5_CORELIBRARYPATH ${_QT5_CORELIBRARY} PATH)
|
||||
|
||||
FIND_LIBRARY(QTSINGLEAPPLICATION_LIBRARY
|
||||
NAMES ${QTSINGLEAPPLICATION_NAMES}
|
||||
PATHS ${QT5_WIDGETSLIBRARYPATH}
|
||||
)
|
||||
ENDIF()
|
||||
FIND_LIBRARY(QtSingleApplication_LIBRARY
|
||||
NAMES ${QtSingleApplication_NAMES}
|
||||
PATHS ${_QT5_CORELIBRARYPATH}
|
||||
)
|
||||
|
||||
IF (QTSINGLEAPPLICATION_LIBRARY AND QTSINGLEAPPLICATION_INCLUDE_DIR)
|
||||
IF (QtSingleApplication_LIBRARY AND QtSingleApplication_INCLUDE_DIR)
|
||||
|
||||
SET(QTSINGLEAPPLICATION_LIBRARIES ${QTSINGLEAPPLICATION_LIBRARY})
|
||||
SET(QTSINGLEAPPLICATION_FOUND TRUE)
|
||||
SET(QtSingleApplication_LIBRARIES ${QtSingleApplication_LIBRARY})
|
||||
SET(QtSingleApplication_FOUND TRUE)
|
||||
|
||||
IF (CYGWIN)
|
||||
IF(BUILD_SHARED_LIBS)
|
||||
# No need to define QTSINGLEAPPLICATION_USE_DLL here, because it's default for Cygwin.
|
||||
# No need to define QtSingleApplication_USE_DLL here, because it's default for Cygwin.
|
||||
ELSE(BUILD_SHARED_LIBS)
|
||||
SET (QTSINGLEAPPLICATION_DEFINITIONS -DQTSINGLEAPPLICATION_STATIC)
|
||||
SET (QtSingleApplication_DEFINITIONS -DQTSINGLEAPPLICATION_STATIC)
|
||||
ENDIF(BUILD_SHARED_LIBS)
|
||||
ENDIF (CYGWIN)
|
||||
|
||||
ENDIF (QTSINGLEAPPLICATION_LIBRARY AND QTSINGLEAPPLICATION_INCLUDE_DIR)
|
||||
ENDIF (QtSingleApplication_LIBRARY AND QtSingleApplication_INCLUDE_DIR)
|
||||
|
||||
IF (QTSINGLEAPPLICATION_FOUND)
|
||||
IF (NOT QtSingleApplication_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Found QtSingleApplication: ${QTSINGLEAPPLICATION_LIBRARY}")
|
||||
MESSAGE(STATUS " includes: ${QTSINGLEAPPLICATION_INCLUDE_DIR}")
|
||||
ENDIF (NOT QtSingleApplication_FIND_QUIETLY)
|
||||
ELSE (QTSINGLEAPPLICATION_FOUND)
|
||||
IF (QtSingleApplication_FOUND)
|
||||
IF (NOT QtSingleApplication_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Found QtSingleApplication: ${QtSingleApplication_LIBRARY}")
|
||||
MESSAGE(STATUS " includes: ${QtSingleApplication_INCLUDE_DIR}")
|
||||
ENDIF (NOT QtSingleApplication_FIND_QUIETLY)
|
||||
if(NOT TARGET QtSingleApplication::QtSingleApplication)
|
||||
add_library(QtSingleApplication::QtSingleApplication UNKNOWN IMPORTED)
|
||||
set_target_properties(QtSingleApplication::QtSingleApplication PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${QtSingleApplication_INCLUDE_DIR}"
|
||||
INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${QtSingleApplication_INCLUDE_DIR}"
|
||||
)
|
||||
if(EXISTS "${QtSingleApplication_LIBRARY}")
|
||||
set_target_properties(QtSingleApplication::QtSingleApplication PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
||||
IMPORTED_LOCATION "${QtSingleApplication_LIBRARY}")
|
||||
endif()
|
||||
endif(NOT TARGET QtSingleApplication::QtSingleApplication)
|
||||
|
||||
ELSE (QtSingleApplication_FOUND)
|
||||
IF (QtSingleApplication_FIND_REQUIRED)
|
||||
MESSAGE(FATAL_ERROR "Could not find QtSingleApplication library")
|
||||
ENDIF (QtSingleApplication_FIND_REQUIRED)
|
||||
ENDIF (QTSINGLEAPPLICATION_FOUND)
|
||||
ENDIF (QtSingleApplication_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(QTSINGLEAPPLICATION_INCLUDE_DIR QTSINGLEAPPLICATION_LIBRARY)
|
||||
|
||||
if(NOT TARGET QtSingleApplication::QtSingleApplication)
|
||||
add_library(QtSingleApplication::QtSingleApplication UNKNOWN IMPORTED)
|
||||
set_target_properties(QtSingleApplication::QtSingleApplication PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${QTSINGLEAPPLICATION_INCLUDE_DIR}"
|
||||
INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${QTSINGLEAPPLICATION_INCLUDE_DIR}"
|
||||
)
|
||||
if(EXISTS "${QTSINGLEAPPLICATION_LIBRARY}")
|
||||
set_target_properties(QtSingleApplication::QtSingleApplication PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
|
||||
IMPORTED_LOCATION "${QTSINGLEAPPLICATION_LIBRARY}")
|
||||
endif()
|
||||
endif(NOT TARGET QtSingleApplication::QtSingleApplication)
|
||||
MARK_AS_ADVANCED(QtSingleApplication_INCLUDE_DIR QtSingleApplication_LIBRARY)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# - macro similar to target_link_libraries, which links Qt components
|
||||
# names of the components are pased in Qt4/Qt5 agnostic way (Core, DBus, Xml...)
|
||||
# names of the components are passed in Qt4/Qt5 agnostic way (Core, DBus, Xml...)
|
||||
# and the macro links Qt4 ones if QT4_FOUND is set or Qt5 ones if not
|
||||
|
||||
macro (target_link_qt_components target)
|
||||
|
||||
@@ -11,18 +11,17 @@ macro(qbt_set_compiler_options)
|
||||
#-Wshadow -Wconversion ?
|
||||
set(_GCC_COMMON_C_AND_CXX_FLAGS "-Wall -Wextra"
|
||||
"-Wfloat-equal -Wcast-qual -Wcast-align"
|
||||
"-Wsign-conversion -Winvalid-pch -Werror=return-type -Wno-long-long"
|
||||
# -fstack-protector-all
|
||||
"-Werror -Wno-error=deprecated-declarations"
|
||||
"-Wsign-conversion -Winvalid-pch -Wno-long-long"
|
||||
#"-fstack-protector-all"
|
||||
#"-Werror -Wno-error=deprecated-declarations"
|
||||
)
|
||||
set (_GCC_COMMON_CXX_FLAGS "-fexceptions -frtti"
|
||||
"-Woverloaded-virtual -Wold-style-cast -Wstrict-null-sentinel"
|
||||
set(_GCC_COMMON_CXX_FLAGS "-fexceptions -frtti"
|
||||
"-Woverloaded-virtual -Wold-style-cast"
|
||||
"-Wnon-virtual-dtor -Wfloat-equal -Wcast-qual -Wcast-align"
|
||||
"-Werror=overloaded-virtual"
|
||||
# "-Weffc++"
|
||||
"-Werror -Wno-error=cpp"
|
||||
#"-Weffc++"
|
||||
#"-Werror -Wno-error=cpp"
|
||||
# we should modify code to make these ones obsolete
|
||||
"-Wno-error=sign-conversion -Wno-error=float-equal"
|
||||
#"-Wno-error=sign-conversion -Wno-error=float-equal"
|
||||
)
|
||||
|
||||
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9)
|
||||
@@ -54,6 +53,20 @@ macro(qbt_set_compiler_options)
|
||||
endif(${GLIBC_VERSION})
|
||||
endif (CMAKE_SYSTEM_NAME MATCHES Linux)
|
||||
|
||||
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
# Clang 5.0 still doesn't support -Wstrict-null-sentinel
|
||||
check_cxx_compiler_flag(-Wstrict-null-sentinel _STRICT_NULL_SENTINEL_IS_SUPPORTED)
|
||||
if (_STRICT_NULL_SENTINEL_IS_SUPPORTED)
|
||||
list(APPEND _GCC_COMMON_CXX_FLAGS "-Wstrict-null-sentinel")
|
||||
endif (_STRICT_NULL_SENTINEL_IS_SUPPORTED)
|
||||
|
||||
# Code should be improved to render this not needed
|
||||
list(APPEND _GCC_COMMON_CXX_FLAGS "-Wno-error=unused-function -Wno-error=inconsistent-missing-override")
|
||||
else ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
# GCC supports it
|
||||
list(APPEND _GCC_COMMON_CXX_FLAGS "-Wstrict-null-sentinel")
|
||||
endif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
|
||||
string(REPLACE ";" " " _GCC_COMMON_C_AND_CXX_FLAGS_STRING "${_GCC_COMMON_C_AND_CXX_FLAGS}")
|
||||
string(REPLACE ";" " " _GCC_COMMON_CXX_FLAGS_STRING "${_GCC_COMMON_CXX_FLAGS}")
|
||||
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
# a helper function which appends source to the main qBt target
|
||||
# sources file names are relative to the the ${qBittorrent_SOURCE_DIR}
|
||||
# a helper function which appends source to the target
|
||||
# sources file names are relative to the the target source dir
|
||||
|
||||
function (qbt_target_sources)
|
||||
set (_sources_rel "")
|
||||
foreach (_source IN ITEMS ${ARGN})
|
||||
if (IS_ABSOLUTE "${_source}")
|
||||
set(source_abs "${_source}")
|
||||
function (qbt_target_sources _target _scope)
|
||||
get_target_property(targetSourceDir ${_target} SOURCE_DIR)
|
||||
set(sourcesRelative "")
|
||||
foreach(source IN ITEMS ${ARGN})
|
||||
if(IS_ABSOLUTE "${source}")
|
||||
set(sourceAbsolutePath "${source}")
|
||||
else()
|
||||
get_filename_component(_source_abs "${_source}" ABSOLUTE)
|
||||
get_filename_component(sourceAbsolutePath "${source}" ABSOLUTE)
|
||||
endif()
|
||||
file (RELATIVE_PATH _source_rel "${qbt_executable_SOURCE_DIR}" "${_source_abs}")
|
||||
list (APPEND _sources_rel "${_source_rel}")
|
||||
file(RELATIVE_PATH sourceRelativePath "${targetSourceDir}" "${sourceAbsolutePath}")
|
||||
list(APPEND sourcesRelative "${sourceRelativePath}")
|
||||
endforeach()
|
||||
target_sources (qBittorrent PRIVATE "${_sources_rel}")
|
||||
endfunction (qbt_target_sources)
|
||||
target_sources(${_target} ${_scope} "${sourcesRelative}")
|
||||
endfunction(qbt_target_sources)
|
||||
|
||||
48
cmake/Modules/QbtTranslations.cmake
Normal file
@@ -0,0 +1,48 @@
|
||||
# macros to handle translation files
|
||||
|
||||
# qbt_add_translations(<target> QRC_FILE <filename> TS_FILES <filenames>)
|
||||
# handles out of source builds for Qt resource files that include translations
|
||||
# The function generates translations out of the supplied list of .ts files in the build directory,
|
||||
# copies the .qrc file there, calls qt5_add_resources() adds its output to the target sources list.
|
||||
function(qbt_add_translations _target)
|
||||
set(oneValueArgs QRC_FILE)
|
||||
set(multiValueArgs TS_FILES)
|
||||
cmake_parse_arguments(QBT_TR "" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
||||
|
||||
get_target_property(_binaryDir ${_target} BINARY_DIR)
|
||||
|
||||
if (NOT QBT_TR_QRC_FILE)
|
||||
message(FATAL_ERROR "QRC file is empty")
|
||||
endif()
|
||||
if (NOT QBT_TR_TS_FILES)
|
||||
message(FATAL_ERROR "TS_FILES files are empty")
|
||||
endif()
|
||||
|
||||
if(IS_ABSOLUTE "${QBT_TR_QRC_FILE}")
|
||||
file(RELATIVE_PATH _qrcToTs "${CMAKE_CURRENT_SOURCE_DIR}" "${QBT_TR_QRC_FILE}")
|
||||
else()
|
||||
set(_qrcToTs "${QBT_TR_QRC_FILE}")
|
||||
endif()
|
||||
|
||||
get_filename_component(_qrcToTsDir "${_qrcToTs}" DIRECTORY)
|
||||
|
||||
get_filename_component(_qmFilesBinaryDir "${CMAKE_CURRENT_BINARY_DIR}/${_qrcToTsDir}" ABSOLUTE)
|
||||
# to make qt5_add_translation() work as we need
|
||||
set_source_files_properties(${QBT_TR_TS_FILES} PROPERTIES OUTPUT_LOCATION "${_qmFilesBinaryDir}")
|
||||
qt5_add_translation(_qmFiles ${QBT_TR_TS_FILES})
|
||||
|
||||
set(_qrc_dest_dir "${_binaryDir}/${_qrcToTsDir}")
|
||||
set(_qrc_dest_file "${_binaryDir}/${QBT_TR_QRC_FILE}")
|
||||
|
||||
message(STATUS "copying ${QBT_TR_QRC_FILE} to ${_qrc_dest_dir}")
|
||||
file(COPY ${QBT_TR_QRC_FILE} DESTINATION ${_qrc_dest_dir})
|
||||
|
||||
set_source_files_properties("${_qrc_dest_file}" PROPERTIES
|
||||
GENERATED True
|
||||
OBJECT_DEPENDS "${_qmFiles}")
|
||||
|
||||
# With AUTORCC enabled rcc is ran by cmake before language files are generated,
|
||||
# and thus we call rcc explicitly
|
||||
qt5_add_resources(_resources "${_qrc_dest_file}")
|
||||
target_sources(${_target} PRIVATE "${_resources}")
|
||||
endfunction()
|
||||
@@ -1,9 +1,9 @@
|
||||
if (STACKTRACE_WIN)
|
||||
if (STACKTRACE)
|
||||
if ("${WINXXBITS}" NOT STREQUAL "Win64")
|
||||
add_compile_options(-fno-omit-frame-pointer)
|
||||
endif ("${WINXXBITS}" NOT STREQUAL "Win64")
|
||||
link_libraries(libdbghelp -Wl,--export-all-symbols)
|
||||
endif (STACKTRACE_WIN)
|
||||
endif (STACKTRACE)
|
||||
|
||||
if (("${CMAKE_BUILD_TYPE}" STREQUAL "Debug") OR ("${CMAKE_BUILD_TYPE}" STREQUAL "RelWithDebInfo"))
|
||||
link_libraries(-Wl,--dynamicbase)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
if (STACKTRACE_WIN)
|
||||
if (STACKTRACE)
|
||||
if ("${WINXXBITS}" STREQUAL "Win64")
|
||||
add_compile_options(-Zi)
|
||||
else ("${WINXXBITS}" STREQUAL "Win64")
|
||||
@@ -6,7 +6,7 @@ if (STACKTRACE_WIN)
|
||||
add_compile_options(-Oy-)
|
||||
endif ("${WINXXBITS}" STREQUAL "Win64")
|
||||
link_libraries(dbghelp.lib)
|
||||
endif (STACKTRACE_WIN)
|
||||
endif (STACKTRACE)
|
||||
|
||||
# Enable Wide characters
|
||||
add_definitions(-DTORRENT_USE_WPATH)
|
||||
|
||||
@@ -24,6 +24,7 @@ add_definitions(-DUNICODE
|
||||
-D_WIN32_IE=0x0501
|
||||
-D_CRT_SECURE_NO_DEPRECATE
|
||||
-D_SCL_SECURE_NO_DEPRECATE
|
||||
-DNOMINMAX
|
||||
)
|
||||
# and boost
|
||||
set(Boost_USE_STATIC_LIBS True)
|
||||
|
||||
69
conf.pri.windows
Normal file
@@ -0,0 +1,69 @@
|
||||
# Adapt these paths
|
||||
# Point these to the include folders
|
||||
INCLUDEPATH += $$quote(C:/qBittorrent/boost)
|
||||
INCLUDEPATH += $$quote(C:/qBittorrent/libtorrent/include)
|
||||
INCLUDEPATH += $$quote(C:/qBittorrent/zlib/include)
|
||||
INCLUDEPATH += $$quote(C:/qBittorrent/openssl/include)
|
||||
# Point these to the lib folders
|
||||
LIBS += $$quote(-LC:/qBittorrent/boost/stage/lib)
|
||||
LIBS += $$quote(-LC:/qBittorrent/libtorrent/lib)
|
||||
LIBS += $$quote(-LC:/qBittorrent/zlib/lib)
|
||||
LIBS += $$quote(-LC:/qBittorrent/openssl/lib)
|
||||
|
||||
# Adapt the lib names/versions accordingly
|
||||
# If you want to use Boost auto-linking then disable
|
||||
# BOOST_ALL_NO_LIB below and omit Boost libraries here
|
||||
CONFIG(debug, debug|release) {
|
||||
LIBS += libtorrentd.lib \
|
||||
libboost_system-vc140-mt-sgd-1_64.lib
|
||||
}
|
||||
else {
|
||||
LIBS += libtorrent.lib \
|
||||
libboost_system-vc140-mt-s-1_64.lib
|
||||
}
|
||||
LIBS += libeay32.lib ssleay32.lib
|
||||
LIBS += zlib.lib
|
||||
# ...or if you use MinGW
|
||||
#CONFIG(debug, debug|release) {
|
||||
# LIBS += libtorrent-rasterbar \
|
||||
# libboost_system-mt
|
||||
#}
|
||||
#else {
|
||||
# LIBS += libtorrent-rasterbar \
|
||||
# libboost_system-mt
|
||||
#}
|
||||
#LIBS += libcrypto libssl
|
||||
#LIBS += libz
|
||||
|
||||
DEFINES += NTDDI_VERSION=0x05010000
|
||||
DEFINES += _WIN32_WINNT=0x0501
|
||||
DEFINES += _WIN32_IE=0x0501
|
||||
|
||||
# Disable to use Boost auto-linking
|
||||
DEFINES += BOOST_ALL_NO_LIB
|
||||
# Use one of the following options
|
||||
DEFINES += BOOST_SYSTEM_STATIC_LINK
|
||||
#DEFINES += BOOST_SYSTEM_DYN_LINK
|
||||
# Boost 1.60+ defaults to Vista+ support. The define below enables XP support again.
|
||||
DEFINES += BOOST_USE_WINAPI_VERSION=0x0501
|
||||
# Enable if building against libtorrent 1.0.x (RC_1_0) (static linking)
|
||||
#DEFINES += BOOST_ASIO_SEPARATE_COMPILATION
|
||||
# Enable if building against libtorrent 1.0.x (RC_1_0) (dynamic linking)
|
||||
#DEFINES += BOOST_ASIO_DYN_LINK
|
||||
# Enable if encountered build error with boost version <= 1.59
|
||||
#DEFINES += BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
|
||||
# Enable if building against libtorrent 1.1.x (RC_1_1)
|
||||
# built with this flag defined
|
||||
#DEFINES += TORRENT_NO_DEPRECATE
|
||||
# Enable if linking dynamically against libtorrent
|
||||
#DEFINES += TORRENT_LINKING_SHARED
|
||||
|
||||
# Enable stack trace support
|
||||
CONFIG += stacktrace
|
||||
|
||||
win32-msvc* {
|
||||
QMAKE_CXXFLAGS += "/guard:cf"
|
||||
QMAKE_LFLAGS += "/guard:cf"
|
||||
QMAKE_LFLAGS_RELEASE += "/OPT:REF /OPT:ICF"
|
||||
}
|
||||
509
configure
vendored
@@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.69 for qbittorrent v3.2.0alpha.
|
||||
# Generated by GNU Autoconf 2.69 for qbittorrent v4.1.4.
|
||||
#
|
||||
# Report bugs to <bugs.qbittorrent.org>.
|
||||
#
|
||||
@@ -580,10 +580,10 @@ MAKEFLAGS=
|
||||
# Identity of this package.
|
||||
PACKAGE_NAME='qbittorrent'
|
||||
PACKAGE_TARNAME='qbittorrent'
|
||||
PACKAGE_VERSION='v3.2.0alpha'
|
||||
PACKAGE_STRING='qbittorrent v3.2.0alpha'
|
||||
PACKAGE_VERSION='v4.1.4'
|
||||
PACKAGE_STRING='qbittorrent v4.1.4'
|
||||
PACKAGE_BUGREPORT='bugs.qbittorrent.org'
|
||||
PACKAGE_URL='http://www.qbittorrent.org/'
|
||||
PACKAGE_URL='https://www.qbittorrent.org/'
|
||||
|
||||
ac_subst_vars='am__EXEEXT_FALSE
|
||||
am__EXEEXT_TRUE
|
||||
@@ -606,6 +606,8 @@ libtorrent_CFLAGS
|
||||
BOOST_SYSTEM_LIB
|
||||
BOOST_LDFLAGS
|
||||
BOOST_CPPFLAGS
|
||||
Qt5Svg_LIBS
|
||||
Qt5Svg_CFLAGS
|
||||
QT_QMAKE
|
||||
PKG_CONFIG_LIBDIR
|
||||
PKG_CONFIG_PATH
|
||||
@@ -688,6 +690,7 @@ infodir
|
||||
docdir
|
||||
oldincludedir
|
||||
includedir
|
||||
runstatedir
|
||||
localstatedir
|
||||
sharedstatedir
|
||||
sysconfdir
|
||||
@@ -714,6 +717,7 @@ enable_dependency_tracking
|
||||
enable_silent_rules
|
||||
with_qtsingleapplication
|
||||
enable_debug
|
||||
enable_stacktrace
|
||||
enable_gui
|
||||
enable_systemd
|
||||
enable_webui
|
||||
@@ -737,6 +741,8 @@ PKG_CONFIG
|
||||
PKG_CONFIG_PATH
|
||||
PKG_CONFIG_LIBDIR
|
||||
QT_QMAKE
|
||||
Qt5Svg_CFLAGS
|
||||
Qt5Svg_LIBS
|
||||
libtorrent_CFLAGS
|
||||
libtorrent_LIBS
|
||||
zlib_CFLAGS
|
||||
@@ -779,6 +785,7 @@ datadir='${datarootdir}'
|
||||
sysconfdir='${prefix}/etc'
|
||||
sharedstatedir='${prefix}/com'
|
||||
localstatedir='${prefix}/var'
|
||||
runstatedir='${localstatedir}/run'
|
||||
includedir='${prefix}/include'
|
||||
oldincludedir='/usr/include'
|
||||
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
|
||||
@@ -1031,6 +1038,15 @@ do
|
||||
| -silent | --silent | --silen | --sile | --sil)
|
||||
silent=yes ;;
|
||||
|
||||
-runstatedir | --runstatedir | --runstatedi | --runstated \
|
||||
| --runstate | --runstat | --runsta | --runst | --runs \
|
||||
| --run | --ru | --r)
|
||||
ac_prev=runstatedir ;;
|
||||
-runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
|
||||
| --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
|
||||
| --run=* | --ru=* | --r=*)
|
||||
runstatedir=$ac_optarg ;;
|
||||
|
||||
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
|
||||
ac_prev=sbindir ;;
|
||||
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
|
||||
@@ -1168,7 +1184,7 @@ fi
|
||||
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
|
||||
datadir sysconfdir sharedstatedir localstatedir includedir \
|
||||
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
|
||||
libdir localedir mandir
|
||||
libdir localedir mandir runstatedir
|
||||
do
|
||||
eval ac_val=\$$ac_var
|
||||
# Remove trailing slashes.
|
||||
@@ -1281,7 +1297,7 @@ if test "$ac_init_help" = "long"; then
|
||||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat <<_ACEOF
|
||||
\`configure' configures qbittorrent v3.2.0alpha to adapt to many kinds of systems.
|
||||
\`configure' configures qbittorrent v4.1.4 to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
@@ -1321,6 +1337,7 @@ Fine tuning of the installation directories:
|
||||
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
|
||||
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
|
||||
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
|
||||
--runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
|
||||
--libdir=DIR object code libraries [EPREFIX/lib]
|
||||
--includedir=DIR C header files [PREFIX/include]
|
||||
--oldincludedir=DIR C header files for non-gcc [/usr/include]
|
||||
@@ -1351,7 +1368,7 @@ fi
|
||||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
short | recursive ) echo "Configuration of qbittorrent v3.2.0alpha:";;
|
||||
short | recursive ) echo "Configuration of qbittorrent v4.1.4:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
@@ -1366,6 +1383,7 @@ Optional Features:
|
||||
--enable-silent-rules less verbose build output (undo: "make V=1")
|
||||
--disable-silent-rules verbose build output (undo: "make V=0")
|
||||
--enable-debug Enable debug build
|
||||
--enable-stacktrace Enable stacktrace feature (default=auto)
|
||||
--disable-gui Disable the GUI for headless running. Disables
|
||||
QtDBus and the GeoIP Database.
|
||||
--enable-systemd Install the systemd service file (headless only).
|
||||
@@ -1408,6 +1426,9 @@ Some influential environment variables:
|
||||
PKG_CONFIG_LIBDIR
|
||||
path overriding pkg-config's built-in search path
|
||||
QT_QMAKE value of host_bins for Qt5Core >= 5.5.1, overriding pkg-config
|
||||
Qt5Svg_CFLAGS
|
||||
C compiler flags for Qt5Svg, overriding pkg-config
|
||||
Qt5Svg_LIBS linker flags for Qt5Svg, overriding pkg-config
|
||||
libtorrent_CFLAGS
|
||||
C compiler flags for libtorrent, overriding pkg-config
|
||||
libtorrent_LIBS
|
||||
@@ -1419,7 +1440,7 @@ Use these variables to override the choices made by `configure' or to help
|
||||
it to find libraries and programs with nonstandard names/locations.
|
||||
|
||||
Report bugs to <bugs.qbittorrent.org>.
|
||||
qbittorrent home page: <http://www.qbittorrent.org/>.
|
||||
qbittorrent home page: <https://www.qbittorrent.org/>.
|
||||
_ACEOF
|
||||
ac_status=$?
|
||||
fi
|
||||
@@ -1482,7 +1503,7 @@ fi
|
||||
test -n "$ac_init_help" && exit $ac_status
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
qbittorrent configure v3.2.0alpha
|
||||
qbittorrent configure v4.1.4
|
||||
generated by GNU Autoconf 2.69
|
||||
|
||||
Copyright (C) 2012 Free Software Foundation, Inc.
|
||||
@@ -1621,7 +1642,7 @@ cat >config.log <<_ACEOF
|
||||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
It was created by qbittorrent $as_me v3.2.0alpha, which was
|
||||
It was created by qbittorrent $as_me v4.1.4, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
$ $0 $@
|
||||
@@ -3799,7 +3820,7 @@ fi
|
||||
|
||||
# Define the identity of the package.
|
||||
PACKAGE='qbittorrent'
|
||||
VERSION='v3.2.0alpha'
|
||||
VERSION='v4.1.4'
|
||||
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
@@ -4170,6 +4191,14 @@ else
|
||||
fi
|
||||
|
||||
|
||||
# Check whether --enable-stacktrace was given.
|
||||
if test "${enable_stacktrace+set}" = set; then :
|
||||
enableval=$enable_stacktrace;
|
||||
else
|
||||
enable_stacktrace=auto
|
||||
fi
|
||||
|
||||
|
||||
# Check whether --enable-gui was given.
|
||||
if test "${enable_gui+set}" = set; then :
|
||||
enableval=$enable_gui;
|
||||
@@ -4370,6 +4399,39 @@ $as_echo "$enable_debug" >&6; }
|
||||
as_fn_error $? "Unknown option \"$enable_debug\". Use either \"yes\" or \"no\"." "$LINENO" 5 ;;
|
||||
esac
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable the stacktrace feature" >&5
|
||||
$as_echo_n "checking whether to enable the stacktrace feature... " >&6; }
|
||||
|
||||
case "x$enable_stacktrace" in #(
|
||||
"xno") :
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
QBT_REMOVE_CONFIG="$QBT_REMOVE_CONFIG stacktrace" ;; #(
|
||||
"xyes") :
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
QBT_ADD_CONFIG="$QBT_ADD_CONFIG stacktrace" ;; #(
|
||||
"xauto") :
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <execinfo.h>
|
||||
_ACEOF
|
||||
if ac_fn_cxx_try_compile "$LINENO"; then :
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
QBT_ADD_CONFIG="$QBT_ADD_CONFIG stacktrace"
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
QBT_REMOVE_CONFIG="$QBT_REMOVE_CONFIG stacktrace"
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ;; #(
|
||||
*) :
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_stacktrace" >&5
|
||||
$as_echo "$enable_stacktrace" >&6; }
|
||||
as_fn_error $? "Unknown option \"$enable_stacktrace\". Use either \"yes\" or \"no\"." "$LINENO" 5 ;;
|
||||
esac
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable the GUI" >&5
|
||||
$as_echo_n "checking whether to enable the GUI... " >&6; }
|
||||
case "x$enable_gui" in #(
|
||||
@@ -4477,6 +4539,104 @@ $as_echo "not found" >&6; }
|
||||
|
||||
fi
|
||||
|
||||
if test "x$QT_QMAKE" = "x"; then :
|
||||
as_fn_error $? "Could not find qmake" "$LINENO" 5
|
||||
|
||||
fi
|
||||
if test "x$enable_gui" = "xyes"; then :
|
||||
|
||||
pkg_failed=no
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Qt5Svg" >&5
|
||||
$as_echo_n "checking for Qt5Svg... " >&6; }
|
||||
|
||||
if test -n "$Qt5Svg_CFLAGS"; then
|
||||
pkg_cv_Qt5Svg_CFLAGS="$Qt5Svg_CFLAGS"
|
||||
elif test -n "$PKG_CONFIG"; then
|
||||
if test -n "$PKG_CONFIG" && \
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"Qt5Svg >= 5.5.1\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "Qt5Svg >= 5.5.1") 2>&5
|
||||
ac_status=$?
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
test $ac_status = 0; }; then
|
||||
pkg_cv_Qt5Svg_CFLAGS=`$PKG_CONFIG --cflags "Qt5Svg >= 5.5.1" 2>/dev/null`
|
||||
test "x$?" != "x0" && pkg_failed=yes
|
||||
else
|
||||
pkg_failed=yes
|
||||
fi
|
||||
else
|
||||
pkg_failed=untried
|
||||
fi
|
||||
if test -n "$Qt5Svg_LIBS"; then
|
||||
pkg_cv_Qt5Svg_LIBS="$Qt5Svg_LIBS"
|
||||
elif test -n "$PKG_CONFIG"; then
|
||||
if test -n "$PKG_CONFIG" && \
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"Qt5Svg >= 5.5.1\""; } >&5
|
||||
($PKG_CONFIG --exists --print-errors "Qt5Svg >= 5.5.1") 2>&5
|
||||
ac_status=$?
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
test $ac_status = 0; }; then
|
||||
pkg_cv_Qt5Svg_LIBS=`$PKG_CONFIG --libs "Qt5Svg >= 5.5.1" 2>/dev/null`
|
||||
test "x$?" != "x0" && pkg_failed=yes
|
||||
else
|
||||
pkg_failed=yes
|
||||
fi
|
||||
else
|
||||
pkg_failed=untried
|
||||
fi
|
||||
|
||||
|
||||
|
||||
if test $pkg_failed = yes; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
|
||||
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
|
||||
_pkg_short_errors_supported=yes
|
||||
else
|
||||
_pkg_short_errors_supported=no
|
||||
fi
|
||||
if test $_pkg_short_errors_supported = yes; then
|
||||
Qt5Svg_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "Qt5Svg >= 5.5.1" 2>&1`
|
||||
else
|
||||
Qt5Svg_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "Qt5Svg >= 5.5.1" 2>&1`
|
||||
fi
|
||||
# Put the nasty error message in config.log where it belongs
|
||||
echo "$Qt5Svg_PKG_ERRORS" >&5
|
||||
|
||||
as_fn_error $? "Package requirements (Qt5Svg >= 5.5.1) were not met:
|
||||
|
||||
$Qt5Svg_PKG_ERRORS
|
||||
|
||||
Consider adjusting the PKG_CONFIG_PATH environment variable if you
|
||||
installed software in a non-standard prefix.
|
||||
|
||||
Alternatively, you may set the environment variables Qt5Svg_CFLAGS
|
||||
and Qt5Svg_LIBS to avoid the need to call pkg-config.
|
||||
See the pkg-config man page for more details." "$LINENO" 5
|
||||
elif test $pkg_failed = untried; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
|
||||
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
|
||||
as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
|
||||
is in your PATH or set the PKG_CONFIG environment variable to the full
|
||||
path to pkg-config.
|
||||
|
||||
Alternatively, you may set the environment variables Qt5Svg_CFLAGS
|
||||
and Qt5Svg_LIBS to avoid the need to call pkg-config.
|
||||
See the pkg-config man page for more details.
|
||||
|
||||
To get pkg-config, see <http://pkg-config.freedesktop.org/>.
|
||||
See \`config.log' for more details" "$LINENO" 5; }
|
||||
else
|
||||
Qt5Svg_CFLAGS=$pkg_cv_Qt5Svg_CFLAGS
|
||||
Qt5Svg_LIBS=$pkg_cv_Qt5Svg_LIBS
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
|
||||
fi
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether QtDBus should be enabled" >&5
|
||||
$as_echo_n "checking whether QtDBus should be enabled... " >&6; }
|
||||
case "x$enable_qt_dbus" in #(
|
||||
@@ -4519,19 +4679,17 @@ esac
|
||||
|
||||
|
||||
|
||||
|
||||
# Check whether --with-boost was given.
|
||||
if test "${with_boost+set}" = set; then :
|
||||
withval=$with_boost;
|
||||
if test "$withval" = "no"; then
|
||||
want_boost="no"
|
||||
elif test "$withval" = "yes"; then
|
||||
want_boost="yes"
|
||||
ac_boost_path=""
|
||||
else
|
||||
want_boost="yes"
|
||||
ac_boost_path="$withval"
|
||||
fi
|
||||
case $withval in #(
|
||||
no) :
|
||||
want_boost="no";_AX_BOOST_BASE_boost_path="" ;; #(
|
||||
yes) :
|
||||
want_boost="yes";_AX_BOOST_BASE_boost_path="" ;; #(
|
||||
*) :
|
||||
want_boost="yes";_AX_BOOST_BASE_boost_path="$withval" ;;
|
||||
esac
|
||||
|
||||
else
|
||||
want_boost="yes"
|
||||
@@ -4543,78 +4701,121 @@ fi
|
||||
# Check whether --with-boost-libdir was given.
|
||||
if test "${with_boost_libdir+set}" = set; then :
|
||||
withval=$with_boost_libdir;
|
||||
if test -d "$withval"
|
||||
then
|
||||
ac_boost_lib_path="$withval"
|
||||
else
|
||||
as_fn_error $? "--with-boost-libdir expected directory name" "$LINENO" 5
|
||||
fi
|
||||
if test -d "$withval"; then :
|
||||
_AX_BOOST_BASE_boost_lib_path="$withval"
|
||||
else
|
||||
as_fn_error $? "--with-boost-libdir expected directory name" "$LINENO" 5
|
||||
fi
|
||||
|
||||
else
|
||||
ac_boost_lib_path=""
|
||||
|
||||
_AX_BOOST_BASE_boost_lib_path=""
|
||||
fi
|
||||
|
||||
|
||||
if test "x$want_boost" = "xyes"; then
|
||||
boost_lib_version_req=1.35
|
||||
boost_lib_version_req_shorten=`expr $boost_lib_version_req : '\([0-9]*\.[0-9]*\)'`
|
||||
boost_lib_version_req_major=`expr $boost_lib_version_req : '\([0-9]*\)'`
|
||||
boost_lib_version_req_minor=`expr $boost_lib_version_req : '[0-9]*\.\([0-9]*\)'`
|
||||
boost_lib_version_req_sub_minor=`expr $boost_lib_version_req : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
|
||||
if test "x$boost_lib_version_req_sub_minor" = "x" ; then
|
||||
boost_lib_version_req_sub_minor="0"
|
||||
fi
|
||||
WANT_BOOST_VERSION=`expr $boost_lib_version_req_major \* 100000 \+ $boost_lib_version_req_minor \* 100 \+ $boost_lib_version_req_sub_minor`
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for boostlib >= $boost_lib_version_req" >&5
|
||||
$as_echo_n "checking for boostlib >= $boost_lib_version_req... " >&6; }
|
||||
BOOST_LDFLAGS=""
|
||||
BOOST_CPPFLAGS=""
|
||||
if test "x$want_boost" = "xyes"; then :
|
||||
|
||||
|
||||
if test "x1.35" = "x"; then :
|
||||
_AX_BOOST_BASE_TONUMERICVERSION_req="1.20.0"
|
||||
else
|
||||
_AX_BOOST_BASE_TONUMERICVERSION_req="1.35"
|
||||
fi
|
||||
_AX_BOOST_BASE_TONUMERICVERSION_req_shorten=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req : '\([0-9]*\.[0-9]*\)'`
|
||||
_AX_BOOST_BASE_TONUMERICVERSION_req_major=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req : '\([0-9]*\)'`
|
||||
if test "x$_AX_BOOST_BASE_TONUMERICVERSION_req_major" = "x"; then :
|
||||
as_fn_error $? "You should at least specify libboost major version" "$LINENO" 5
|
||||
fi
|
||||
_AX_BOOST_BASE_TONUMERICVERSION_req_minor=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req : '[0-9]*\.\([0-9]*\)'`
|
||||
if test "x$_AX_BOOST_BASE_TONUMERICVERSION_req_minor" = "x"; then :
|
||||
_AX_BOOST_BASE_TONUMERICVERSION_req_minor="0"
|
||||
fi
|
||||
_AX_BOOST_BASE_TONUMERICVERSION_req_sub_minor=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
|
||||
if test "X$_AX_BOOST_BASE_TONUMERICVERSION_req_sub_minor" = "X"; then :
|
||||
_AX_BOOST_BASE_TONUMERICVERSION_req_sub_minor="0"
|
||||
fi
|
||||
_AX_BOOST_BASE_TONUMERICVERSION_RET=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req_major \* 100000 \+ $_AX_BOOST_BASE_TONUMERICVERSION_req_minor \* 100 \+ $_AX_BOOST_BASE_TONUMERICVERSION_req_sub_minor`
|
||||
WANT_BOOST_VERSION=$_AX_BOOST_BASE_TONUMERICVERSION_RET
|
||||
|
||||
succeeded=no
|
||||
|
||||
libsubdirs="lib"
|
||||
ax_arch=`uname -m`
|
||||
case $ax_arch in
|
||||
x86_64)
|
||||
libsubdirs="lib64 libx32 lib lib64"
|
||||
;;
|
||||
ppc64|s390x|sparc64|aarch64|ppc64le)
|
||||
libsubdirs="lib64 lib lib64 ppc64le"
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
libsubdirs="lib/${host_cpu}-${host_os} $libsubdirs"
|
||||
case ${host_cpu} in #(
|
||||
x86_64) :
|
||||
libsubdirs="lib64 libx32 lib lib64" ;; #(
|
||||
ppc64|s390x|sparc64|aarch64|ppc64le) :
|
||||
libsubdirs="lib64 lib lib64" ;; #(
|
||||
*) :
|
||||
libsubdirs="lib"
|
||||
;;
|
||||
esac
|
||||
|
||||
case ${host_cpu} in
|
||||
i?86)
|
||||
libsubdirs="lib/i386-${host_os} $libsubdirs"
|
||||
;;
|
||||
esac
|
||||
case ${host_cpu} in #(
|
||||
i?86) :
|
||||
multiarch_libsubdir="lib/i386-${host_os}" ;; #(
|
||||
*) :
|
||||
multiarch_libsubdir="lib/${host_cpu}-${host_os}"
|
||||
;;
|
||||
esac
|
||||
|
||||
if test "$ac_boost_path" != ""; then
|
||||
BOOST_CPPFLAGS="-I$ac_boost_path/include"
|
||||
for ac_boost_path_tmp in $libsubdirs; do
|
||||
if test -d "$ac_boost_path"/"$ac_boost_path_tmp" ; then
|
||||
BOOST_LDFLAGS="-L$ac_boost_path/$ac_boost_path_tmp"
|
||||
break
|
||||
fi
|
||||
done
|
||||
elif test "$cross_compiling" != yes; then
|
||||
for ac_boost_path_tmp in /usr /usr/local /opt /opt/local ; do
|
||||
if test -d "$ac_boost_path_tmp/include/boost" && test -r "$ac_boost_path_tmp/include/boost"; then
|
||||
for libsubdir in $libsubdirs ; do
|
||||
if ls "$ac_boost_path_tmp/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
|
||||
if test "x$_AX_BOOST_BASE_boost_path" != "x"; then :
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for boostlib >= 1.35 ($WANT_BOOST_VERSION) includes in \"$_AX_BOOST_BASE_boost_path/include\"" >&5
|
||||
$as_echo_n "checking for boostlib >= 1.35 ($WANT_BOOST_VERSION) includes in \"$_AX_BOOST_BASE_boost_path/include\"... " >&6; }
|
||||
if test -d "$_AX_BOOST_BASE_boost_path/include" && test -r "$_AX_BOOST_BASE_boost_path/include"; then :
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
BOOST_CPPFLAGS="-I$_AX_BOOST_BASE_boost_path/include"
|
||||
for _AX_BOOST_BASE_boost_path_tmp in $multiarch_libsubdir $libsubdirs; do
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for boostlib >= 1.35 ($WANT_BOOST_VERSION) lib path in \"$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp\"" >&5
|
||||
$as_echo_n "checking for boostlib >= 1.35 ($WANT_BOOST_VERSION) lib path in \"$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp\"... " >&6; }
|
||||
if test -d "$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp" && test -r "$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp" ; then :
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
BOOST_LDFLAGS="-L$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp";
|
||||
break;
|
||||
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
fi
|
||||
done
|
||||
else
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
fi
|
||||
|
||||
else
|
||||
|
||||
if test X"$cross_compiling" = Xyes; then
|
||||
search_libsubdirs=$multiarch_libsubdir
|
||||
else
|
||||
search_libsubdirs="$multiarch_libsubdir $libsubdirs"
|
||||
fi
|
||||
for _AX_BOOST_BASE_boost_path_tmp in /usr /usr/local /opt /opt/local ; do
|
||||
if test -d "$_AX_BOOST_BASE_boost_path_tmp/include/boost" && test -r "$_AX_BOOST_BASE_boost_path_tmp/include/boost" ; then
|
||||
for libsubdir in $search_libsubdirs ; do
|
||||
if ls "$_AX_BOOST_BASE_boost_path_tmp/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
|
||||
done
|
||||
BOOST_LDFLAGS="-L$ac_boost_path_tmp/$libsubdir"
|
||||
BOOST_CPPFLAGS="-I$ac_boost_path_tmp/include"
|
||||
BOOST_LDFLAGS="-L$_AX_BOOST_BASE_boost_path_tmp/$libsubdir"
|
||||
BOOST_CPPFLAGS="-I$_AX_BOOST_BASE_boost_path_tmp/include"
|
||||
break;
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
if test "$ac_boost_lib_path" != ""; then
|
||||
BOOST_LDFLAGS="-L$ac_boost_lib_path"
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$_AX_BOOST_BASE_boost_lib_path" != "x"; then :
|
||||
BOOST_LDFLAGS="-L$_AX_BOOST_BASE_boost_lib_path"
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for boostlib >= 1.35 ($WANT_BOOST_VERSION)" >&5
|
||||
$as_echo_n "checking for boostlib >= 1.35 ($WANT_BOOST_VERSION)... " >&6; }
|
||||
CPPFLAGS_SAVED="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
|
||||
export CPPFLAGS
|
||||
@@ -4633,17 +4834,13 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
#include <boost/version.hpp>
|
||||
#include <boost/version.hpp>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
#if BOOST_VERSION >= $WANT_BOOST_VERSION
|
||||
// Everything is okay
|
||||
#else
|
||||
# error Boost version is too old
|
||||
#endif
|
||||
(void) ((void)sizeof(char[1 - 2*!!((BOOST_VERSION) < ($WANT_BOOST_VERSION))]));
|
||||
|
||||
;
|
||||
return 0;
|
||||
@@ -4667,39 +4864,47 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
|
||||
|
||||
|
||||
|
||||
if test "x$succeeded" != "xyes"; then
|
||||
if test "x$succeeded" != "xyes" ; then
|
||||
CPPFLAGS="$CPPFLAGS_SAVED"
|
||||
LDFLAGS="$LDFLAGS_SAVED"
|
||||
BOOST_CPPFLAGS=
|
||||
BOOST_LDFLAGS=
|
||||
if test -z "$_AX_BOOST_BASE_boost_lib_path" ; then
|
||||
BOOST_LDFLAGS=
|
||||
fi
|
||||
_version=0
|
||||
if test "$ac_boost_path" != ""; then
|
||||
if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then
|
||||
for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do
|
||||
_version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
|
||||
if test -n "$_AX_BOOST_BASE_boost_path" ; then
|
||||
if test -d "$_AX_BOOST_BASE_boost_path" && test -r "$_AX_BOOST_BASE_boost_path"; then
|
||||
for i in `ls -d $_AX_BOOST_BASE_boost_path/include/boost-* 2>/dev/null`; do
|
||||
_version_tmp=`echo $i | sed "s#$_AX_BOOST_BASE_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
|
||||
V_CHECK=`expr $_version_tmp \> $_version`
|
||||
if test "$V_CHECK" = "1" ; then
|
||||
if test "x$V_CHECK" = "x1" ; then
|
||||
_version=$_version_tmp
|
||||
fi
|
||||
VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
|
||||
BOOST_CPPFLAGS="-I$ac_boost_path/include/boost-$VERSION_UNDERSCORE"
|
||||
BOOST_CPPFLAGS="-I$_AX_BOOST_BASE_boost_path/include/boost-$VERSION_UNDERSCORE"
|
||||
done
|
||||
if test -z "$BOOST_CPPFLAGS"; then
|
||||
if test -d "$ac_boost_path/boost" && test -r "$ac_boost_path/boost"; then
|
||||
BOOST_CPPFLAGS="-I$ac_boost_path"
|
||||
if test -d "$_AX_BOOST_BASE_boost_path/boost" && test -r "$_AX_BOOST_BASE_boost_path/boost"; then
|
||||
BOOST_CPPFLAGS="-I$_AX_BOOST_BASE_boost_path"
|
||||
fi
|
||||
fi
|
||||
if test -n "$BOOST_CPPFLAGS" && test -z "$BOOST_LDFLAGS"; then
|
||||
for libsubdir in $libsubdirs ; do
|
||||
if ls "$_AX_BOOST_BASE_boost_path/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
|
||||
done
|
||||
BOOST_LDFLAGS="-L$_AX_BOOST_BASE_boost_path/$libsubdir"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
if test "$cross_compiling" != yes; then
|
||||
for ac_boost_path in /usr /usr/local /opt /opt/local ; do
|
||||
if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then
|
||||
for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do
|
||||
_version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
|
||||
if test "x$cross_compiling" != "xyes" ; then
|
||||
for _AX_BOOST_BASE_boost_path in /usr /usr/local /opt /opt/local ; do
|
||||
if test -d "$_AX_BOOST_BASE_boost_path" && test -r "$_AX_BOOST_BASE_boost_path" ; then
|
||||
for i in `ls -d $_AX_BOOST_BASE_boost_path/include/boost-* 2>/dev/null`; do
|
||||
_version_tmp=`echo $i | sed "s#$_AX_BOOST_BASE_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
|
||||
V_CHECK=`expr $_version_tmp \> $_version`
|
||||
if test "$V_CHECK" = "1" ; then
|
||||
if test "x$V_CHECK" = "x1" ; then
|
||||
_version=$_version_tmp
|
||||
best_path=$ac_boost_path
|
||||
best_path=$_AX_BOOST_BASE_boost_path
|
||||
fi
|
||||
done
|
||||
fi
|
||||
@@ -4707,7 +4912,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
|
||||
|
||||
VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
|
||||
BOOST_CPPFLAGS="-I$best_path/include/boost-$VERSION_UNDERSCORE"
|
||||
if test "$ac_boost_lib_path" = ""; then
|
||||
if test -z "$_AX_BOOST_BASE_boost_lib_path" ; then
|
||||
for libsubdir in $libsubdirs ; do
|
||||
if ls "$best_path/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
|
||||
done
|
||||
@@ -4715,7 +4920,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$BOOST_ROOT" != "x"; then
|
||||
if test -n "$BOOST_ROOT" ; then
|
||||
for libsubdir in $libsubdirs ; do
|
||||
if ls "$BOOST_ROOT/stage/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
|
||||
done
|
||||
@@ -4724,7 +4929,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
|
||||
stage_version=`echo $version_dir | sed 's/boost_//' | sed 's/_/./g'`
|
||||
stage_version_shorten=`expr $stage_version : '\([0-9]*\.[0-9]*\)'`
|
||||
V_CHECK=`expr $stage_version_shorten \>\= $_version`
|
||||
if test "$V_CHECK" = "1" -a "$ac_boost_lib_path" = "" ; then
|
||||
if test "x$V_CHECK" = "x1" && test -z "$_AX_BOOST_BASE_boost_lib_path" ; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: We will use a staged boost library from $BOOST_ROOT" >&5
|
||||
$as_echo "$as_me: We will use a staged boost library from $BOOST_ROOT" >&6;}
|
||||
BOOST_CPPFLAGS="-I$BOOST_ROOT"
|
||||
@@ -4748,17 +4953,13 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
#include <boost/version.hpp>
|
||||
#include <boost/version.hpp>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
#if BOOST_VERSION >= $WANT_BOOST_VERSION
|
||||
// Everything is okay
|
||||
#else
|
||||
# error Boost version is too old
|
||||
#endif
|
||||
(void) ((void)sizeof(char[1 - 2*!!((BOOST_VERSION) < ($WANT_BOOST_VERSION))]));
|
||||
|
||||
;
|
||||
return 0;
|
||||
@@ -4781,41 +4982,71 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
|
||||
|
||||
fi
|
||||
|
||||
if test "$succeeded" != "yes" ; then
|
||||
if test "$_version" = "0" ; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: We could not detect the boost libraries (version $boost_lib_version_req_shorten or higher). If you have a staged boost library (still not installed) please specify \$BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in <boost/version.hpp>. See http://randspringer.de/boost for more documentation." >&5
|
||||
$as_echo "$as_me: We could not detect the boost libraries (version $boost_lib_version_req_shorten or higher). If you have a staged boost library (still not installed) please specify \$BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in <boost/version.hpp>. See http://randspringer.de/boost for more documentation." >&6;}
|
||||
if test "x$succeeded" != "xyes" ; then
|
||||
if test "x$_version" = "x0" ; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: We could not detect the boost libraries (version 1.35 or higher). If you have a staged boost library (still not installed) please specify \$BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in <boost/version.hpp>. See http://randspringer.de/boost for more documentation." >&5
|
||||
$as_echo "$as_me: We could not detect the boost libraries (version 1.35 or higher). If you have a staged boost library (still not installed) please specify \$BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in <boost/version.hpp>. See http://randspringer.de/boost for more documentation." >&6;}
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Your boost libraries seems to old (version $_version)." >&5
|
||||
$as_echo "$as_me: Your boost libraries seems to old (version $_version)." >&6;}
|
||||
fi
|
||||
# execute ACTION-IF-NOT-FOUND (if present):
|
||||
:
|
||||
as_fn_error $? "Could not find Boost" "$LINENO" 5
|
||||
else
|
||||
|
||||
|
||||
|
||||
$as_echo "#define HAVE_BOOST /**/" >>confdefs.h
|
||||
|
||||
# execute ACTION-IF-FOUND (if present):
|
||||
:
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Boost CPPFLAGS: \"$BOOST_CPPFLAGS\"
|
||||
Boost LDFLAGS: \"$BOOST_LDFLAGS\"" >&5
|
||||
$as_echo "$as_me: Boost CPPFLAGS: \"$BOOST_CPPFLAGS\"
|
||||
Boost LDFLAGS: \"$BOOST_LDFLAGS\"" >&6;}
|
||||
fi
|
||||
|
||||
CPPFLAGS="$CPPFLAGS_SAVED"
|
||||
LDFLAGS="$LDFLAGS_SAVED"
|
||||
|
||||
|
||||
fi
|
||||
|
||||
|
||||
# HAVE_BOOST is set to an empty value when Boost is found. I don't know
|
||||
# how to test for a set vs unset variable.
|
||||
if test "x$BOOST_CPPFLAGS" = "x"; then :
|
||||
as_fn_error $? "Could not find Boost" "$LINENO" 5
|
||||
|
||||
CPPFLAGS="$BOOST_CPPFLAGS $CPPFLAGS"
|
||||
LDFLAGS="$BOOST_LDFLAGS $LDFLAGS"
|
||||
|
||||
# add workaround for problematic boost version
|
||||
ac_ext=cpp
|
||||
ac_cpp='$CXXCPP $CPPFLAGS'
|
||||
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
|
||||
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
|
||||
|
||||
# taken from ax_boost_base.m4
|
||||
|
||||
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <boost/version.hpp>
|
||||
int
|
||||
main ()
|
||||
{
|
||||
(void) ((void)sizeof(char[1 - 2*!!((BOOST_VERSION) < (106000))]));
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_cxx_try_compile "$LINENO"; then :
|
||||
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Boost CPPFLAGS: $BOOST_CPPFLAGS" >&5
|
||||
$as_echo "$as_me: Boost CPPFLAGS: $BOOST_CPPFLAGS" >&6;}
|
||||
CPPFLAGS="$BOOST_CPPFLAGS $CPPFLAGS"
|
||||
LDFLAGS="$BOOST_LDFLAGS $LDFLAGS"
|
||||
QBT_ADD_DEFINES="$QBT_ADD_DEFINES BOOST_NO_CXX11_RVALUE_REFERENCES"
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
ac_ext=cpp
|
||||
ac_cpp='$CXXCPP $CPPFLAGS'
|
||||
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
|
||||
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -5059,15 +5290,9 @@ fi
|
||||
LDFLAGS="$LDFLAGS_SAVED"
|
||||
fi
|
||||
|
||||
# HAVE_BOOST_SYSTEM is set to an empty value when Boost.System is found.
|
||||
# I don't know how to test for a set vs unset variable.
|
||||
if test "x$BOOST_SYSTEM_LIB" = "x"; then :
|
||||
as_fn_error $? "Could not find Boost.System" "$LINENO" 5
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Boost.System LIB: $BOOST_SYSTEM_LIB" >&5
|
||||
$as_echo "$as_me: Boost.System LIB: $BOOST_SYSTEM_LIB" >&6;}
|
||||
LIBS="$BOOST_SYSTEM_LIB $LIBS"
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Boost.System LIB: \"$BOOST_SYSTEM_LIB\"" >&5
|
||||
$as_echo "$as_me: Boost.System LIB: \"$BOOST_SYSTEM_LIB\"" >&6;}
|
||||
LIBS="$BOOST_SYSTEM_LIB $LIBS"
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which qtsingleapplication to use" >&5
|
||||
$as_echo_n "checking which qtsingleapplication to use... " >&6; }
|
||||
@@ -5352,7 +5577,7 @@ extract() {
|
||||
new_line='
|
||||
'
|
||||
# Convert " -" to "\n" if not between quotes and remove possible leading white spaces
|
||||
string=$(echo " $*" | $SED -e "s: -:\\${new_line}:g" -e 's:"\(.*\)\n\(.*\)":\"\1 -\2":g' -e "s:'\(.*\)\n\(.*\)':\'\1 -\2':g" -e 's/^[:space:]*//')
|
||||
string=$(echo " $*" | $SED -e "s: -:\\${new_line}:g" -e 's:"\(.*\)\n\(.*\)":\"\1 -\2":g' -e "s:'\(.*\)\n\(.*\)':\'\1 -\2':g" -e 's/^[[:space:]]*//')
|
||||
SAVEIFS=$IFS
|
||||
IFS=$(printf "\n\b")
|
||||
for i in $string; do
|
||||
@@ -5366,9 +5591,8 @@ extract() {
|
||||
IFS=$SAVEIFS
|
||||
}
|
||||
|
||||
extract $CPPFLAGS
|
||||
extract "$CFLAGS $CPPFLAGS $CXXFLAGS"
|
||||
QBT_ADD_DEFINES="$QBT_ADD_DEFINES $QBT_CONF_DEFINES"
|
||||
QBT_CONF_EXTRA_CFLAGS="$QBT_CONF_EXTRA_CFLAGS $CXXFLAGS"
|
||||
|
||||
# Substitute the values of these vars in conf.pri.in
|
||||
|
||||
@@ -5950,7 +6174,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
||||
# report actual input values of CONFIG_FILES etc. instead of their
|
||||
# values after options handling.
|
||||
ac_log="
|
||||
This file was extended by qbittorrent $as_me v3.2.0alpha, which was
|
||||
This file was extended by qbittorrent $as_me v4.1.4, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
@@ -6002,13 +6226,13 @@ Configuration commands:
|
||||
$config_commands
|
||||
|
||||
Report bugs to <bugs.qbittorrent.org>.
|
||||
qbittorrent home page: <http://www.qbittorrent.org/>."
|
||||
qbittorrent home page: <https://www.qbittorrent.org/>."
|
||||
|
||||
_ACEOF
|
||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
||||
ac_cs_version="\\
|
||||
qbittorrent config.status v3.2.0alpha
|
||||
qbittorrent config.status v4.1.4
|
||||
configured by $0, generated by GNU Autoconf 2.69,
|
||||
with options \\"\$ac_cs_config\\"
|
||||
|
||||
@@ -7265,7 +7489,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
||||
# report actual input values of CONFIG_FILES etc. instead of their
|
||||
# values after options handling.
|
||||
ac_log="
|
||||
This file was extended by qbittorrent $as_me v3.2.0alpha, which was
|
||||
This file was extended by qbittorrent $as_me v4.1.4, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
@@ -7317,13 +7541,13 @@ Configuration commands:
|
||||
$config_commands
|
||||
|
||||
Report bugs to <bugs.qbittorrent.org>.
|
||||
qbittorrent home page: <http://www.qbittorrent.org/>."
|
||||
qbittorrent home page: <https://www.qbittorrent.org/>."
|
||||
|
||||
_ACEOF
|
||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
||||
ac_cs_version="\\
|
||||
qbittorrent config.status v3.2.0alpha
|
||||
qbittorrent config.status v4.1.4
|
||||
configured by $0, generated by GNU Autoconf 2.69,
|
||||
with options \\"\$ac_cs_config\\"
|
||||
|
||||
@@ -8024,4 +8248,3 @@ else
|
||||
as_fn_error $? "Failed running $QT_QMAKE to generate the makefile" "$LINENO" 5
|
||||
fi
|
||||
$as_echo
|
||||
|
||||
|
||||
70
configure.ac
@@ -1,4 +1,4 @@
|
||||
AC_INIT([qbittorrent], [v3.2.0alpha], [bugs.qbittorrent.org], [], [http://www.qbittorrent.org/])
|
||||
AC_INIT([qbittorrent], [v4.1.4], [bugs.qbittorrent.org], [], [https://www.qbittorrent.org/])
|
||||
AC_CONFIG_AUX_DIR([build-aux])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
AC_PROG_CC
|
||||
@@ -24,6 +24,12 @@ AC_ARG_ENABLE(debug,
|
||||
[],
|
||||
[enable_debug=no])
|
||||
|
||||
AC_ARG_ENABLE(stacktrace,
|
||||
[AS_HELP_STRING([--enable-stacktrace],
|
||||
[Enable stacktrace feature (default=auto)])],
|
||||
[],
|
||||
[enable_stacktrace=auto])
|
||||
|
||||
AC_ARG_ENABLE(gui,
|
||||
[AS_HELP_STRING([--disable-gui],
|
||||
[Disable the GUI for headless running. Disables QtDBus and the GeoIP Database.])],
|
||||
@@ -80,6 +86,23 @@ AS_CASE(["x$enable_debug"],
|
||||
[AC_MSG_RESULT([$enable_debug])
|
||||
AC_MSG_ERROR([Unknown option "$enable_debug". Use either "yes" or "no".])])
|
||||
|
||||
AC_MSG_CHECKING([whether to enable the stacktrace feature])
|
||||
AS_CASE(["x$enable_stacktrace"],
|
||||
["xno"],
|
||||
[AC_MSG_RESULT([no])
|
||||
QBT_REMOVE_CONFIG="$QBT_REMOVE_CONFIG stacktrace"],
|
||||
["xyes"],
|
||||
[AC_MSG_RESULT([yes])
|
||||
QBT_ADD_CONFIG="$QBT_ADD_CONFIG stacktrace"],
|
||||
["xauto"],
|
||||
[AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <execinfo.h>]])],
|
||||
[AC_MSG_RESULT([yes])
|
||||
QBT_ADD_CONFIG="$QBT_ADD_CONFIG stacktrace"],
|
||||
[AC_MSG_RESULT([no])
|
||||
QBT_REMOVE_CONFIG="$QBT_REMOVE_CONFIG stacktrace"])],
|
||||
[AC_MSG_RESULT([$enable_stacktrace])
|
||||
AC_MSG_ERROR([Unknown option "$enable_stacktrace". Use either "yes" or "no".])])
|
||||
|
||||
AC_MSG_CHECKING([whether to enable the GUI])
|
||||
AS_CASE(["x$enable_gui"],
|
||||
["xyes"],
|
||||
@@ -116,6 +139,12 @@ AS_CASE(["x$enable_webui"],
|
||||
AC_MSG_ERROR([Unknown option "$enable_webui". Use either "yes" or "no".])])
|
||||
|
||||
FIND_QT5()
|
||||
AS_IF([test "x$QT_QMAKE" = "x"],
|
||||
[AC_MSG_ERROR([Could not find qmake])
|
||||
])
|
||||
AS_IF([test "x$enable_gui" = "xyes"],
|
||||
[PKG_CHECK_MODULES(Qt5Svg, [Qt5Svg >= 5.5.1])
|
||||
])
|
||||
AC_MSG_CHECKING([whether QtDBus should be enabled])
|
||||
AS_CASE(["x$enable_qt_dbus"],
|
||||
["xyes"],
|
||||
@@ -132,22 +161,27 @@ AS_CASE(["x$enable_qt_dbus"],
|
||||
AC_MSG_ERROR([Unknown option "$enable_qt_dbus". Use either "yes" or "no".])])
|
||||
|
||||
|
||||
AX_BOOST_BASE([1.35])
|
||||
# HAVE_BOOST is set to an empty value when Boost is found. I don't know
|
||||
# how to test for a set vs unset variable.
|
||||
AS_IF([test "x$BOOST_CPPFLAGS" = "x"],
|
||||
[AC_MSG_ERROR([Could not find Boost])],
|
||||
[AC_MSG_NOTICE([Boost CPPFLAGS: $BOOST_CPPFLAGS])
|
||||
CPPFLAGS="$BOOST_CPPFLAGS $CPPFLAGS"
|
||||
LDFLAGS="$BOOST_LDFLAGS $LDFLAGS"])
|
||||
AX_BOOST_BASE([1.35],
|
||||
[AC_MSG_NOTICE([Boost CPPFLAGS: "$BOOST_CPPFLAGS"
|
||||
Boost LDFLAGS: "$BOOST_LDFLAGS"])],
|
||||
[AC_MSG_ERROR([Could not find Boost])])
|
||||
CPPFLAGS="$BOOST_CPPFLAGS $CPPFLAGS"
|
||||
LDFLAGS="$BOOST_LDFLAGS $LDFLAGS"
|
||||
|
||||
# add workaround for problematic boost version
|
||||
AC_LANG_PUSH(C++)
|
||||
# taken from ax_boost_base.m4
|
||||
m4_define([DETECT_BOOST_VERSION_PROGRAM],
|
||||
[AC_LANG_PROGRAM([[#include <boost/version.hpp>]],
|
||||
[[(void) ((void)sizeof(char[1 - 2*!!((BOOST_VERSION) < ($1))]));]])])
|
||||
|
||||
AC_COMPILE_IFELSE([DETECT_BOOST_VERSION_PROGRAM(106000)], [],
|
||||
[QBT_ADD_DEFINES="$QBT_ADD_DEFINES BOOST_NO_CXX11_RVALUE_REFERENCES"])
|
||||
AC_LANG_POP([C++])
|
||||
|
||||
AX_BOOST_SYSTEM()
|
||||
# HAVE_BOOST_SYSTEM is set to an empty value when Boost.System is found.
|
||||
# I don't know how to test for a set vs unset variable.
|
||||
AS_IF([test "x$BOOST_SYSTEM_LIB" = "x"],
|
||||
[AC_MSG_ERROR([Could not find Boost.System])],
|
||||
[AC_MSG_NOTICE([Boost.System LIB: $BOOST_SYSTEM_LIB])
|
||||
LIBS="$BOOST_SYSTEM_LIB $LIBS"])
|
||||
AC_MSG_NOTICE([Boost.System LIB: "$BOOST_SYSTEM_LIB"])
|
||||
LIBS="$BOOST_SYSTEM_LIB $LIBS"
|
||||
|
||||
AC_MSG_CHECKING([which qtsingleapplication to use])
|
||||
AS_CASE(["x$with_qtsingleapplication"],
|
||||
@@ -190,7 +224,7 @@ extract() {
|
||||
new_line='
|
||||
'
|
||||
# Convert " -" to "\n" if not between quotes and remove possible leading white spaces
|
||||
string=$(echo " $*" | $SED -e "s: -:\\${new_line}:g" -e 's:"\(.*\)\n\(.*\)":\"\1 -\2":g' -e "s:'\(.*\)\n\(.*\)':\'\1 -\2':g" -e 's/^[[:space:]]*//')
|
||||
string=$(echo " $*" | $SED -e "s: -:\\${new_line}:g" -e 's:"\(.*\)\n\(.*\)":\"\1 -\2":g' -e "s:'\(.*\)\n\(.*\)':\'\1 -\2':g" -e 's/^[[[:space:]]]*//')
|
||||
SAVEIFS=$IFS
|
||||
IFS=$(printf "\n\b")
|
||||
for i in $string; do
|
||||
@@ -204,9 +238,8 @@ extract() {
|
||||
IFS=$SAVEIFS
|
||||
}
|
||||
|
||||
extract $CPPFLAGS
|
||||
extract "$CFLAGS $CPPFLAGS $CXXFLAGS"
|
||||
QBT_ADD_DEFINES="$QBT_ADD_DEFINES $QBT_CONF_DEFINES"
|
||||
QBT_CONF_EXTRA_CFLAGS="$QBT_CONF_EXTRA_CFLAGS $CXXFLAGS"
|
||||
|
||||
# Substitute the values of these vars in conf.pri.in
|
||||
AC_SUBST(QBT_CONF_INCLUDES)
|
||||
@@ -234,4 +267,3 @@ AS_IF([test "x$ret" = "x0"],
|
||||
[AC_MSG_NOTICE([Good, your configure finished.])],
|
||||
[AC_MSG_ERROR([Failed running $QT_QMAKE to generate the makefile])])
|
||||
AS_ECHO()
|
||||
|
||||
|
||||
2
dist/CMakeLists.txt
vendored
@@ -1,3 +1,5 @@
|
||||
find_package(Qt5Widgets ${requiredQtVersion}) # to conditionally install desktop-related files
|
||||
|
||||
if (APPLE)
|
||||
add_subdirectory(mac)
|
||||
else (APPLE)
|
||||
|
||||
4
dist/mac/Info.plist
vendored
@@ -45,7 +45,7 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>3.4.0</string>
|
||||
<string>4.1.4</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>qBit</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
@@ -59,7 +59,7 @@
|
||||
<key>NSAppleScriptEnabled</key>
|
||||
<string>YES</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright © 2006-2017 The qBittorrent project</string>
|
||||
<string>Copyright © 2006-2018 The qBittorrent project</string>
|
||||
<key>UTExportedTypeDeclarations</key>
|
||||
<array>
|
||||
<dict>
|
||||
|
||||
BIN
dist/mac/qBitTorrentDocument.icns
vendored
BIN
dist/mac/qbittorrent_mac.icns
vendored
35
dist/unix/CMakeLists.txt
vendored
@@ -1,35 +1,37 @@
|
||||
if (SYSTEMD)
|
||||
find_package(Systemd)
|
||||
if (SYSTEMD_FOUND)
|
||||
if (NOT Qt5Widgets_FOUND)
|
||||
feature_option(SYSTEMD "Install systemd service file (headless only)" OFF)
|
||||
if (SYSTEMD)
|
||||
if (NOT Systemd_SERVICES_INSTALL_DIR)
|
||||
find_package(Systemd)
|
||||
if (NOT Systemd_FOUND)
|
||||
message(FATAL_ERROR "Could not locate systemd services install dir."
|
||||
" Either pass -DSystemd_SERVICES_INSTALL_DIR=/path/to/systemd/services option or install systemd pkg-config")
|
||||
endif(NOT Systemd_FOUND)
|
||||
endif(NOT Systemd_SERVICES_INSTALL_DIR)
|
||||
set(EXPAND_BINDIR ${CMAKE_INSTALL_FULL_BINDIR})
|
||||
configure_file(systemd/qbittorrent-nox@.service.in ${CMAKE_CURRENT_BINARY_DIR}/qbittorrent-nox@.service @ONLY)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/qbittorrent-nox@.service
|
||||
DESTINATION ${SYSTEMD_SERVICES_INSTALL_DIR}
|
||||
DESTINATION ${Systemd_SERVICES_INSTALL_DIR}
|
||||
COMPONENT data)
|
||||
endif(SYSTEMD_FOUND)
|
||||
endif(SYSTEMD)
|
||||
endif(SYSTEMD)
|
||||
endif()
|
||||
|
||||
|
||||
if (GUI)
|
||||
if (Qt5Widgets_FOUND)
|
||||
list(APPEND MAN_FILES ${qBittorrent_SOURCE_DIR}/doc/qbittorrent.1)
|
||||
else (GUI)
|
||||
else (Qt5Widgets_FOUND)
|
||||
list(APPEND MAN_FILES ${qBittorrent_SOURCE_DIR}/doc/qbittorrent-nox.1)
|
||||
endif (GUI)
|
||||
endif (Qt5Widgets_FOUND)
|
||||
|
||||
install(FILES ${MAN_FILES}
|
||||
DESTINATION ${CMAKE_INSTALL_MANDIR}/man1
|
||||
COMPONENT doc)
|
||||
|
||||
if (GUI)
|
||||
if (Qt5Widgets_FOUND)
|
||||
install(DIRECTORY menuicons/
|
||||
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor
|
||||
FILES_MATCHING PATTERN "*.png")
|
||||
|
||||
install(FILES ${qBittorrent_SOURCE_DIR}/src/icons/qbittorrent.png
|
||||
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/pixmaps/
|
||||
COMPONENT data)
|
||||
|
||||
install(FILES ${qBittorrent_SOURCE_DIR}/src/icons/qbittorrent.desktop
|
||||
install(FILES qbittorrent.desktop
|
||||
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications/
|
||||
COMPONENT data)
|
||||
|
||||
@@ -38,6 +40,7 @@ if (GUI)
|
||||
COMPONENT data)
|
||||
|
||||
install(FILES
|
||||
${qBittorrent_SOURCE_DIR}/src/icons/skin/qbittorrent-tray.svg
|
||||
${qBittorrent_SOURCE_DIR}/src/icons/skin/qbittorrent-tray-dark.svg
|
||||
${qBittorrent_SOURCE_DIR}/src/icons/skin/qbittorrent-tray-light.svg
|
||||
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/status
|
||||
|
||||
BIN
dist/unix/menuicons/128x128/apps/qbittorrent.png
vendored
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 7.6 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 7.6 KiB |
BIN
dist/unix/menuicons/16x16/apps/qbittorrent.png
vendored
|
Before Width: | Height: | Size: 893 B After Width: | Height: | Size: 986 B |
|
Before Width: | Height: | Size: 893 B After Width: | Height: | Size: 986 B |
BIN
dist/unix/menuicons/192x192/apps/qbittorrent.png
vendored
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 11 KiB |
BIN
dist/unix/menuicons/22x22/apps/qbittorrent.png
vendored
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.1 KiB |
BIN
dist/unix/menuicons/24x24/apps/qbittorrent.png
vendored
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.2 KiB |
BIN
dist/unix/menuicons/32x32/apps/qbittorrent.png
vendored
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 1.7 KiB |
BIN
dist/unix/menuicons/36x36/apps/qbittorrent.png
vendored
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.0 KiB |
BIN
dist/unix/menuicons/48x48/apps/qbittorrent.png
vendored
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 2.9 KiB |
BIN
dist/unix/menuicons/64x64/apps/qbittorrent.png
vendored
|
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 3.8 KiB |
BIN
dist/unix/menuicons/72x72/apps/qbittorrent.png
vendored
|
Before Width: | Height: | Size: 8.9 KiB After Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 8.9 KiB After Width: | Height: | Size: 4.2 KiB |
BIN
dist/unix/menuicons/96x96/apps/qbittorrent.png
vendored
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 5.6 KiB |
4
dist/unix/qbittorrent.appdata.xml
vendored
@@ -11,7 +11,7 @@
|
||||
Aiming to be a good alternative to all other bittorrent clients out
|
||||
there, qBittorrent is fast, stable and provides unicode support as well
|
||||
as many other features. Additionally, qBittorrent runs and provides those
|
||||
same features on all major platforms (Linux, Mac OS X, Windows, OS/2, FreeBSD).
|
||||
same features on all major platforms (Linux, Mac OS X, Windows, FreeBSD).
|
||||
</p>
|
||||
<p>
|
||||
It is programmed in C++ / Qt and uses libtorrent (sometimes called
|
||||
@@ -56,7 +56,7 @@
|
||||
</image>
|
||||
</screenshot>
|
||||
</screenshots>
|
||||
<url type="homepage">http://www.qbittorrent.org/</url>
|
||||
<url type="homepage">https://www.qbittorrent.org/</url>
|
||||
<update_contact>sledgehammer999@qbittorrent.org</update_contact>
|
||||
<developer_name>The qBittorrent Project</developer_name>
|
||||
<url type="bugtracker">http://bugs.qbittorrent.org/</url>
|
||||
|
||||
2
dist/windows/installer.nsi
vendored
@@ -86,7 +86,7 @@ Section $(inst_qbt_req) ;"qBittorrent (required)"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\qBittorrent" "UninstallString" '"$INSTDIR\uninst.exe"'
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\qBittorrent" "DisplayIcon" '"$INSTDIR\qbittorrent.exe",0'
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\qBittorrent" "Publisher" "The qBittorrent project"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\qBittorrent" "URLInfoAbout" "http://www.qbittorrent.org"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\qBittorrent" "URLInfoAbout" "https://www.qbittorrent.org"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\qBittorrent" "DisplayVersion" "${PROG_VERSION}"
|
||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\qBittorrent" "NoModify" 1
|
||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\qBittorrent" "NoRepair" 1
|
||||
|
||||
BIN
dist/windows/nsis plugins/FindProcDLL_mod_by_hnedka.7z
vendored
Normal file
4
dist/windows/options.nsi
vendored
@@ -27,7 +27,7 @@ XPStyle on
|
||||
!define CSIDL_LOCALAPPDATA '0x1C' ;Local Application Data path
|
||||
|
||||
; Program specific
|
||||
!define PROG_VERSION "3.4.0"
|
||||
!define PROG_VERSION "4.1.4"
|
||||
|
||||
!define MUI_FINISHPAGE_RUN
|
||||
!define MUI_FINISHPAGE_RUN_FUNCTION PageFinishRun
|
||||
@@ -50,7 +50,7 @@ XPStyle on
|
||||
;Installer Version Information
|
||||
VIAddVersionKey "ProductName" "qBittorrent"
|
||||
VIAddVersionKey "CompanyName" "The qBittorrent project"
|
||||
VIAddVersionKey "LegalCopyright" "Copyright ©2006-2017 The qBittorrent project"
|
||||
VIAddVersionKey "LegalCopyright" "Copyright ©2006-2018 The qBittorrent project"
|
||||
VIAddVersionKey "FileDescription" "qBittorrent - A Bittorrent Client"
|
||||
VIAddVersionKey "FileVersion" "${PROG_VERSION}"
|
||||
|
||||
|
||||
2
dist/windows/qt.conf
vendored
@@ -2,4 +2,4 @@
|
||||
Translations = translations
|
||||
|
||||
[Platforms]
|
||||
WindowsArguments = dpiawareness=0
|
||||
;WindowsArguments = dpiawareness=1
|
||||
|
||||
187
install.os2
@@ -1,187 +0,0 @@
|
||||
QBittorrent installation
|
||||
|
||||
|
||||
|
||||
0. CONTENTS OF THIS FILE
|
||||
========================
|
||||
|
||||
1. INTRODUCTION
|
||||
|
||||
2. REQUIREMENTS
|
||||
|
||||
3. INSTALLATION
|
||||
|
||||
4. BUGREPORTS
|
||||
|
||||
5. CREDITS
|
||||
|
||||
6. SUPPORT AND DONATIONS
|
||||
|
||||
7. HISTORY
|
||||
|
||||
|
||||
1. INTRODUCTION
|
||||
===============
|
||||
|
||||
Welcome to QBittorrent port for OS/2 and eComStation.
|
||||
|
||||
|
||||
2. REQUIREMENTS
|
||||
===============
|
||||
|
||||
The following requirements can be installed either by rpm or by zip files.
|
||||
|
||||
RPM Installation:
|
||||
|
||||
klibc
|
||||
-----
|
||||
|
||||
1. yum install libc
|
||||
|
||||
openssl 1.0
|
||||
-----------
|
||||
|
||||
1. yum install openssl
|
||||
|
||||
pthread
|
||||
-------
|
||||
|
||||
1. yum install pthread
|
||||
|
||||
GCC4Core
|
||||
--------
|
||||
|
||||
1. yum install libgcc
|
||||
2. yum install gcc-stack-protector
|
||||
3. yum install gcc-stdc++-shared-library
|
||||
4. yum install gcc-supc++-shared-library
|
||||
|
||||
Qt4 dll
|
||||
-------
|
||||
|
||||
1. yum install libqt4
|
||||
|
||||
|
||||
ZIP Installation:
|
||||
|
||||
klibc
|
||||
-----
|
||||
|
||||
1. Download klibc 0.6.5 or better (see http://svn.netlabs.org/libc for more information)
|
||||
2. Install the files to your libpath eg x:\ecs\dll
|
||||
|
||||
openssl 1.0
|
||||
-----------
|
||||
|
||||
1. Download the zip file from http://rpm.netlabs.org/release/00/zip
|
||||
2. Install the files to your libpath eg. x:\ecs\dll
|
||||
|
||||
pthread
|
||||
-------
|
||||
|
||||
1. Download pthread 2012-03-13 or better from http://rpm.netlabs.org/release/00/zip
|
||||
2. Install the files to your libpath eg. x:\ecs\dll
|
||||
|
||||
GCC4Core
|
||||
--------
|
||||
|
||||
1. Download GCC4Core 1.2.1 or better from http://ftp.netlabs.org/pub/gcc
|
||||
2. Install the files to your libpath eg. x:\ecs\dll
|
||||
|
||||
Qt4 dll
|
||||
-------
|
||||
|
||||
1. Download Qt4 4.7.3 or better (see http://svn.netlabs.org/qt4 for more information)
|
||||
2. Install the files according to the readme
|
||||
|
||||
|
||||
3. INSTALLATION
|
||||
===============
|
||||
|
||||
To install QBittorrent, do the following:
|
||||
|
||||
1. Create a directory for QBittorrent.
|
||||
2. Extract the QBittorrent package to the new directory.
|
||||
3. Create a WPS object for QBittorrent.exe.
|
||||
4. Start QBittorrent
|
||||
5. Happy torrenting
|
||||
|
||||
|
||||
4. BUGREPORTS
|
||||
=============
|
||||
|
||||
Please create bugreports at http://svn.netlabs.org/qtapps
|
||||
Only bug reports with a reproducible bug are accepted. :-)
|
||||
|
||||
|
||||
5. CREDITS
|
||||
==========
|
||||
|
||||
The port was done by:
|
||||
|
||||
Silvan Scherrer aka _diver
|
||||
|
||||
Thanks go to:
|
||||
|
||||
* Dmitry A. Kuminov
|
||||
|
||||
They either helped me when I had some nasty questions or did some testing for
|
||||
me.
|
||||
|
||||
|
||||
6. SUPPORT AND DONATIONS
|
||||
========================
|
||||
|
||||
QBittorrent port is based on volunteer work. If you would like to support further
|
||||
development, you can do so in one of the following ways:
|
||||
|
||||
|
||||
* Donate to the Qt4 project: see qt.netlabs.org for more information
|
||||
|
||||
* Contribute to the project: Besides actual development, this also includes
|
||||
maintaining the documentation and the project web site as well as help
|
||||
for users.
|
||||
|
||||
|
||||
7. HISTORY
|
||||
==========
|
||||
|
||||
2012-09-19
|
||||
|
||||
* updated to 3.0.4 code level of QBittorrent
|
||||
* updated libtorrent to 0.16.3 level
|
||||
|
||||
2012-09-06
|
||||
|
||||
* updated to 3.0.2 code level of QBittorrent
|
||||
|
||||
2012-05-14
|
||||
|
||||
* updated to 2.9.8 code level of QBittorrent
|
||||
|
||||
2012-03-15
|
||||
|
||||
* updated to 2.9.5 code level of QBittorrent
|
||||
|
||||
2011-09-26
|
||||
|
||||
* updated to 2.8.5 code level of QBittorrent
|
||||
* updated to Qt 4.7.3
|
||||
|
||||
2011-06-20
|
||||
|
||||
* updated to 2.7.3 code level of QBittorrent
|
||||
* updated libtorrent to 0.15.6 level
|
||||
|
||||
2010-12-23
|
||||
|
||||
* updated to 2.5.2 code level of QBittorrent
|
||||
|
||||
2010-11-22
|
||||
|
||||
* updated to 2.4.11 code level of QBittorrent
|
||||
|
||||
2010-xx-xx
|
||||
|
||||
* initial port
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# ===========================================================================
|
||||
# http://www.gnu.org/software/autoconf-archive/ax_boost_base.html
|
||||
# https://www.gnu.org/software/autoconf-archive/ax_boost_base.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
@@ -33,7 +33,15 @@
|
||||
# and this notice are preserved. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
#serial 26
|
||||
#serial 42
|
||||
|
||||
# example boost program (need to pass version)
|
||||
m4_define([_AX_BOOST_BASE_PROGRAM],
|
||||
[AC_LANG_PROGRAM([[
|
||||
#include <boost/version.hpp>
|
||||
]],[[
|
||||
(void) ((void)sizeof(char[1 - 2*!!((BOOST_VERSION) < ($1))]));
|
||||
]])])
|
||||
|
||||
AC_DEFUN([AX_BOOST_BASE],
|
||||
[
|
||||
@@ -44,104 +52,121 @@ AC_ARG_WITH([boost],
|
||||
or disable it (ARG=no)
|
||||
@<:@ARG=yes@:>@ ])],
|
||||
[
|
||||
if test "$withval" = "no"; then
|
||||
want_boost="no"
|
||||
elif test "$withval" = "yes"; then
|
||||
want_boost="yes"
|
||||
ac_boost_path=""
|
||||
else
|
||||
want_boost="yes"
|
||||
ac_boost_path="$withval"
|
||||
fi
|
||||
AS_CASE([$withval],
|
||||
[no],[want_boost="no";_AX_BOOST_BASE_boost_path=""],
|
||||
[yes],[want_boost="yes";_AX_BOOST_BASE_boost_path=""],
|
||||
[want_boost="yes";_AX_BOOST_BASE_boost_path="$withval"])
|
||||
],
|
||||
[want_boost="yes"])
|
||||
|
||||
|
||||
AC_ARG_WITH([boost-libdir],
|
||||
AS_HELP_STRING([--with-boost-libdir=LIB_DIR],
|
||||
[Force given directory for boost libraries. Note that this will override library path detection, so use this parameter only if default library detection fails and you know exactly where your boost libraries are located.]),
|
||||
[
|
||||
if test -d "$withval"
|
||||
then
|
||||
ac_boost_lib_path="$withval"
|
||||
else
|
||||
AC_MSG_ERROR(--with-boost-libdir expected directory name)
|
||||
fi
|
||||
],
|
||||
[ac_boost_lib_path=""]
|
||||
)
|
||||
[AS_HELP_STRING([--with-boost-libdir=LIB_DIR],
|
||||
[Force given directory for boost libraries.
|
||||
Note that this will override library path detection,
|
||||
so use this parameter only if default library detection fails
|
||||
and you know exactly where your boost libraries are located.])],
|
||||
[
|
||||
AS_IF([test -d "$withval"],
|
||||
[_AX_BOOST_BASE_boost_lib_path="$withval"],
|
||||
[AC_MSG_ERROR([--with-boost-libdir expected directory name])])
|
||||
],
|
||||
[_AX_BOOST_BASE_boost_lib_path=""])
|
||||
|
||||
if test "x$want_boost" = "xyes"; then
|
||||
boost_lib_version_req=ifelse([$1], ,1.20.0,$1)
|
||||
boost_lib_version_req_shorten=`expr $boost_lib_version_req : '\([[0-9]]*\.[[0-9]]*\)'`
|
||||
boost_lib_version_req_major=`expr $boost_lib_version_req : '\([[0-9]]*\)'`
|
||||
boost_lib_version_req_minor=`expr $boost_lib_version_req : '[[0-9]]*\.\([[0-9]]*\)'`
|
||||
boost_lib_version_req_sub_minor=`expr $boost_lib_version_req : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'`
|
||||
if test "x$boost_lib_version_req_sub_minor" = "x" ; then
|
||||
boost_lib_version_req_sub_minor="0"
|
||||
fi
|
||||
WANT_BOOST_VERSION=`expr $boost_lib_version_req_major \* 100000 \+ $boost_lib_version_req_minor \* 100 \+ $boost_lib_version_req_sub_minor`
|
||||
AC_MSG_CHECKING(for boostlib >= $boost_lib_version_req)
|
||||
BOOST_LDFLAGS=""
|
||||
BOOST_CPPFLAGS=""
|
||||
AS_IF([test "x$want_boost" = "xyes"],
|
||||
[_AX_BOOST_BASE_RUNDETECT([$1],[$2],[$3])])
|
||||
AC_SUBST(BOOST_CPPFLAGS)
|
||||
AC_SUBST(BOOST_LDFLAGS)
|
||||
])
|
||||
|
||||
|
||||
# convert a version string in $2 to numeric and affect to polymorphic var $1
|
||||
AC_DEFUN([_AX_BOOST_BASE_TONUMERICVERSION],[
|
||||
AS_IF([test "x$2" = "x"],[_AX_BOOST_BASE_TONUMERICVERSION_req="1.20.0"],[_AX_BOOST_BASE_TONUMERICVERSION_req="$2"])
|
||||
_AX_BOOST_BASE_TONUMERICVERSION_req_shorten=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req : '\([[0-9]]*\.[[0-9]]*\)'`
|
||||
_AX_BOOST_BASE_TONUMERICVERSION_req_major=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req : '\([[0-9]]*\)'`
|
||||
AS_IF([test "x$_AX_BOOST_BASE_TONUMERICVERSION_req_major" = "x"],
|
||||
[AC_MSG_ERROR([You should at least specify libboost major version])])
|
||||
_AX_BOOST_BASE_TONUMERICVERSION_req_minor=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req : '[[0-9]]*\.\([[0-9]]*\)'`
|
||||
AS_IF([test "x$_AX_BOOST_BASE_TONUMERICVERSION_req_minor" = "x"],
|
||||
[_AX_BOOST_BASE_TONUMERICVERSION_req_minor="0"])
|
||||
_AX_BOOST_BASE_TONUMERICVERSION_req_sub_minor=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'`
|
||||
AS_IF([test "X$_AX_BOOST_BASE_TONUMERICVERSION_req_sub_minor" = "X"],
|
||||
[_AX_BOOST_BASE_TONUMERICVERSION_req_sub_minor="0"])
|
||||
_AX_BOOST_BASE_TONUMERICVERSION_RET=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req_major \* 100000 \+ $_AX_BOOST_BASE_TONUMERICVERSION_req_minor \* 100 \+ $_AX_BOOST_BASE_TONUMERICVERSION_req_sub_minor`
|
||||
AS_VAR_SET($1,$_AX_BOOST_BASE_TONUMERICVERSION_RET)
|
||||
])
|
||||
|
||||
dnl Run the detection of boost should be run only if $want_boost
|
||||
AC_DEFUN([_AX_BOOST_BASE_RUNDETECT],[
|
||||
_AX_BOOST_BASE_TONUMERICVERSION(WANT_BOOST_VERSION,[$1])
|
||||
succeeded=no
|
||||
|
||||
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])
|
||||
dnl On 64-bit systems check for system libraries in both lib64 and lib.
|
||||
dnl The former is specified by FHS, but e.g. Debian does not adhere to
|
||||
dnl this (as it rises problems for generic multi-arch support).
|
||||
dnl The last entry in the list is chosen by default when no libraries
|
||||
dnl are found, e.g. when only header-only libraries are installed!
|
||||
libsubdirs="lib"
|
||||
ax_arch=`uname -m`
|
||||
case $ax_arch in
|
||||
x86_64)
|
||||
libsubdirs="lib64 libx32 lib lib64"
|
||||
;;
|
||||
ppc64|s390x|sparc64|aarch64|ppc64le)
|
||||
libsubdirs="lib64 lib lib64 ppc64le"
|
||||
;;
|
||||
esac
|
||||
AS_CASE([${host_cpu}],
|
||||
[x86_64],[libsubdirs="lib64 libx32 lib lib64"],
|
||||
[ppc64|s390x|sparc64|aarch64|ppc64le],[libsubdirs="lib64 lib lib64"],
|
||||
[libsubdirs="lib"]
|
||||
)
|
||||
|
||||
dnl allow for real multi-arch paths e.g. /usr/lib/x86_64-linux-gnu. Give
|
||||
dnl them priority over the other paths since, if libs are found there, they
|
||||
dnl are almost assuredly the ones desired.
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])
|
||||
libsubdirs="lib/${host_cpu}-${host_os} $libsubdirs"
|
||||
|
||||
case ${host_cpu} in
|
||||
i?86)
|
||||
libsubdirs="lib/i386-${host_os} $libsubdirs"
|
||||
;;
|
||||
esac
|
||||
AS_CASE([${host_cpu}],
|
||||
[i?86],[multiarch_libsubdir="lib/i386-${host_os}"],
|
||||
[multiarch_libsubdir="lib/${host_cpu}-${host_os}"]
|
||||
)
|
||||
|
||||
dnl first we check the system location for boost libraries
|
||||
dnl this location ist chosen if boost libraries are installed with the --layout=system option
|
||||
dnl or if you install boost with RPM
|
||||
if test "$ac_boost_path" != ""; then
|
||||
BOOST_CPPFLAGS="-I$ac_boost_path/include"
|
||||
for ac_boost_path_tmp in $libsubdirs; do
|
||||
if test -d "$ac_boost_path"/"$ac_boost_path_tmp" ; then
|
||||
BOOST_LDFLAGS="-L$ac_boost_path/$ac_boost_path_tmp"
|
||||
break
|
||||
fi
|
||||
done
|
||||
elif test "$cross_compiling" != yes; then
|
||||
for ac_boost_path_tmp in /usr /usr/local /opt /opt/local ; do
|
||||
if test -d "$ac_boost_path_tmp/include/boost" && test -r "$ac_boost_path_tmp/include/boost"; then
|
||||
for libsubdir in $libsubdirs ; do
|
||||
if ls "$ac_boost_path_tmp/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
|
||||
AS_IF([test "x$_AX_BOOST_BASE_boost_path" != "x"],[
|
||||
AC_MSG_CHECKING([for boostlib >= $1 ($WANT_BOOST_VERSION) includes in "$_AX_BOOST_BASE_boost_path/include"])
|
||||
AS_IF([test -d "$_AX_BOOST_BASE_boost_path/include" && test -r "$_AX_BOOST_BASE_boost_path/include"],[
|
||||
AC_MSG_RESULT([yes])
|
||||
BOOST_CPPFLAGS="-I$_AX_BOOST_BASE_boost_path/include"
|
||||
for _AX_BOOST_BASE_boost_path_tmp in $multiarch_libsubdir $libsubdirs; do
|
||||
AC_MSG_CHECKING([for boostlib >= $1 ($WANT_BOOST_VERSION) lib path in "$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp"])
|
||||
AS_IF([test -d "$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp" && test -r "$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp" ],[
|
||||
AC_MSG_RESULT([yes])
|
||||
BOOST_LDFLAGS="-L$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp";
|
||||
break;
|
||||
],
|
||||
[AC_MSG_RESULT([no])])
|
||||
done],[
|
||||
AC_MSG_RESULT([no])])
|
||||
],[
|
||||
if test X"$cross_compiling" = Xyes; then
|
||||
search_libsubdirs=$multiarch_libsubdir
|
||||
else
|
||||
search_libsubdirs="$multiarch_libsubdir $libsubdirs"
|
||||
fi
|
||||
for _AX_BOOST_BASE_boost_path_tmp in /usr /usr/local /opt /opt/local ; do
|
||||
if test -d "$_AX_BOOST_BASE_boost_path_tmp/include/boost" && test -r "$_AX_BOOST_BASE_boost_path_tmp/include/boost" ; then
|
||||
for libsubdir in $search_libsubdirs ; do
|
||||
if ls "$_AX_BOOST_BASE_boost_path_tmp/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
|
||||
done
|
||||
BOOST_LDFLAGS="-L$ac_boost_path_tmp/$libsubdir"
|
||||
BOOST_CPPFLAGS="-I$ac_boost_path_tmp/include"
|
||||
BOOST_LDFLAGS="-L$_AX_BOOST_BASE_boost_path_tmp/$libsubdir"
|
||||
BOOST_CPPFLAGS="-I$_AX_BOOST_BASE_boost_path_tmp/include"
|
||||
break;
|
||||
fi
|
||||
done
|
||||
fi
|
||||
])
|
||||
|
||||
dnl overwrite ld flags if we have required special directory with
|
||||
dnl --with-boost-libdir parameter
|
||||
if test "$ac_boost_lib_path" != ""; then
|
||||
BOOST_LDFLAGS="-L$ac_boost_lib_path"
|
||||
fi
|
||||
AS_IF([test "x$_AX_BOOST_BASE_boost_lib_path" != "x"],
|
||||
[BOOST_LDFLAGS="-L$_AX_BOOST_BASE_boost_lib_path"])
|
||||
|
||||
AC_MSG_CHECKING([for boostlib >= $1 ($WANT_BOOST_VERSION)])
|
||||
CPPFLAGS_SAVED="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
|
||||
export CPPFLAGS
|
||||
@@ -152,15 +177,7 @@ if test "x$want_boost" = "xyes"; then
|
||||
|
||||
AC_REQUIRE([AC_PROG_CXX])
|
||||
AC_LANG_PUSH(C++)
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
@%:@include <boost/version.hpp>
|
||||
]], [[
|
||||
#if BOOST_VERSION >= $WANT_BOOST_VERSION
|
||||
// Everything is okay
|
||||
#else
|
||||
# error Boost version is too old
|
||||
#endif
|
||||
]])],[
|
||||
AC_COMPILE_IFELSE([_AX_BOOST_BASE_PROGRAM($WANT_BOOST_VERSION)],[
|
||||
AC_MSG_RESULT(yes)
|
||||
succeeded=yes
|
||||
found_system=yes
|
||||
@@ -172,40 +189,50 @@ if test "x$want_boost" = "xyes"; then
|
||||
|
||||
dnl if we found no boost with system layout we search for boost libraries
|
||||
dnl built and installed without the --layout=system option or for a staged(not installed) version
|
||||
if test "x$succeeded" != "xyes"; then
|
||||
if test "x$succeeded" != "xyes" ; then
|
||||
CPPFLAGS="$CPPFLAGS_SAVED"
|
||||
LDFLAGS="$LDFLAGS_SAVED"
|
||||
BOOST_CPPFLAGS=
|
||||
BOOST_LDFLAGS=
|
||||
if test -z "$_AX_BOOST_BASE_boost_lib_path" ; then
|
||||
BOOST_LDFLAGS=
|
||||
fi
|
||||
_version=0
|
||||
if test "$ac_boost_path" != ""; then
|
||||
if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then
|
||||
for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do
|
||||
_version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
|
||||
if test -n "$_AX_BOOST_BASE_boost_path" ; then
|
||||
if test -d "$_AX_BOOST_BASE_boost_path" && test -r "$_AX_BOOST_BASE_boost_path"; then
|
||||
for i in `ls -d $_AX_BOOST_BASE_boost_path/include/boost-* 2>/dev/null`; do
|
||||
_version_tmp=`echo $i | sed "s#$_AX_BOOST_BASE_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
|
||||
V_CHECK=`expr $_version_tmp \> $_version`
|
||||
if test "$V_CHECK" = "1" ; then
|
||||
if test "x$V_CHECK" = "x1" ; then
|
||||
_version=$_version_tmp
|
||||
fi
|
||||
VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
|
||||
BOOST_CPPFLAGS="-I$ac_boost_path/include/boost-$VERSION_UNDERSCORE"
|
||||
BOOST_CPPFLAGS="-I$_AX_BOOST_BASE_boost_path/include/boost-$VERSION_UNDERSCORE"
|
||||
done
|
||||
dnl if nothing found search for layout used in Windows distributions
|
||||
if test -z "$BOOST_CPPFLAGS"; then
|
||||
if test -d "$ac_boost_path/boost" && test -r "$ac_boost_path/boost"; then
|
||||
BOOST_CPPFLAGS="-I$ac_boost_path"
|
||||
if test -d "$_AX_BOOST_BASE_boost_path/boost" && test -r "$_AX_BOOST_BASE_boost_path/boost"; then
|
||||
BOOST_CPPFLAGS="-I$_AX_BOOST_BASE_boost_path"
|
||||
fi
|
||||
fi
|
||||
dnl if we found something and BOOST_LDFLAGS was unset before
|
||||
dnl (because "$_AX_BOOST_BASE_boost_lib_path" = ""), set it here.
|
||||
if test -n "$BOOST_CPPFLAGS" && test -z "$BOOST_LDFLAGS"; then
|
||||
for libsubdir in $libsubdirs ; do
|
||||
if ls "$_AX_BOOST_BASE_boost_path/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
|
||||
done
|
||||
BOOST_LDFLAGS="-L$_AX_BOOST_BASE_boost_path/$libsubdir"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
if test "$cross_compiling" != yes; then
|
||||
for ac_boost_path in /usr /usr/local /opt /opt/local ; do
|
||||
if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then
|
||||
for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do
|
||||
_version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
|
||||
if test "x$cross_compiling" != "xyes" ; then
|
||||
for _AX_BOOST_BASE_boost_path in /usr /usr/local /opt /opt/local ; do
|
||||
if test -d "$_AX_BOOST_BASE_boost_path" && test -r "$_AX_BOOST_BASE_boost_path" ; then
|
||||
for i in `ls -d $_AX_BOOST_BASE_boost_path/include/boost-* 2>/dev/null`; do
|
||||
_version_tmp=`echo $i | sed "s#$_AX_BOOST_BASE_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
|
||||
V_CHECK=`expr $_version_tmp \> $_version`
|
||||
if test "$V_CHECK" = "1" ; then
|
||||
if test "x$V_CHECK" = "x1" ; then
|
||||
_version=$_version_tmp
|
||||
best_path=$ac_boost_path
|
||||
best_path=$_AX_BOOST_BASE_boost_path
|
||||
fi
|
||||
done
|
||||
fi
|
||||
@@ -213,7 +240,7 @@ if test "x$want_boost" = "xyes"; then
|
||||
|
||||
VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
|
||||
BOOST_CPPFLAGS="-I$best_path/include/boost-$VERSION_UNDERSCORE"
|
||||
if test "$ac_boost_lib_path" = ""; then
|
||||
if test -z "$_AX_BOOST_BASE_boost_lib_path" ; then
|
||||
for libsubdir in $libsubdirs ; do
|
||||
if ls "$best_path/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
|
||||
done
|
||||
@@ -221,7 +248,7 @@ if test "x$want_boost" = "xyes"; then
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$BOOST_ROOT" != "x"; then
|
||||
if test -n "$BOOST_ROOT" ; then
|
||||
for libsubdir in $libsubdirs ; do
|
||||
if ls "$BOOST_ROOT/stage/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
|
||||
done
|
||||
@@ -230,7 +257,7 @@ if test "x$want_boost" = "xyes"; then
|
||||
stage_version=`echo $version_dir | sed 's/boost_//' | sed 's/_/./g'`
|
||||
stage_version_shorten=`expr $stage_version : '\([[0-9]]*\.[[0-9]]*\)'`
|
||||
V_CHECK=`expr $stage_version_shorten \>\= $_version`
|
||||
if test "$V_CHECK" = "1" -a "$ac_boost_lib_path" = "" ; then
|
||||
if test "x$V_CHECK" = "x1" && test -z "$_AX_BOOST_BASE_boost_lib_path" ; then
|
||||
AC_MSG_NOTICE(We will use a staged boost library from $BOOST_ROOT)
|
||||
BOOST_CPPFLAGS="-I$BOOST_ROOT"
|
||||
BOOST_LDFLAGS="-L$BOOST_ROOT/stage/$libsubdir"
|
||||
@@ -245,15 +272,7 @@ if test "x$want_boost" = "xyes"; then
|
||||
export LDFLAGS
|
||||
|
||||
AC_LANG_PUSH(C++)
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
@%:@include <boost/version.hpp>
|
||||
]], [[
|
||||
#if BOOST_VERSION >= $WANT_BOOST_VERSION
|
||||
// Everything is okay
|
||||
#else
|
||||
# error Boost version is too old
|
||||
#endif
|
||||
]])],[
|
||||
AC_COMPILE_IFELSE([_AX_BOOST_BASE_PROGRAM($WANT_BOOST_VERSION)],[
|
||||
AC_MSG_RESULT(yes)
|
||||
succeeded=yes
|
||||
found_system=yes
|
||||
@@ -262,17 +281,15 @@ if test "x$want_boost" = "xyes"; then
|
||||
AC_LANG_POP([C++])
|
||||
fi
|
||||
|
||||
if test "$succeeded" != "yes" ; then
|
||||
if test "$_version" = "0" ; then
|
||||
AC_MSG_NOTICE([[We could not detect the boost libraries (version $boost_lib_version_req_shorten or higher). If you have a staged boost library (still not installed) please specify \$BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in <boost/version.hpp>. See http://randspringer.de/boost for more documentation.]])
|
||||
if test "x$succeeded" != "xyes" ; then
|
||||
if test "x$_version" = "x0" ; then
|
||||
AC_MSG_NOTICE([[We could not detect the boost libraries (version $1 or higher). If you have a staged boost library (still not installed) please specify \$BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in <boost/version.hpp>. See http://randspringer.de/boost for more documentation.]])
|
||||
else
|
||||
AC_MSG_NOTICE([Your boost libraries seems to old (version $_version).])
|
||||
fi
|
||||
# execute ACTION-IF-NOT-FOUND (if present):
|
||||
ifelse([$3], , :, [$3])
|
||||
else
|
||||
AC_SUBST(BOOST_CPPFLAGS)
|
||||
AC_SUBST(BOOST_LDFLAGS)
|
||||
AC_DEFINE(HAVE_BOOST,,[define if the Boost library is available])
|
||||
# execute ACTION-IF-FOUND (if present):
|
||||
ifelse([$2], , :, [$2])
|
||||
@@ -280,6 +297,5 @@ if test "x$want_boost" = "xyes"; then
|
||||
|
||||
CPPFLAGS="$CPPFLAGS_SAVED"
|
||||
LDFLAGS="$LDFLAGS_SAVED"
|
||||
fi
|
||||
|
||||
])
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# ===========================================================================
|
||||
# http://www.gnu.org/software/autoconf-archive/ax_boost_system.html
|
||||
# https://www.gnu.org/software/autoconf-archive/ax_boost_system.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
@@ -31,7 +31,7 @@
|
||||
# and this notice are preserved. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
#serial 18
|
||||
#serial 19
|
||||
|
||||
AC_DEFUN([AX_BOOST_SYSTEM],
|
||||
[
|
||||
|
||||
@@ -9,7 +9,7 @@ exists($$OUT_PWD/../conf.pri) {
|
||||
include(conf.pri)
|
||||
}
|
||||
|
||||
LIBS += -framework Carbon -framework IOKit
|
||||
LIBS += -framework Carbon -framework IOKit -framework AppKit
|
||||
|
||||
QT_LANG_PATH = ../dist/qt-translations
|
||||
DIST_PATH = ../dist/mac
|
||||
|
||||
16
os2conf.pri
@@ -1,16 +0,0 @@
|
||||
exists(conf.pri) {
|
||||
# to the conf.pri goes all system dependent stuff
|
||||
include(conf.pri)
|
||||
}
|
||||
|
||||
LIBS += \
|
||||
-ltorrent-rasterbar \
|
||||
-lboost_thread \
|
||||
-lboost_system \
|
||||
-lboost_filesystem \
|
||||
-lssl -lcrypto -lidn -lpthread -lz
|
||||
|
||||
RC_FILE = qbittorrent_os2.rc
|
||||
|
||||
# LIBTORRENT DEFINES
|
||||
DEFINES += BOOST_ASIO_DYN_LINK
|
||||
@@ -3,7 +3,6 @@ TEMPLATE = subdirs
|
||||
SUBDIRS += src
|
||||
|
||||
include(version.pri)
|
||||
include(qm_gen.pri)
|
||||
|
||||
# Make target to create release tarball. Use 'make tarball'
|
||||
tarball.commands += rm -fR ../$${PROJECT_NAME}-$${PROJECT_VERSION}/ &&
|
||||
@@ -17,3 +16,11 @@ tarball.commands += xz -f $${PROJECT_NAME}-$${PROJECT_VERSION}.tar &&
|
||||
tarball.commands += rm -fR $${PROJECT_NAME}-$${PROJECT_VERSION}
|
||||
|
||||
QMAKE_EXTRA_TARGETS += tarball
|
||||
|
||||
# Translations included here (at top level) is to avoid regenerating the .qm files
|
||||
# every time when src.pro is processed
|
||||
include(src/lang/lang.pri)
|
||||
|
||||
# For Qt Creator beautifier
|
||||
DISTFILES += \
|
||||
uncrustify.cfg
|
||||
|
||||
21
qm_gen.pri
@@ -1,21 +0,0 @@
|
||||
TS_IN = $$fromfile(src/src.pro,TRANSLATIONS)
|
||||
TS_IN_NOEXT = $$replace(TS_IN,".ts","")
|
||||
|
||||
isEmpty(QMAKE_LRELEASE) {
|
||||
win32|os2:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]\\lrelease.exe
|
||||
else:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]/lrelease
|
||||
unix {
|
||||
equals(QT_MAJOR_VERSION, 5) {
|
||||
!exists($$QMAKE_LRELEASE) { QMAKE_LRELEASE = lrelease-qt5 }
|
||||
}
|
||||
} else {
|
||||
!exists($$QMAKE_LRELEASE) { QMAKE_LRELEASE = lrelease }
|
||||
}
|
||||
}
|
||||
|
||||
message("Building translations")
|
||||
for(L,TS_IN_NOEXT) {
|
||||
message("Processing $${L}")
|
||||
system("$$QMAKE_LRELEASE -silent src/$${L}.ts -qm src/$${L}.qm")
|
||||
!exists("src/$${L}.qm"):error("Building translations failed, cannot continue")
|
||||
}
|
||||
@@ -1,101 +1,89 @@
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED True)
|
||||
set(CMAKE_CXX_STANDARD "11")
|
||||
add_definitions(-DBOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
|
||||
# If C++14 is available, use it as libtorent ABI depends on 11/14 version
|
||||
if (cxx_std_14 IN_LIST CMAKE_CXX_COMPILE_FEATURES)
|
||||
message(STATUS "Building in C++14 mode")
|
||||
set(CMAKE_CXX_STANDARD "14")
|
||||
else()
|
||||
message(STATUS "Building in C++11 mode")
|
||||
set(CMAKE_CXX_STANDARD "11")
|
||||
endif()
|
||||
|
||||
include(MacroQbtCompilerSettings)
|
||||
qbt_set_compiler_options()
|
||||
|
||||
include(MacroLinkQtComponents)
|
||||
include(QbtTargetSources)
|
||||
|
||||
find_package(Boost ${requiredBoostVersion} REQUIRED)
|
||||
find_package(LibtorrentRasterbar REQUIRED)
|
||||
|
||||
# Qt
|
||||
list(APPEND QBT_QT_COMPONENTS Core Network Xml)
|
||||
if (GUI)
|
||||
list (APPEND QBT_QT_COMPONENTS Concurrent Gui Svg Widgets)
|
||||
if (WIN32)
|
||||
list (APPEND QBT_QT_COMPONENTS WinExtras)
|
||||
endif(WIN32)
|
||||
if (APPLE)
|
||||
list (APPEND QBT_GUI_OPTIONAL_LINK_LIBRARIES objc)
|
||||
list (APPEND QBT_QT_COMPONENTS MacExtras)
|
||||
endif (APPLE)
|
||||
endif (GUI)
|
||||
if (DBUS)
|
||||
list (APPEND QBT_QT_COMPONENTS DBus)
|
||||
endif (DBUS)
|
||||
find_package(Qt5 5.5.1 COMPONENTS ${QBT_QT_COMPONENTS} REQUIRED)
|
||||
if (Boost_VERSION VERSION_LESS 106000)
|
||||
add_definitions(-DBOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
endif()
|
||||
|
||||
if (GUI AND APPLE)
|
||||
# Fix MOC inability to detect macOS. This seems to only affect cmake.
|
||||
# Relevant issue: https://bugreports.qt.io/browse/QTBUG-58325
|
||||
set(CMAKE_AUTOMOC_MOC_OPTIONS ${CMAKE_AUTOMOC_MOC_OPTIONS} -DQ_OS_MAC)
|
||||
endif ()
|
||||
find_package(Qt5 ${requiredQtVersion} REQUIRED COMPONENTS Core Network Xml LinguistTools)
|
||||
find_package(Qt5Widgets ${requiredQtVersion})
|
||||
if (Qt5Widgets_FOUND)
|
||||
find_package(Qt5DBus ${requiredQtVersion})
|
||||
else()
|
||||
add_definitions(-DDISABLE_GUI)
|
||||
endif()
|
||||
|
||||
set_package_properties(Qt5Widgets PROPERTIES
|
||||
DESCRIPTION "Set of components for creating classic desktop-style UIs for the Qt5 framework"
|
||||
PURPOSE "Enables qBittorrent GUI. Unneeded for headless configuration."
|
||||
TYPE OPTIONAL
|
||||
)
|
||||
|
||||
set_package_properties(Qt5DBus PROPERTIES
|
||||
DESCRIPTION "Qt5 module for inter-process communication over the D-Bus protocol"
|
||||
PURPOSE "Enables communication with other system components (e.g. notification service) via D-Bus. "
|
||||
TYPE RECOMMENDED
|
||||
)
|
||||
|
||||
set(CMAKE_AUTOMOC True)
|
||||
list(APPEND CMAKE_AUTORCC_OPTIONS -compress 9 -threshold 5)
|
||||
if (APPLE)
|
||||
# Workaround CMake bug (autogen does not pass required parameters to moc)
|
||||
# Relevant issue: https://gitlab.kitware.com/cmake/cmake/issues/18041
|
||||
list(APPEND CMAKE_AUTOMOC_MOC_OPTIONS -DQ_OS_MAC -DQ_OS_DARWIN)
|
||||
endif ()
|
||||
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
# defines
|
||||
add_definitions(-DQT_NO_CAST_TO_ASCII)
|
||||
# Fast concatenation (Qt >= 4.6)
|
||||
add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS)
|
||||
if (WIN32)
|
||||
add_definitions(-DNOMINMAX)
|
||||
endif (WIN32)
|
||||
# Efficient construction for QString & QByteArray (Qt >= 4.8)
|
||||
add_definitions(-DQT_USE_QSTRINGBUILDER)
|
||||
|
||||
if (NOT GUI)
|
||||
add_definitions(-DDISABLE_GUI -DDISABLE_COUNTRIES_RESOLUTION)
|
||||
endif (NOT GUI)
|
||||
|
||||
if (NOT WEBUI)
|
||||
add_definitions(-DDISABLE_WEBUI)
|
||||
endif (NOT WEBUI)
|
||||
|
||||
if (STACKTRACE_WIN)
|
||||
add_definitions(-DSTACKTRACE_WIN)
|
||||
endif(STACKTRACE_WIN)
|
||||
# nogui {
|
||||
# TARGET = qbittorrent-nox
|
||||
# } else {
|
||||
# CONFIG(static) {
|
||||
# DEFINES += QBT_STATIC_QT
|
||||
# QTPLUGIN += qico
|
||||
# }
|
||||
# TARGET = qbittorrent
|
||||
# }
|
||||
|
||||
if (UNIX AND NOT APPLE)
|
||||
add_compile_options(-Wformat -Wformat-security)
|
||||
endif ()
|
||||
|
||||
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
if (CMAKE_BUILD_TYPE MATCHES "Debug")
|
||||
message(STATUS "Project is built in DEBUG mode.")
|
||||
else (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
else()
|
||||
message(STATUS "Project is built in RELEASE mode.")
|
||||
message(STATUS "Disabling debug output.")
|
||||
add_definitions(-DQT_NO_DEBUG_OUTPUT)
|
||||
endif (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
|
||||
set(QBT_USE_GUI ${GUI})
|
||||
set(QBT_USE_WEBUI ${WEBUI})
|
||||
endif()
|
||||
|
||||
configure_file(config.h.cmakein ${CMAKE_CURRENT_BINARY_DIR}/config.h)
|
||||
|
||||
if (SYSTEM_QTSINGLEAPPLICATION)
|
||||
find_package(QtSingleApplication REQUIRED)
|
||||
else (SYSTEM_QTSINGLEAPPLICATION)
|
||||
find_package(QtSingleApplication)
|
||||
set_package_properties(QtSingleApplication PROPERTIES
|
||||
URL "https://code.qt.io/cgit/qt-solutions/qt-solutions.git/"
|
||||
DESCRIPTION "Qt library to start applications only once per user"
|
||||
TYPE RECOMMENDED
|
||||
PURPOSE "Use the system qtsingleapplication library or shipped one otherwise"
|
||||
)
|
||||
|
||||
if (NOT QtSingleApplication_FOUND)
|
||||
add_subdirectory(app/qtsingleapplication)
|
||||
endif (SYSTEM_QTSINGLEAPPLICATION)
|
||||
endif ()
|
||||
|
||||
add_subdirectory(app)
|
||||
add_subdirectory(base)
|
||||
|
||||
if (GUI)
|
||||
if (Qt5Widgets_FOUND)
|
||||
add_subdirectory(gui)
|
||||
endif (GUI)
|
||||
endif ()
|
||||
|
||||
if (WEBUI)
|
||||
add_subdirectory(webui)
|
||||
|
||||
@@ -1,43 +1,41 @@
|
||||
project(qbt_executable)
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
set(QBT_APP_HEADERS
|
||||
add_executable(qBittorrent
|
||||
application.h
|
||||
cmdoptions.h
|
||||
filelogger.h
|
||||
)
|
||||
|
||||
set(QBT_APP_SOURCES
|
||||
upgrade.h
|
||||
application.cpp
|
||||
cmdoptions.cpp
|
||||
filelogger.cpp
|
||||
main.cpp
|
||||
)
|
||||
|
||||
target_include_directories(qBittorrent PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
|
||||
target_link_libraries(qBittorrent
|
||||
PRIVATE
|
||||
qbt_base
|
||||
)
|
||||
|
||||
set_target_properties(qBittorrent
|
||||
PROPERTIES
|
||||
AUTOUIC True
|
||||
AUTORCC True
|
||||
MACOSX_BUNDLE True
|
||||
)
|
||||
|
||||
# translations
|
||||
include(QbtTranslations)
|
||||
|
||||
file(GLOB QBT_TS_FILES ../lang/*.ts)
|
||||
get_filename_component(QBT_QM_FILES_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/../lang" ABSOLUTE)
|
||||
set_source_files_properties(${QBT_TS_FILES} PROPERTIES OUTPUT_LOCATION "${QBT_QM_FILES_BINARY_DIR}")
|
||||
qbt_add_translations(qBittorrent QRC_FILE "../lang/lang.qrc" TS_FILES ${QBT_TS_FILES})
|
||||
|
||||
find_package(Qt5 COMPONENTS LinguistTools REQUIRED)
|
||||
qt5_add_translation(QBT_QM_FILES ${QBT_TS_FILES})
|
||||
|
||||
get_filename_component(_lang_qrc_src "${CMAKE_CURRENT_SOURCE_DIR}/../lang.qrc" ABSOLUTE)
|
||||
get_filename_component(_lang_qrc_dst "${CMAKE_CURRENT_BINARY_DIR}/../lang.qrc" ABSOLUTE)
|
||||
get_filename_component(_lang_qrc_dst_dir "${CMAKE_CURRENT_BINARY_DIR}/../" ABSOLUTE)
|
||||
|
||||
message(STATUS "copying ${_lang_qrc_src} -> ${_lang_qrc_dst}")
|
||||
file(COPY ${_lang_qrc_src} DESTINATION ${_lang_qrc_dst_dir})
|
||||
|
||||
set_source_files_properties("${_lang_qrc_dst}" PROPERTIES GENERATED True)
|
||||
foreach(qm_file ${QBT_QM_FILES})
|
||||
set_source_files_properties("${_lang_qrc_dst}" PROPERTIES OBJECT_DEPENDS ${qm_file})
|
||||
endforeach()
|
||||
if (WEBUI)
|
||||
file(GLOB QBT_WEBUI_TS_FILES ../webui/www/translations/*.ts)
|
||||
qbt_add_translations(qBittorrent QRC_FILE "../webui/www/translations/webui_translations.qrc" TS_FILES ${QBT_WEBUI_TS_FILES})
|
||||
endif()
|
||||
|
||||
set(QBT_APP_RESOURCES
|
||||
../icons.qrc
|
||||
../searchengine.qrc
|
||||
"${_lang_qrc_dst}"
|
||||
../icons/icons.qrc
|
||||
../searchengine/searchengine.qrc
|
||||
)
|
||||
|
||||
# With AUTORCC rcc is ran by cmake before language files are generated,
|
||||
@@ -46,51 +44,41 @@ qt5_add_resources(QBT_APP_RESOURCE_SOURCE ${QBT_APP_RESOURCES})
|
||||
|
||||
if (WIN32)
|
||||
if (MINGW)
|
||||
list (APPEND QBT_APP_SOURCES ../qbittorrent_mingw.rc)
|
||||
target_sources(qBittorrent PRIVATE ../qbittorrent_mingw.rc)
|
||||
else (MINGW)
|
||||
list (APPEND QBT_APP_SOURCES ../qbittorrent.rc)
|
||||
target_sources(qBittorrent PRIVATE ../qbittorrent.rc)
|
||||
endif (MINGW)
|
||||
list(APPEND QBT_APP_SOURCES ../qbittorrent.exe.manifest)
|
||||
target_sources(qBittorrent PRIVATE ../qbittorrent.exe.manifest)
|
||||
endif (WIN32)
|
||||
|
||||
if (UNIX)
|
||||
list(APPEND QBT_APP_HEADERS stacktrace.h)
|
||||
endif (UNIX)
|
||||
if (STACKTRACE)
|
||||
if (UNIX)
|
||||
target_sources(qBittorrent PRIVATE stacktrace.h)
|
||||
else (UNIX)
|
||||
target_sources(qBittorrent PRIVATE stacktrace_win.h)
|
||||
if (Qt5Widgets_FOUND)
|
||||
target_sources(qBittorrent PRIVATE stacktracedialog.h)
|
||||
endif (Qt5Widgets_FOUND)
|
||||
endif (UNIX)
|
||||
endif (STACKTRACE)
|
||||
|
||||
if (STACKTRACE_WIN)
|
||||
list(APPEND QBT_APP_HEADERS stacktrace_win.h)
|
||||
if (GUI)
|
||||
list(APPEND QBT_APP_HEADERS stacktrace_win_dlg.h)
|
||||
endif (GUI)
|
||||
endif (STACKTRACE_WIN)
|
||||
|
||||
# usesystemqtsingleapplication {
|
||||
# nogui {
|
||||
# CONFIG += qtsinglecoreapplication
|
||||
# } else {
|
||||
# CONFIG += qtsingleapplication
|
||||
# }
|
||||
# } else {
|
||||
# nogui {
|
||||
# include(qtsingleapplication/qtsinglecoreapplication.pri)
|
||||
# } else {
|
||||
# include(qtsingleapplication/qtsingleapplication.pri)
|
||||
# }
|
||||
# }
|
||||
|
||||
# upgrade code
|
||||
list(APPEND QBT_APP_HEADERS upgrade.h)
|
||||
list(APPEND QBT_TARGET_LIBRARIES qbt_base)
|
||||
|
||||
if (GUI)
|
||||
list(APPEND QBT_TARGET_LIBRARIES qbt_searchengine qbt_gui)
|
||||
include_directories(../gui
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../gui
|
||||
if (Qt5Widgets_FOUND)
|
||||
target_link_libraries(qBittorrent PRIVATE qbt_searchengine qbt_gui)
|
||||
set_target_properties(qBittorrent
|
||||
PROPERTIES
|
||||
OUTPUT_NAME qbittorrent
|
||||
WIN32_EXECUTABLE True
|
||||
)
|
||||
endif (GUI)
|
||||
else(Qt5Widgets_FOUND)
|
||||
set_target_properties(qBittorrent
|
||||
PROPERTIES
|
||||
OUTPUT_NAME qbittorrent-nox
|
||||
)
|
||||
endif (Qt5Widgets_FOUND)
|
||||
|
||||
if (WEBUI)
|
||||
list(APPEND QBT_TARGET_LIBRARIES qbt_webui)
|
||||
target_link_libraries(qBittorrent PRIVATE qbt_webui)
|
||||
endif (WEBUI)
|
||||
|
||||
# we have to include resources into the bundle
|
||||
@@ -142,30 +130,11 @@ if (APPLE)
|
||||
PROPERTIES MACOSX_PACKAGE_LOCATION translations)
|
||||
endif (APPLE)
|
||||
|
||||
add_executable(qBittorrent ${QBT_APP_HEADERS} ${QBT_APP_SOURCES} ${QBT_QM_FILES} ${QBT_APP_RESOURCE_SOURCE})
|
||||
if (GUI)
|
||||
set_target_properties(qBittorrent
|
||||
PROPERTIES
|
||||
OUTPUT_NAME qbittorrent
|
||||
WIN32_EXECUTABLE True
|
||||
)
|
||||
else (GUI)
|
||||
set_target_properties(qBittorrent
|
||||
PROPERTIES
|
||||
OUTPUT_NAME qbittorrent-nox
|
||||
)
|
||||
endif (GUI)
|
||||
|
||||
set_target_properties(qBittorrent
|
||||
PROPERTIES
|
||||
AUTOUIC True
|
||||
AUTORCC True
|
||||
MACOSX_BUNDLE True
|
||||
)
|
||||
target_sources(qBittorrent PRIVATE ${QBT_QM_FILES} ${QBT_APP_RESOURCE_SOURCE})
|
||||
|
||||
get_target_property(QBT_EXECUTABLE_NAME qBittorrent OUTPUT_NAME)
|
||||
|
||||
target_link_libraries(qBittorrent ${QBT_TARGET_LIBRARIES} QtSingleApplication::QtSingleApplication)
|
||||
target_link_libraries(qBittorrent PRIVATE ${QBT_TARGET_LIBRARIES} QtSingleApplication::QtSingleApplication)
|
||||
|
||||
if (APPLE)
|
||||
set(qbt_BUNDLE_NAME ${QBT_EXECUTABLE_NAME})
|
||||
@@ -186,6 +155,7 @@ install(TARGETS qBittorrent
|
||||
BUNDLE DESTINATION .
|
||||
COMPONENT runtime)
|
||||
|
||||
if (GUI AND APPLE)
|
||||
if (Qt5Widgets_FOUND AND APPLE)
|
||||
find_package(Qt5Svg REQUIRED)
|
||||
include(bundle)
|
||||
endif (GUI AND APPLE)
|
||||
endif (Qt5Widgets_FOUND AND APPLE)
|
||||
|
||||
@@ -25,12 +25,16 @@ SOURCES += \
|
||||
$$PWD/filelogger.cpp \
|
||||
$$PWD/main.cpp
|
||||
|
||||
unix: HEADERS += $$PWD/stacktrace.h
|
||||
strace_win {
|
||||
HEADERS += $$PWD/stacktrace_win.h
|
||||
!nogui {
|
||||
HEADERS += $$PWD/stacktrace_win_dlg.h
|
||||
FORMS += $$PWD/stacktrace_win_dlg.ui
|
||||
stacktrace {
|
||||
unix {
|
||||
HEADERS += $$PWD/stacktrace.h
|
||||
}
|
||||
else {
|
||||
HEADERS += $$PWD/stacktrace_win.h
|
||||
!nogui {
|
||||
HEADERS += $$PWD/stacktracedialog.h
|
||||
FORMS += $$PWD/stacktracedialog.ui
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -27,77 +27,87 @@
|
||||
* exception statement from your version.
|
||||
*/
|
||||
|
||||
#include <QDebug>
|
||||
#include <QFileInfo>
|
||||
#include <QLocale>
|
||||
#include <QLibraryInfo>
|
||||
#include <QSysInfo>
|
||||
#include <QProcess>
|
||||
#include "application.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include <QAtomicInt>
|
||||
#include <QDebug>
|
||||
#include <QLibraryInfo>
|
||||
#include <QLocale>
|
||||
#include <QProcess>
|
||||
#include <QSysInfo>
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
#include <memory>
|
||||
#include <Shellapi.h>
|
||||
#endif
|
||||
|
||||
#ifndef DISABLE_GUI
|
||||
#include "gui/guiiconprovider.h"
|
||||
#ifdef Q_OS_WIN
|
||||
#include <windows.h>
|
||||
#include <QSharedMemory>
|
||||
#include <QSessionManager>
|
||||
#include <QSharedMemory>
|
||||
#endif // Q_OS_WIN
|
||||
#ifdef Q_OS_MAC
|
||||
#include <QFileOpenEvent>
|
||||
#include <QFont>
|
||||
#include <QUrl>
|
||||
#endif // Q_OS_MAC
|
||||
#include "mainwindow.h"
|
||||
#include "addnewtorrentdialog.h"
|
||||
#include "shutdownconfirmdlg.h"
|
||||
#include "gui/guiiconprovider.h"
|
||||
#include "mainwindow.h"
|
||||
#include "shutdownconfirmdialog.h"
|
||||
#else // DISABLE_GUI
|
||||
#include <iostream>
|
||||
#include <cstdio>
|
||||
#endif // DISABLE_GUI
|
||||
|
||||
#include "base/bittorrent/session.h"
|
||||
#include "base/bittorrent/torrenthandle.h"
|
||||
#include "base/iconprovider.h"
|
||||
#include "base/logger.h"
|
||||
#include "base/net/downloadmanager.h"
|
||||
#include "base/net/geoipmanager.h"
|
||||
#include "base/net/proxyconfigurationmanager.h"
|
||||
#include "base/net/smtp.h"
|
||||
#include "base/preferences.h"
|
||||
#include "base/profile.h"
|
||||
#include "base/rss/rss_autodownloader.h"
|
||||
#include "base/rss/rss_session.h"
|
||||
#include "base/scanfoldersmodel.h"
|
||||
#include "base/search/searchpluginmanager.h"
|
||||
#include "base/settingsstorage.h"
|
||||
#include "base/utils/fs.h"
|
||||
#include "base/utils/misc.h"
|
||||
#include "base/utils/string.h"
|
||||
#include "filelogger.h"
|
||||
|
||||
#ifndef DISABLE_WEBUI
|
||||
#include "webui/webui.h"
|
||||
#endif
|
||||
|
||||
#include "application.h"
|
||||
#include "filelogger.h"
|
||||
#include "base/logger.h"
|
||||
#include "base/preferences.h"
|
||||
#include "base/settingsstorage.h"
|
||||
#include "base/profile.h"
|
||||
#include "base/utils/fs.h"
|
||||
#include "base/utils/misc.h"
|
||||
#include "base/iconprovider.h"
|
||||
#include "base/scanfoldersmodel.h"
|
||||
#include "base/net/smtp.h"
|
||||
#include "base/net/downloadmanager.h"
|
||||
#include "base/net/geoipmanager.h"
|
||||
#include "base/net/proxyconfigurationmanager.h"
|
||||
#include "base/bittorrent/session.h"
|
||||
#include "base/bittorrent/torrenthandle.h"
|
||||
#include "base/rss/rss_autodownloader.h"
|
||||
#include "base/rss/rss_session.h"
|
||||
|
||||
namespace
|
||||
{
|
||||
#define SETTINGS_KEY(name) "Application/" name
|
||||
|
||||
// FileLogger properties keys
|
||||
#define FILELOGGER_SETTINGS_KEY(name) SETTINGS_KEY("FileLogger/") name
|
||||
#define FILELOGGER_SETTINGS_KEY(name) QStringLiteral(SETTINGS_KEY("FileLogger/") name)
|
||||
const QString KEY_FILELOGGER_ENABLED = FILELOGGER_SETTINGS_KEY("Enabled");
|
||||
const QString KEY_FILELOGGER_PATH = FILELOGGER_SETTINGS_KEY("Path");
|
||||
const QString KEY_FILELOGGER_BACKUP = FILELOGGER_SETTINGS_KEY("Backup");
|
||||
const QString KEY_FILELOGGER_DELETEOLD = FILELOGGER_SETTINGS_KEY("DeleteOld");
|
||||
const QString KEY_FILELOGGER_MAXSIZE = FILELOGGER_SETTINGS_KEY("MaxSize");
|
||||
const QString KEY_FILELOGGER_MAXSIZEBYTES = FILELOGGER_SETTINGS_KEY("MaxSizeBytes");
|
||||
const QString KEY_FILELOGGER_AGE = FILELOGGER_SETTINGS_KEY("Age");
|
||||
const QString KEY_FILELOGGER_AGETYPE = FILELOGGER_SETTINGS_KEY("AgeType");
|
||||
|
||||
//just a shortcut
|
||||
// just a shortcut
|
||||
inline SettingsStorage *settings() { return SettingsStorage::instance(); }
|
||||
|
||||
const QString LOG_FOLDER("logs");
|
||||
const char PARAMS_SEPARATOR[] = "|";
|
||||
const QString LOG_FOLDER = QStringLiteral("logs");
|
||||
const QChar PARAMS_SEPARATOR = '|';
|
||||
|
||||
const QString DEFAULT_PORTABLE_MODE_PROFILE_DIR = QLatin1String("profile");
|
||||
const QString DEFAULT_PORTABLE_MODE_PROFILE_DIR = QStringLiteral("profile");
|
||||
|
||||
const int MIN_FILELOG_SIZE = 1024; // 1KiB
|
||||
const int MAX_FILELOG_SIZE = 1000 * 1024 * 1024; // 1000MiB
|
||||
const int DEFAULT_FILELOG_SIZE = 65 * 1024; // 65KiB
|
||||
}
|
||||
|
||||
Application::Application(const QString &id, int &argc, char **argv)
|
||||
@@ -105,6 +115,9 @@ Application::Application(const QString &id, int &argc, char **argv)
|
||||
, m_running(false)
|
||||
, m_shutdownAct(ShutdownDialogAction::Exit)
|
||||
, m_commandLineArgs(parseCommandLine(this->arguments()))
|
||||
#ifndef DISABLE_WEBUI
|
||||
, m_webui(nullptr)
|
||||
#endif
|
||||
{
|
||||
qRegisterMetaType<Log::Msg>("Log::Msg");
|
||||
|
||||
@@ -125,7 +138,6 @@ Application::Application(const QString &id, int &argc, char **argv)
|
||||
if (m_commandLineArgs.webUiPort > 0) // it will be -1 when user did not set any value
|
||||
Preferences::instance()->setWebUiPort(m_commandLineArgs.webUiPort);
|
||||
|
||||
setApplicationName("qBittorrent");
|
||||
initializeTranslation();
|
||||
|
||||
#if !defined(DISABLE_GUI)
|
||||
@@ -134,11 +146,11 @@ Application::Application(const QString &id, int &argc, char **argv)
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_WIN) && !defined(DISABLE_GUI)
|
||||
connect(this, SIGNAL(commitDataRequest(QSessionManager &)), this, SLOT(shutdownCleanup(QSessionManager &)), Qt::DirectConnection);
|
||||
connect(this, &QGuiApplication::commitDataRequest, this, &Application::shutdownCleanup, Qt::DirectConnection);
|
||||
#endif
|
||||
|
||||
connect(this, SIGNAL(messageReceived(const QString &)), SLOT(processMessage(const QString &)));
|
||||
connect(this, SIGNAL(aboutToQuit()), SLOT(cleanup()));
|
||||
connect(this, &Application::messageReceived, this, &Application::processMessage);
|
||||
connect(this, &QCoreApplication::aboutToQuit, this, &Application::cleanup);
|
||||
|
||||
if (isFileLoggerEnabled())
|
||||
m_fileLogger = new FileLogger(fileLoggerPath(), isFileLoggerBackup(), fileLoggerMaxSize(), isFileLoggerDeleteOld(), fileLoggerAge(), static_cast<FileLogger::FileLogAgeType>(fileLoggerAgeType()));
|
||||
@@ -146,6 +158,13 @@ Application::Application(const QString &id, int &argc, char **argv)
|
||||
Logger::instance()->addMessage(tr("qBittorrent %1 started", "qBittorrent v3.2.0alpha started").arg(QBT_VERSION));
|
||||
}
|
||||
|
||||
Application::~Application()
|
||||
{
|
||||
// we still need to call cleanup()
|
||||
// in case the App failed to start
|
||||
cleanup();
|
||||
}
|
||||
|
||||
#ifndef DISABLE_GUI
|
||||
QPointer<MainWindow> Application::mainWindow()
|
||||
{
|
||||
@@ -211,29 +230,22 @@ void Application::setFileLoggerDeleteOld(bool value)
|
||||
|
||||
int Application::fileLoggerMaxSize() const
|
||||
{
|
||||
int val = settings()->loadValue(KEY_FILELOGGER_MAXSIZE, 10).toInt();
|
||||
if (val < 1)
|
||||
return 1;
|
||||
if (val > 1000)
|
||||
return 1000;
|
||||
return val;
|
||||
int val = settings()->loadValue(KEY_FILELOGGER_MAXSIZEBYTES, DEFAULT_FILELOG_SIZE).toInt();
|
||||
return std::min(std::max(val, MIN_FILELOG_SIZE), MAX_FILELOG_SIZE);
|
||||
}
|
||||
|
||||
void Application::setFileLoggerMaxSize(const int value)
|
||||
void Application::setFileLoggerMaxSize(const int bytes)
|
||||
{
|
||||
int clampedValue = std::min(std::max(bytes, MIN_FILELOG_SIZE), MAX_FILELOG_SIZE);
|
||||
if (m_fileLogger)
|
||||
m_fileLogger->setMaxSize(value);
|
||||
settings()->storeValue(KEY_FILELOGGER_MAXSIZE, std::min(std::max(value, 1), 1000));
|
||||
m_fileLogger->setMaxSize(clampedValue);
|
||||
settings()->storeValue(KEY_FILELOGGER_MAXSIZEBYTES, clampedValue);
|
||||
}
|
||||
|
||||
int Application::fileLoggerAge() const
|
||||
{
|
||||
int val = settings()->loadValue(KEY_FILELOGGER_AGE, 6).toInt();
|
||||
if (val < 1)
|
||||
return 1;
|
||||
if (val > 365)
|
||||
return 365;
|
||||
return val;
|
||||
int val = settings()->loadValue(KEY_FILELOGGER_AGE, 1).toInt();
|
||||
return std::min(std::max(val, 1), 365);
|
||||
}
|
||||
|
||||
void Application::setFileLoggerAge(const int value)
|
||||
@@ -244,17 +256,17 @@ void Application::setFileLoggerAge(const int value)
|
||||
int Application::fileLoggerAgeType() const
|
||||
{
|
||||
int val = settings()->loadValue(KEY_FILELOGGER_AGETYPE, 1).toInt();
|
||||
return (val < 0 || val > 2) ? 1 : val;
|
||||
return ((val < 0) || (val > 2)) ? 1 : val;
|
||||
}
|
||||
|
||||
void Application::setFileLoggerAgeType(const int value)
|
||||
{
|
||||
settings()->storeValue(KEY_FILELOGGER_AGETYPE, (value < 0 || value > 2) ? 1 : value);
|
||||
settings()->storeValue(KEY_FILELOGGER_AGETYPE, ((value < 0) || (value > 2)) ? 1 : value);
|
||||
}
|
||||
|
||||
void Application::processMessage(const QString &message)
|
||||
{
|
||||
QStringList params = message.split(QLatin1String(PARAMS_SEPARATOR), QString::SkipEmptyParts);
|
||||
QStringList params = message.split(PARAMS_SEPARATOR, QString::SkipEmptyParts);
|
||||
// If Application is not running (i.e., other
|
||||
// components are not ready) store params
|
||||
if (m_running)
|
||||
@@ -263,66 +275,77 @@ void Application::processMessage(const QString &message)
|
||||
m_paramsQueue.append(params);
|
||||
}
|
||||
|
||||
void Application::runExternalProgram(BitTorrent::TorrentHandle *const torrent) const
|
||||
void Application::runExternalProgram(const BitTorrent::TorrentHandle *torrent) const
|
||||
{
|
||||
QString program = Preferences::instance()->getAutoRunProgram();
|
||||
QString program = Preferences::instance()->getAutoRunProgram().trimmed();
|
||||
program.replace("%N", torrent->name());
|
||||
program.replace("%L", torrent->category());
|
||||
|
||||
QStringList tags = torrent->tags().toList();
|
||||
std::sort(tags.begin(), tags.end(), Utils::String::naturalLessThan<Qt::CaseInsensitive>);
|
||||
program.replace("%G", tags.join(','));
|
||||
|
||||
#if defined(Q_OS_WIN)
|
||||
const auto chopPathSep = [](const QString &str) -> QString
|
||||
{
|
||||
if (str.endsWith('\\'))
|
||||
return str.mid(0, (str.length() -1));
|
||||
return str;
|
||||
};
|
||||
program.replace("%F", chopPathSep(Utils::Fs::toNativePath(torrent->contentPath())));
|
||||
program.replace("%R", chopPathSep(Utils::Fs::toNativePath(torrent->rootPath())));
|
||||
program.replace("%D", chopPathSep(Utils::Fs::toNativePath(torrent->savePath())));
|
||||
#else
|
||||
program.replace("%F", Utils::Fs::toNativePath(torrent->contentPath()));
|
||||
program.replace("%R", Utils::Fs::toNativePath(torrent->rootPath()));
|
||||
program.replace("%D", Utils::Fs::toNativePath(torrent->savePath()));
|
||||
#endif
|
||||
program.replace("%C", QString::number(torrent->filesCount()));
|
||||
program.replace("%Z", QString::number(torrent->totalSize()));
|
||||
program.replace("%T", torrent->currentTracker());
|
||||
program.replace("%I", torrent->hash());
|
||||
|
||||
Logger *logger = Logger::instance();
|
||||
logger->addMessage(tr("Torrent: %1, running external program, command: %2").arg(torrent->name()).arg(program));
|
||||
logger->addMessage(tr("Torrent: %1, running external program, command: %2").arg(torrent->name(), program));
|
||||
|
||||
#if defined(Q_OS_UNIX)
|
||||
QProcess::startDetached(QLatin1String("/bin/sh"), {QLatin1String("-c"), program});
|
||||
#elif defined(Q_OS_WIN) // test cmd: `echo "%F" > "c:\ab ba.txt"`
|
||||
program.prepend(QLatin1String("\"")).append(QLatin1String("\""));
|
||||
program.prepend(Utils::Misc::windowsSystemPath() + QLatin1String("\\cmd.exe /C "));
|
||||
const int cmdMaxLength = 32768; // max length (incl. terminate char) for `lpCommandLine` in `CreateProcessW()`
|
||||
if ((program.size() + 1) > cmdMaxLength) {
|
||||
logger->addMessage(tr("Torrent: %1, run external program command too long (length > %2), execution failed.").arg(torrent->name()).arg(cmdMaxLength), Log::CRITICAL);
|
||||
return;
|
||||
}
|
||||
#if defined(Q_OS_WIN)
|
||||
std::unique_ptr<wchar_t[]> programWchar(new wchar_t[program.length() + 1] {});
|
||||
program.toWCharArray(programWchar.get());
|
||||
|
||||
STARTUPINFOW si = {0};
|
||||
si.cb = sizeof(si);
|
||||
PROCESS_INFORMATION pi = {0};
|
||||
// Need to split arguments manually because QProcess::startDetached(QString)
|
||||
// will strip off empty parameters.
|
||||
// E.g. `python.exe "1" "" "3"` will become `python.exe "1" "3"`
|
||||
int argCount = 0;
|
||||
LPWSTR *args = ::CommandLineToArgvW(programWchar.get(), &argCount);
|
||||
|
||||
WCHAR *arg = new WCHAR[program.size() + 1];
|
||||
program.toWCharArray(arg);
|
||||
arg[program.size()] = L'\0';
|
||||
if (CreateProcessW(NULL, arg, NULL, NULL, FALSE, CREATE_NO_WINDOW, NULL, NULL, &si, &pi)) {
|
||||
CloseHandle(pi.hProcess);
|
||||
CloseHandle(pi.hThread);
|
||||
}
|
||||
delete[] arg;
|
||||
QStringList argList;
|
||||
for (int i = 1; i < argCount; ++i)
|
||||
argList += QString::fromWCharArray(args[i]);
|
||||
|
||||
QProcess::startDetached(QString::fromWCharArray(args[0]), argList);
|
||||
|
||||
::LocalFree(args);
|
||||
#else
|
||||
QProcess::startDetached(program);
|
||||
QProcess::startDetached(QLatin1String("/bin/sh"), {QLatin1String("-c"), program});
|
||||
#endif
|
||||
}
|
||||
|
||||
void Application::sendNotificationEmail(BitTorrent::TorrentHandle *const torrent)
|
||||
void Application::sendNotificationEmail(const BitTorrent::TorrentHandle *torrent)
|
||||
{
|
||||
// Prepare mail content
|
||||
QString content = QObject::tr("Torrent name: %1").arg(torrent->name()) + "\n";
|
||||
content += QObject::tr("Torrent size: %1").arg(Utils::Misc::friendlyUnit(torrent->wantedSize())) + "\n";
|
||||
content += QObject::tr("Save path: %1").arg(torrent->savePath()) + "\n\n";
|
||||
content += QObject::tr("The torrent was downloaded in %1.",
|
||||
"The torrent was downloaded in 1 hour and 20 seconds")
|
||||
.arg(Utils::Misc::userFriendlyDuration(torrent->activeTime())) + "\n\n\n";
|
||||
content += QObject::tr("Thank you for using qBittorrent.") + "\n";
|
||||
const QString content = tr("Torrent name: %1").arg(torrent->name()) + '\n'
|
||||
+ tr("Torrent size: %1").arg(Utils::Misc::friendlyUnit(torrent->wantedSize())) + '\n'
|
||||
+ tr("Save path: %1").arg(torrent->savePath()) + "\n\n"
|
||||
+ tr("The torrent was downloaded in %1.", "The torrent was downloaded in 1 hour and 20 seconds")
|
||||
.arg(Utils::Misc::userFriendlyDuration(torrent->activeTime())) + "\n\n\n"
|
||||
+ tr("Thank you for using qBittorrent.") + '\n';
|
||||
|
||||
// Send the notification email
|
||||
Net::Smtp *sender = new Net::Smtp;
|
||||
sender->sendMail("notification@qbittorrent.org",
|
||||
Preferences::instance()->getMailNotificationEmail(),
|
||||
QObject::tr("[qBittorrent] '%1' has finished downloading").arg(torrent->name()),
|
||||
const Preferences *pref = Preferences::instance();
|
||||
Net::Smtp *smtp = new Net::Smtp(this);
|
||||
smtp->sendMail(pref->getMailNotificationSender(),
|
||||
pref->getMailNotificationEmail(),
|
||||
tr("[qBittorrent] '%1' has finished downloading").arg(torrent->name()),
|
||||
content);
|
||||
}
|
||||
|
||||
@@ -366,7 +389,7 @@ void Application::allTorrentsFinished()
|
||||
// do nothing & skip confirm
|
||||
}
|
||||
else {
|
||||
if (!ShutdownConfirmDlg::askForConfirmation(m_window, action)) return;
|
||||
if (!ShutdownConfirmDialog::askForConfirmation(m_window, action)) return;
|
||||
}
|
||||
#endif // DISABLE_GUI
|
||||
|
||||
@@ -387,7 +410,7 @@ void Application::allTorrentsFinished()
|
||||
|
||||
bool Application::sendParams(const QStringList ¶ms)
|
||||
{
|
||||
return sendMessage(params.join(QLatin1String(PARAMS_SEPARATOR)));
|
||||
return sendMessage(params.join(PARAMS_SEPARATOR));
|
||||
}
|
||||
|
||||
// As program parameters, we can get paths or urls.
|
||||
@@ -416,7 +439,7 @@ void Application::processParams(const QStringList ¶ms)
|
||||
}
|
||||
|
||||
if (param.startsWith(QLatin1String("@addPaused="))) {
|
||||
torrentParams.addPaused = param.mid(11).toInt() ? TriStateBool::True : TriStateBool::False;
|
||||
torrentParams.addPaused = param.midRef(11).toInt() ? TriStateBool::True : TriStateBool::False;
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -441,7 +464,7 @@ void Application::processParams(const QStringList ¶ms)
|
||||
}
|
||||
|
||||
if (param.startsWith(QLatin1String("@skipDialog="))) {
|
||||
skipTorrentDialog = param.mid(12).toInt() ? TriStateBool::True : TriStateBool::False;
|
||||
skipTorrentDialog = param.midRef(12).toInt() ? TriStateBool::True : TriStateBool::False;
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -473,8 +496,8 @@ int Application::exec(const QStringList ¶ms)
|
||||
#endif
|
||||
|
||||
BitTorrent::Session::initInstance();
|
||||
connect(BitTorrent::Session::instance(), SIGNAL(torrentFinished(BitTorrent::TorrentHandle *const)), SLOT(torrentFinished(BitTorrent::TorrentHandle *const)));
|
||||
connect(BitTorrent::Session::instance(), SIGNAL(allTorrentsFinished()), SLOT(allTorrentsFinished()), Qt::QueuedConnection);
|
||||
connect(BitTorrent::Session::instance(), &BitTorrent::Session::torrentFinished, this, &Application::torrentFinished);
|
||||
connect(BitTorrent::Session::instance(), &BitTorrent::Session::allTorrentsFinished, this, &Application::allTorrentsFinished, Qt::QueuedConnection);
|
||||
|
||||
#ifndef DISABLE_COUNTRIES_RESOLUTION
|
||||
Net::GeoIPManager::initInstance();
|
||||
@@ -483,22 +506,31 @@ int Application::exec(const QStringList ¶ms)
|
||||
|
||||
#ifndef DISABLE_WEBUI
|
||||
m_webui = new WebUI;
|
||||
#endif
|
||||
#ifdef DISABLE_GUI
|
||||
if (m_webui->isErrored())
|
||||
return 1;
|
||||
connect(m_webui, &WebUI::fatalError, this, []() { QCoreApplication::exit(1); });
|
||||
#endif // DISABLE_GUI
|
||||
#endif // DISABLE_WEBUI
|
||||
|
||||
new RSS::Session; // create RSS::Session singleton
|
||||
new RSS::AutoDownloader; // create RSS::AutoDownloader singleton
|
||||
new SearchPluginManager;
|
||||
|
||||
#ifdef DISABLE_GUI
|
||||
#ifndef DISABLE_WEBUI
|
||||
Preferences* const pref = Preferences::instance();
|
||||
Preferences *const pref = Preferences::instance();
|
||||
// Display some information to the user
|
||||
std::cout << std::endl << "******** " << qPrintable(tr("Information")) << " ********" << std::endl;
|
||||
std::cout << qPrintable(tr("To control qBittorrent, access the Web UI at http://localhost:%1").arg(QString::number(pref->getWebUiPort()))) << std::endl;
|
||||
std::cout << qPrintable(tr("The Web UI administrator user name is: %1").arg(pref->getWebUiUsername())) << std::endl;
|
||||
const QString mesg = QString("\n******** %1 ********\n").arg(tr("Information"))
|
||||
+ tr("To control qBittorrent, access the Web UI at %1")
|
||||
.arg(QString("http://localhost:") + QString::number(pref->getWebUiPort())) + '\n'
|
||||
+ tr("The Web UI administrator user name is: %1").arg(pref->getWebUiUsername()) + '\n';
|
||||
printf("%s", qUtf8Printable(mesg));
|
||||
qDebug() << "Password:" << pref->getWebUiPassword();
|
||||
if (pref->getWebUiPassword() == "f6fdffe48c908deb0f4c3bd36c032e72") {
|
||||
std::cout << qPrintable(tr("The Web UI administrator password is still the default one: %1").arg("adminadmin")) << std::endl;
|
||||
std::cout << qPrintable(tr("This is a security risk, please consider changing your password from program preferences.")) << std::endl;
|
||||
const QString warning = tr("The Web UI administrator password is still the default one: %1").arg("adminadmin") + '\n'
|
||||
+ tr("This is a security risk, please consider changing your password from program preferences.") + '\n';
|
||||
printf("%s", qUtf8Printable(warning));
|
||||
}
|
||||
#endif // DISABLE_WEBUI
|
||||
#else
|
||||
@@ -506,15 +538,15 @@ int Application::exec(const QStringList ¶ms)
|
||||
#endif // DISABLE_GUI
|
||||
|
||||
m_running = true;
|
||||
|
||||
// Now UI is ready to process signals from Session
|
||||
BitTorrent::Session::instance()->startUpTorrents();
|
||||
|
||||
m_paramsQueue = params + m_paramsQueue;
|
||||
if (!m_paramsQueue.isEmpty()) {
|
||||
processParams(m_paramsQueue);
|
||||
m_paramsQueue.clear();
|
||||
}
|
||||
|
||||
// Now UI is ready to process signals from Session
|
||||
BitTorrent::Session::instance()->startUpTorrents();
|
||||
|
||||
return BaseApplication::exec();
|
||||
}
|
||||
|
||||
@@ -554,7 +586,7 @@ bool Application::event(QEvent *ev)
|
||||
if (path.isEmpty())
|
||||
// Get the url instead
|
||||
path = static_cast<QFileOpenEvent *>(ev)->url().toString();
|
||||
qDebug("Received a mac file open event: %s", qPrintable(path));
|
||||
qDebug("Received a mac file open event: %s", qUtf8Printable(path));
|
||||
if (m_running)
|
||||
processParams(QStringList(path));
|
||||
else
|
||||
@@ -583,22 +615,22 @@ bool Application::notify(QObject *receiver, QEvent *event)
|
||||
|
||||
void Application::initializeTranslation()
|
||||
{
|
||||
Preferences* const pref = Preferences::instance();
|
||||
Preferences *const pref = Preferences::instance();
|
||||
// Load translation
|
||||
QString localeStr = pref->getLocale();
|
||||
|
||||
if (m_qtTranslator.load(QString::fromUtf8("qtbase_") + localeStr, QLibraryInfo::location(QLibraryInfo::TranslationsPath)) ||
|
||||
m_qtTranslator.load(QString::fromUtf8("qt_") + localeStr, QLibraryInfo::location(QLibraryInfo::TranslationsPath)))
|
||||
qDebug("Qt %s locale recognized, using translation.", qPrintable(localeStr));
|
||||
if (m_qtTranslator.load(QLatin1String("qtbase_") + localeStr, QLibraryInfo::location(QLibraryInfo::TranslationsPath)) ||
|
||||
m_qtTranslator.load(QLatin1String("qt_") + localeStr, QLibraryInfo::location(QLibraryInfo::TranslationsPath)))
|
||||
qDebug("Qt %s locale recognized, using translation.", qUtf8Printable(localeStr));
|
||||
else
|
||||
qDebug("Qt %s locale unrecognized, using default (en).", qPrintable(localeStr));
|
||||
qDebug("Qt %s locale unrecognized, using default (en).", qUtf8Printable(localeStr));
|
||||
|
||||
installTranslator(&m_qtTranslator);
|
||||
|
||||
if (m_translator.load(QString::fromUtf8(":/lang/qbittorrent_") + localeStr))
|
||||
qDebug("%s locale recognized, using translation.", qPrintable(localeStr));
|
||||
if (m_translator.load(QLatin1String(":/lang/qbittorrent_") + localeStr))
|
||||
qDebug("%s locale recognized, using translation.", qUtf8Printable(localeStr));
|
||||
else
|
||||
qDebug("%s locale unrecognized, using default (en).", qPrintable(localeStr));
|
||||
qDebug("%s locale unrecognized, using default (en).", qUtf8Printable(localeStr));
|
||||
installTranslator(&m_translator);
|
||||
|
||||
#ifndef DISABLE_GUI
|
||||
@@ -636,49 +668,49 @@ void Application::shutdownCleanup(QSessionManager &manager)
|
||||
// According to the qt docs we shouldn't call quit() inside a slot.
|
||||
// aboutToQuit() is never emitted if the user hits "Cancel" in
|
||||
// the above dialog.
|
||||
QTimer::singleShot(0, qApp, SLOT(quit()));
|
||||
QTimer::singleShot(0, qApp, &QCoreApplication::quit);
|
||||
}
|
||||
#endif
|
||||
|
||||
void Application::cleanup()
|
||||
{
|
||||
#ifndef DISABLE_GUI
|
||||
#ifdef Q_OS_WIN
|
||||
// cleanup() can be called multiple times during shutdown. We only need it once.
|
||||
static QAtomicInt alreadyDone;
|
||||
if (!alreadyDone.testAndSetAcquire(0, 1))
|
||||
return;
|
||||
#endif // Q_OS_WIN
|
||||
|
||||
// Hide the window and not leave it on screen as
|
||||
// unresponsive. Also for Windows take the WinId
|
||||
// after it's hidden, because hide() may cause a
|
||||
// WinId change.
|
||||
m_window->hide();
|
||||
#ifndef DISABLE_GUI
|
||||
if (m_window) {
|
||||
// Hide the window and don't leave it on screen as
|
||||
// unresponsive. Also for Windows take the WinId
|
||||
// after it's hidden, because hide() may cause a
|
||||
// WinId change.
|
||||
m_window->hide();
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
typedef BOOL (WINAPI *PSHUTDOWNBRCREATE)(HWND, LPCWSTR);
|
||||
PSHUTDOWNBRCREATE shutdownBRCreate = (PSHUTDOWNBRCREATE)::GetProcAddress(::GetModuleHandleW(L"User32.dll"), "ShutdownBlockReasonCreate");
|
||||
// Only available on Vista+
|
||||
if (shutdownBRCreate)
|
||||
shutdownBRCreate((HWND)m_window->effectiveWinId(), tr("Saving torrent progress...").toStdWString().c_str());
|
||||
typedef BOOL (WINAPI *PSHUTDOWNBRCREATE)(HWND, LPCWSTR);
|
||||
const auto shutdownBRCreate = Utils::Misc::loadWinAPI<PSHUTDOWNBRCREATE>("User32.dll", "ShutdownBlockReasonCreate");
|
||||
// Only available on Vista+
|
||||
if (shutdownBRCreate)
|
||||
shutdownBRCreate((HWND)m_window->effectiveWinId(), tr("Saving torrent progress...").toStdWString().c_str());
|
||||
#endif // Q_OS_WIN
|
||||
|
||||
// Do manual cleanup in MainWindow to force widgets
|
||||
// to save their Preferences, stop all timers and
|
||||
// delete as many widgets as possible to leave only
|
||||
// a 'shell' MainWindow.
|
||||
// We need a valid window handle for Windows Vista+
|
||||
// otherwise the system shutdown will continue even
|
||||
// though we created a ShutdownBlockReason
|
||||
m_window->cleanup();
|
||||
|
||||
// Do manual cleanup in MainWindow to force widgets
|
||||
// to save their Preferences, stop all timers and
|
||||
// delete as many widgets as possible to leave only
|
||||
// a 'shell' MainWindow.
|
||||
// We need a valid window handle for Windows Vista+
|
||||
// otherwise the system shutdown will continue even
|
||||
// though we created a ShutdownBlockReason
|
||||
m_window->cleanup();
|
||||
}
|
||||
#endif // DISABLE_GUI
|
||||
|
||||
#ifndef DISABLE_WEBUI
|
||||
delete m_webui;
|
||||
#endif
|
||||
|
||||
delete SearchPluginManager::instance();
|
||||
delete RSS::AutoDownloader::instance();
|
||||
delete RSS::Session::instance();
|
||||
|
||||
@@ -697,14 +729,16 @@ void Application::cleanup()
|
||||
Utils::Fs::removeDirRecursive(Utils::Fs::tempPath());
|
||||
|
||||
#ifndef DISABLE_GUI
|
||||
if (m_window) {
|
||||
#ifdef Q_OS_WIN
|
||||
typedef BOOL (WINAPI *PSHUTDOWNBRDESTROY)(HWND);
|
||||
PSHUTDOWNBRDESTROY shutdownBRDestroy = (PSHUTDOWNBRDESTROY)::GetProcAddress(::GetModuleHandleW(L"User32.dll"), "ShutdownBlockReasonDestroy");
|
||||
// Only available on Vista+
|
||||
if (shutdownBRDestroy)
|
||||
shutdownBRDestroy((HWND)m_window->effectiveWinId());
|
||||
typedef BOOL (WINAPI *PSHUTDOWNBRDESTROY)(HWND);
|
||||
const auto shutdownBRDestroy = Utils::Misc::loadWinAPI<PSHUTDOWNBRDESTROY>("User32.dll", "ShutdownBlockReasonDestroy");
|
||||
// Only available on Vista+
|
||||
if (shutdownBRDestroy)
|
||||
shutdownBRDestroy((HWND)m_window->effectiveWinId());
|
||||
#endif // Q_OS_WIN
|
||||
delete m_window;
|
||||
delete m_window;
|
||||
}
|
||||
#endif // DISABLE_GUI
|
||||
|
||||
if (m_shutdownAct != ShutdownDialogAction::Exit) {
|
||||
|
||||
@@ -40,15 +40,13 @@ typedef QtSingleApplication BaseApplication;
|
||||
class MainWindow;
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QSessionManager;
|
||||
QT_END_NAMESPACE
|
||||
#endif // Q_OS_WIN
|
||||
|
||||
#else
|
||||
#include "qtsinglecoreapplication.h"
|
||||
typedef QtSingleCoreApplication BaseApplication;
|
||||
#endif
|
||||
#endif // DISABLE_GUI
|
||||
|
||||
#include "base/utils/misc.h"
|
||||
#include "cmdoptions.h"
|
||||
@@ -73,9 +71,11 @@ namespace RSS
|
||||
class Application : public BaseApplication
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_DISABLE_COPY(Application)
|
||||
|
||||
public:
|
||||
Application(const QString &id, int &argc, char **argv);
|
||||
~Application() override;
|
||||
|
||||
#if (defined(Q_OS_WIN) && !defined(DISABLE_GUI))
|
||||
bool isRunning();
|
||||
@@ -99,7 +99,7 @@ public:
|
||||
bool isFileLoggerDeleteOld() const;
|
||||
void setFileLoggerDeleteOld(bool value);
|
||||
int fileLoggerMaxSize() const;
|
||||
void setFileLoggerMaxSize(const int value);
|
||||
void setFileLoggerMaxSize(const int bytes);
|
||||
int fileLoggerAge() const;
|
||||
void setFileLoggerAge(const int value);
|
||||
int fileLoggerAgeType() const;
|
||||
@@ -108,9 +108,9 @@ public:
|
||||
protected:
|
||||
#ifndef DISABLE_GUI
|
||||
#ifdef Q_OS_MAC
|
||||
bool event(QEvent *);
|
||||
bool event(QEvent *) override;
|
||||
#endif
|
||||
bool notify(QObject* receiver, QEvent* event);
|
||||
bool notify(QObject *receiver, QEvent *event) override;
|
||||
#endif
|
||||
|
||||
private slots:
|
||||
@@ -132,7 +132,7 @@ private:
|
||||
#endif
|
||||
|
||||
#ifndef DISABLE_WEBUI
|
||||
QPointer<WebUI> m_webui;
|
||||
WebUI *m_webui;
|
||||
#endif
|
||||
|
||||
// FileLog
|
||||
@@ -144,8 +144,8 @@ private:
|
||||
|
||||
void initializeTranslation();
|
||||
void processParams(const QStringList ¶ms);
|
||||
void runExternalProgram(BitTorrent::TorrentHandle *const torrent) const;
|
||||
void sendNotificationEmail(BitTorrent::TorrentHandle *const torrent);
|
||||
void runExternalProgram(const BitTorrent::TorrentHandle *torrent) const;
|
||||
void sendNotificationEmail(const BitTorrent::TorrentHandle *torrent);
|
||||
void validateCommandLineParameters();
|
||||
};
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Bittorrent Client using Qt and libtorrent.
|
||||
* Copyright (C) 2016 Eugene Shalygin <eugene.shalygin@gmail.com>
|
||||
* Copyright (C) 2014 Vladimir Golovnev <glassez@yandex.ru>
|
||||
* Copyright (C) 2006 Christophe Dumez
|
||||
* Copyright (C) 2006 Christophe Dumez <chris@qbittorrent.org>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
@@ -26,13 +26,11 @@
|
||||
* modify file(s), you may extend this exception to your version of the file(s),
|
||||
* but you are not obligated to do so. If you do not wish to do so, delete this
|
||||
* exception statement from your version.
|
||||
*
|
||||
* Contact : chris@qbittorrent.org
|
||||
*/
|
||||
|
||||
#include "cmdoptions.h"
|
||||
|
||||
#include <iostream>
|
||||
#include <cstdio>
|
||||
|
||||
#include <QDebug>
|
||||
#include <QFileInfo>
|
||||
@@ -100,7 +98,7 @@ namespace
|
||||
};
|
||||
|
||||
// Boolean option.
|
||||
class BoolOption: protected Option
|
||||
class BoolOption : protected Option
|
||||
{
|
||||
public:
|
||||
constexpr BoolOption(const char *name, char shortcut = 0)
|
||||
@@ -118,7 +116,7 @@ namespace
|
||||
{
|
||||
QString val = env.value(envVarName());
|
||||
// we accept "1" and "true" (upper or lower cased) as boolean 'true' values
|
||||
return (val == QLatin1String("1") || val.toUpper() == QLatin1String("TRUE"));
|
||||
return ((val == QLatin1String("1")) || (val.toUpper() == QLatin1String("TRUE")));
|
||||
}
|
||||
|
||||
QString usage() const
|
||||
@@ -137,7 +135,7 @@ namespace
|
||||
}
|
||||
|
||||
// Option with string value. May not have a shortcut
|
||||
struct StringOption: protected Option
|
||||
struct StringOption : protected Option
|
||||
{
|
||||
public:
|
||||
constexpr StringOption(const char *name)
|
||||
@@ -184,7 +182,7 @@ namespace
|
||||
}
|
||||
|
||||
// Option with integer value. May not have a shortcut
|
||||
class IntOption: protected StringOption
|
||||
class IntOption : protected StringOption
|
||||
{
|
||||
public:
|
||||
constexpr IntOption(const char *name)
|
||||
@@ -216,7 +214,7 @@ namespace
|
||||
int res = val.toInt(&ok);
|
||||
if (!ok) {
|
||||
qDebug() << QObject::tr("Expected integer number in environment variable '%1', but got '%2'")
|
||||
.arg(envVarName()).arg(val);
|
||||
.arg(envVarName(), val);
|
||||
return defaultValue;
|
||||
}
|
||||
return res;
|
||||
@@ -230,7 +228,7 @@ namespace
|
||||
|
||||
// Option that is explicitly set to true or false, and whose value is undefined when unspecified.
|
||||
// May not have a shortcut.
|
||||
class TriStateBoolOption: protected Option
|
||||
class TriStateBoolOption : protected Option
|
||||
{
|
||||
public:
|
||||
constexpr TriStateBoolOption(const char *name, bool defaultValue)
|
||||
@@ -260,10 +258,10 @@ namespace
|
||||
else if (parts.size() == 2) {
|
||||
QString val = parts[1];
|
||||
|
||||
if (val.toUpper() == QLatin1String("TRUE") || val == QLatin1String("1")) {
|
||||
if ((val.toUpper() == QLatin1String("TRUE")) || (val == QLatin1String("1"))) {
|
||||
return TriStateBool::True;
|
||||
}
|
||||
else if (val.toUpper() == QLatin1String("FALSE") || val == QLatin1String("0")) {
|
||||
else if ((val.toUpper() == QLatin1String("FALSE")) || (val == QLatin1String("0"))) {
|
||||
return TriStateBool::False;
|
||||
}
|
||||
}
|
||||
@@ -285,15 +283,15 @@ namespace
|
||||
else if (val == QLatin1String("-1")) {
|
||||
return TriStateBool::Undefined;
|
||||
}
|
||||
else if (val.toUpper() == QLatin1String("TRUE") || val == QLatin1String("1")) {
|
||||
else if ((val.toUpper() == QLatin1String("TRUE")) || (val == QLatin1String("1"))) {
|
||||
return TriStateBool::True;
|
||||
}
|
||||
else if (val.toUpper() == QLatin1String("FALSE") || val == QLatin1String("0")) {
|
||||
else if ((val.toUpper() == QLatin1String("FALSE")) || (val == QLatin1String("0"))) {
|
||||
return TriStateBool::False;
|
||||
}
|
||||
else {
|
||||
qDebug() << QObject::tr("Expected %1 in environment variable '%2', but got '%3'")
|
||||
.arg(QLatin1String("true|false")).arg(envVarName()).arg(val);
|
||||
.arg(QLatin1String("true|false"), envVarName(), val);
|
||||
return TriStateBool::Undefined;
|
||||
}
|
||||
}
|
||||
@@ -360,7 +358,7 @@ QStringList QBtCommandLineParameters::paramList() const
|
||||
// the user has specified. Here we place special strings that are
|
||||
// almost certainly not going to collide with a file path or URL
|
||||
// specified by the user, and placing them at the beginning of the
|
||||
// string listr so that they will be processed before the list of
|
||||
// string list so that they will be processed before the list of
|
||||
// torrent paths or URLs.
|
||||
|
||||
if (!savePath.isEmpty())
|
||||
@@ -404,9 +402,9 @@ QBtCommandLineParameters parseCommandLine(const QStringList &args)
|
||||
const QString &arg = args[i];
|
||||
|
||||
if ((arg.startsWith("--") && !arg.endsWith(".torrent"))
|
||||
|| (arg.startsWith("-") && (arg.size() == 2))) {
|
||||
|| (arg.startsWith('-') && (arg.size() == 2))) {
|
||||
// Parse known parameters
|
||||
if ((arg == SHOW_HELP_OPTION)) {
|
||||
if (arg == SHOW_HELP_OPTION) {
|
||||
result.showHelp = true;
|
||||
}
|
||||
#ifndef Q_OS_WIN
|
||||
@@ -417,7 +415,7 @@ QBtCommandLineParameters parseCommandLine(const QStringList &args)
|
||||
else if (arg == WEBUI_PORT_OPTION) {
|
||||
result.webUiPort = WEBUI_PORT_OPTION.value(arg);
|
||||
if ((result.webUiPort < 1) || (result.webUiPort > 65535))
|
||||
throw CommandLineParameterError(QObject::tr("%1 must specify the correct port (1 to 65535).")
|
||||
throw CommandLineParameterError(QObject::tr("%1 must specify a valid port (1 to 65535).")
|
||||
.arg(QLatin1String("--webui-port")));
|
||||
}
|
||||
#ifndef DISABLE_GUI
|
||||
@@ -501,7 +499,7 @@ QString wrapText(const QString &text, int initialIndentation = USAGE_TEXT_COLUMN
|
||||
|
||||
foreach (const QString &word, words.mid(1)) {
|
||||
if (lines.last().length() + word.length() + 1 < currentLineMaxLength) {
|
||||
lines.last().append(" " + word);
|
||||
lines.last().append(' ' + word);
|
||||
}
|
||||
else {
|
||||
lines.append(QString(initialIndentation, ' ') + word);
|
||||
@@ -509,7 +507,7 @@ QString wrapText(const QString &text, int initialIndentation = USAGE_TEXT_COLUMN
|
||||
}
|
||||
}
|
||||
|
||||
return lines.join("\n");
|
||||
return lines.join('\n');
|
||||
}
|
||||
|
||||
QString makeUsage(const QString &prgName)
|
||||
@@ -523,11 +521,11 @@ QString makeUsage(const QString &prgName)
|
||||
|
||||
stream << QObject::tr("Options:") << '\n';
|
||||
#ifndef Q_OS_WIN
|
||||
stream << SHOW_VERSION_OPTION.usage() << wrapText(QObject::tr("Displays program version and exit")) << '\n';
|
||||
stream << SHOW_VERSION_OPTION.usage() << wrapText(QObject::tr("Display program version and exit")) << '\n';
|
||||
#endif
|
||||
stream << SHOW_HELP_OPTION.usage() << wrapText(QObject::tr("Displays this help message and exit")) << '\n';
|
||||
stream << SHOW_HELP_OPTION.usage() << wrapText(QObject::tr("Display this help message and exit")) << '\n';
|
||||
stream << WEBUI_PORT_OPTION.usage(QObject::tr("port"))
|
||||
<< wrapText(QObject::tr("Changes the Web UI port"))
|
||||
<< wrapText(QObject::tr("Change the Web UI port"))
|
||||
<< '\n';
|
||||
#ifndef DISABLE_GUI
|
||||
stream << NO_SPLASH_OPTION.usage() << wrapText(QObject::tr("Disable splash screen")) << '\n';
|
||||
@@ -543,9 +541,10 @@ QString makeUsage(const QString &prgName)
|
||||
<< wrapText(QObject::tr("Hack into libtorrent fastresume files and make file paths relative "
|
||||
"to the profile directory")) << '\n';
|
||||
stream << PORTABLE_OPTION.usage()
|
||||
<< wrapText(QObject::tr("Shortcut for --profile=<exe dir>/profile --relative-fastresume")) << '\n';
|
||||
stream << Option::padUsageText(QObject::tr("files or urls"))
|
||||
<< wrapText(QObject::tr("Downloads the torrents passed by the user")) << '\n'
|
||||
<< wrapText(QObject::tr("Shortcut for %1", "Shortcut for --profile=<exe dir>/profile --relative-fastresume")
|
||||
.arg(QLatin1String("--profile=<exe dir>/profile --relative-fastresume"))) << '\n';
|
||||
stream << Option::padUsageText(QObject::tr("files or URLs"))
|
||||
<< wrapText(QObject::tr("Download the torrents passed by the user")) << '\n'
|
||||
<< '\n';
|
||||
|
||||
stream << wrapText(QObject::tr("Options when adding new torrents:"), 0) << '\n';
|
||||
@@ -559,7 +558,7 @@ QString makeUsage(const QString &prgName)
|
||||
stream << FIRST_AND_LAST_OPTION.usage()
|
||||
<< wrapText(QObject::tr("Download first and last pieces first")) << '\n';
|
||||
stream << SKIP_DIALOG_OPTION.usage()
|
||||
<< wrapText(QObject::tr("Specifies whether the \"Add New Torrent\" dialog opens when adding a "
|
||||
<< wrapText(QObject::tr("Specify whether the \"Add New Torrent\" dialog opens when adding a "
|
||||
"torrent.")) << '\n';
|
||||
stream << '\n';
|
||||
|
||||
@@ -577,7 +576,7 @@ QString makeUsage(const QString &prgName)
|
||||
void displayUsage(const QString &prgName)
|
||||
{
|
||||
#ifndef Q_OS_WIN
|
||||
std::cout << qPrintable(makeUsage(prgName)) << std::endl;
|
||||
printf("%s\n", qUtf8Printable(makeUsage(prgName)));
|
||||
#else
|
||||
QMessageBox msgBox(QMessageBox::Information, QObject::tr("Help"), makeUsage(prgName), QMessageBox::Ok);
|
||||
msgBox.show(); // Need to be shown or to moveToCenter does not work
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Bittorrent Client using Qt and libtorrent.
|
||||
* Copyright (C) 2016 Eugene Shalygin <eugene.shalygin@gmail.com>
|
||||
* Copyright (C) 2014 Vladimir Golovnev <glassez@yandex.ru>
|
||||
* Copyright (C) 2006 Christophe Dumez
|
||||
* Copyright (C) 2006 Christophe Dumez <chris@qbittorrent.org>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
@@ -26,8 +26,6 @@
|
||||
* modify file(s), you may extend this exception to your version of the file(s),
|
||||
* but you are not obligated to do so. If you do not wish to do so, delete this
|
||||
* exception statement from your version.
|
||||
*
|
||||
* Contact : chris@qbittorrent.org
|
||||
*/
|
||||
|
||||
#ifndef APP_OPTIONS_H
|
||||
@@ -62,11 +60,11 @@ struct QBtCommandLineParameters
|
||||
QStringList paramList() const;
|
||||
};
|
||||
|
||||
class CommandLineParameterError: public std::runtime_error
|
||||
class CommandLineParameterError : public std::runtime_error
|
||||
{
|
||||
public:
|
||||
CommandLineParameterError(const QString &messageForUser);
|
||||
const QString& messageForUser() const;
|
||||
const QString &messageForUser() const;
|
||||
|
||||
private:
|
||||
const QString m_messageForUser;
|
||||
|
||||
@@ -26,11 +26,13 @@
|
||||
* exception statement from your version.
|
||||
*/
|
||||
|
||||
#include "filelogger.h"
|
||||
|
||||
#include <QDateTime>
|
||||
#include <QDir>
|
||||
#include <QFile>
|
||||
#include <QTextStream>
|
||||
#include "filelogger.h"
|
||||
|
||||
#include "base/logger.h"
|
||||
#include "base/utils/fs.h"
|
||||
|
||||
@@ -41,17 +43,17 @@ FileLogger::FileLogger(const QString &path, const bool backup, const int maxSize
|
||||
{
|
||||
m_flusher.setInterval(0);
|
||||
m_flusher.setSingleShot(true);
|
||||
connect(&m_flusher, SIGNAL(timeout()), SLOT(flushLog()));
|
||||
connect(&m_flusher, &QTimer::timeout, this, &FileLogger::flushLog);
|
||||
|
||||
changePath(path);
|
||||
if (deleteOld)
|
||||
this->deleteOld(age, ageType);
|
||||
|
||||
const Logger* const logger = Logger::instance();
|
||||
foreach (const Log::Msg& msg, logger->getMessages())
|
||||
const Logger *const logger = Logger::instance();
|
||||
foreach (const Log::Msg &msg, logger->getMessages())
|
||||
addLogMessage(msg);
|
||||
|
||||
connect(logger, SIGNAL(newLogMessage(const Log::Msg &)), SLOT(addLogMessage(const Log::Msg &)));
|
||||
connect(logger, &Logger::newLogMessage, this, &FileLogger::addLogMessage);
|
||||
}
|
||||
|
||||
FileLogger::~FileLogger()
|
||||
@@ -61,7 +63,7 @@ FileLogger::~FileLogger()
|
||||
delete m_logFile;
|
||||
}
|
||||
|
||||
void FileLogger::changePath(const QString& newPath)
|
||||
void FileLogger::changePath(const QString &newPath)
|
||||
{
|
||||
QString tmpPath = Utils::Fs::fromNativePath(newPath);
|
||||
QDir dir(tmpPath);
|
||||
@@ -83,21 +85,21 @@ void FileLogger::changePath(const QString& newPath)
|
||||
void FileLogger::deleteOld(const int age, const FileLogAgeType ageType)
|
||||
{
|
||||
QDateTime date = QDateTime::currentDateTime();
|
||||
QDir dir(m_path);
|
||||
|
||||
switch (ageType) {
|
||||
case DAYS:
|
||||
date = date.addDays(age);
|
||||
break;
|
||||
case MONTHS:
|
||||
date = date.addMonths(age);
|
||||
break;
|
||||
default:
|
||||
date = date.addYears(age);
|
||||
}
|
||||
QDir dir(Utils::Fs::branchPath(m_path));
|
||||
|
||||
foreach (const QFileInfo file, dir.entryInfoList(QStringList("qbittorrent.log.bak*"), QDir::Files | QDir::Writable, QDir::Time | QDir::Reversed)) {
|
||||
if (file.lastModified() < date)
|
||||
QDateTime modificationDate = file.lastModified();
|
||||
switch (ageType) {
|
||||
case DAYS:
|
||||
modificationDate = modificationDate.addDays(age);
|
||||
break;
|
||||
case MONTHS:
|
||||
modificationDate = modificationDate.addMonths(age);
|
||||
break;
|
||||
default:
|
||||
modificationDate = modificationDate.addYears(age);
|
||||
}
|
||||
if (modificationDate > date)
|
||||
break;
|
||||
Utils::Fs::forceRemove(file.absoluteFilePath());
|
||||
}
|
||||
@@ -135,7 +137,7 @@ void FileLogger::addLogMessage(const Log::Msg &msg)
|
||||
|
||||
str << QDateTime::fromMSecsSinceEpoch(msg.timestamp).toString(Qt::ISODate) << " - " << msg.message << endl;
|
||||
|
||||
if (m_backup && (m_logFile->size() >= (m_maxSize * 1024 * 1024))) {
|
||||
if (m_backup && (m_logFile->size() >= m_maxSize)) {
|
||||
closeLogFile();
|
||||
int counter = 0;
|
||||
QString backupLogFilename = m_path + ".bak";
|
||||
@@ -165,7 +167,7 @@ void FileLogger::openLogFile()
|
||||
|| !m_logFile->setPermissions(QFile::ReadOwner | QFile::WriteOwner)) {
|
||||
delete m_logFile;
|
||||
m_logFile = nullptr;
|
||||
Logger::instance()->addMessage(tr("An error occured while trying to open the log file. Logging to file is disabled."), Log::CRITICAL);
|
||||
Logger::instance()->addMessage(tr("An error occurred while trying to open the log file. Logging to file is disabled."), Log::CRITICAL);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -76,4 +76,3 @@ private:
|
||||
};
|
||||
|
||||
#endif // FILELOGGER_H
|
||||
|
||||
|
||||
149
src/app/main.cpp
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Bittorrent Client using Qt and libtorrent.
|
||||
* Copyright (C) 2014 Vladimir Golovnev <glassez@yandex.ru>
|
||||
* Copyright (C) 2006 Christophe Dumez
|
||||
* Copyright (C) 2006 Christophe Dumez <chris@qbittorrent.org>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
@@ -25,10 +25,10 @@
|
||||
* modify file(s), you may extend this exception to your version of the file(s),
|
||||
* but you are not obligated to do so. If you do not wish to do so, delete this
|
||||
* exception statement from your version.
|
||||
*
|
||||
* Contact : chris@qbittorrent.org
|
||||
*/
|
||||
|
||||
#include <cstdlib>
|
||||
|
||||
#include <QDebug>
|
||||
#include <QScopedPointer>
|
||||
#include <QThread>
|
||||
@@ -55,44 +55,45 @@ Q_IMPORT_PLUGIN(QICOPlugin)
|
||||
#endif
|
||||
#endif // DISABLE_GUI
|
||||
|
||||
#include <signal.h>
|
||||
#ifdef STACKTRACE
|
||||
#ifdef Q_OS_UNIX
|
||||
#include <signal.h>
|
||||
#include <execinfo.h>
|
||||
#include "stacktrace.h"
|
||||
#endif // Q_OS_UNIX
|
||||
|
||||
#ifdef STACKTRACE_WIN
|
||||
#include <signal.h>
|
||||
#else
|
||||
#include "stacktrace_win.h"
|
||||
#include "stacktrace_win_dlg.h"
|
||||
#endif //STACKTRACE_WIN
|
||||
#include "stacktracedialog.h"
|
||||
#endif // Q_OS_UNIX
|
||||
#endif //STACKTRACE
|
||||
|
||||
#include <cstdlib>
|
||||
#include <iostream>
|
||||
|
||||
#include "application.h"
|
||||
#include "base/preferences.h"
|
||||
#include "base/profile.h"
|
||||
#include "base/utils/misc.h"
|
||||
#include "base/preferences.h"
|
||||
#include "application.h"
|
||||
#include "cmdoptions.h"
|
||||
|
||||
#include "upgrade.h"
|
||||
|
||||
// Signal handlers
|
||||
#if defined(Q_OS_UNIX) || defined(STACKTRACE_WIN)
|
||||
void sigNormalHandler(int signum);
|
||||
#ifdef STACKTRACE
|
||||
void sigAbnormalHandler(int signum);
|
||||
#endif
|
||||
// sys_signame[] is only defined in BSD
|
||||
const char *sysSigName[] = {
|
||||
#if defined(Q_OS_WIN)
|
||||
"", "", "SIGINT", "", "SIGILL", "", "SIGABRT_COMPAT", "", "SIGFPE", "",
|
||||
"", "SIGSEGV", "", "", "", "SIGTERM", "", "", "", "",
|
||||
"", "SIGBREAK", "SIGABRT", "", "", "", "", "", "", "",
|
||||
"", ""
|
||||
#else
|
||||
"", "SIGHUP", "SIGINT", "SIGQUIT", "SIGILL", "SIGTRAP", "SIGABRT", "SIGBUS", "SIGFPE", "SIGKILL",
|
||||
"SIGUSR1", "SIGSEGV", "SIGUSR2", "SIGPIPE", "SIGALRM", "SIGTERM", "SIGSTKFLT", "SIGCHLD", "SIGCONT", "SIGSTOP",
|
||||
"SIGTSTP", "SIGTTIN", "SIGTTOU", "SIGURG", "SIGXCPU", "SIGXFSZ", "SIGVTALRM", "SIGPROF", "SIGWINCH", "SIGIO",
|
||||
"SIGPWR", "SIGUNUSED"
|
||||
};
|
||||
#endif
|
||||
};
|
||||
|
||||
#if !defined Q_OS_WIN && !defined Q_OS_HAIKU
|
||||
void reportToUser(const char* str);
|
||||
void reportToUser(const char *str);
|
||||
#endif
|
||||
|
||||
void displayVersion();
|
||||
@@ -101,10 +102,6 @@ void displayBadArgMessage(const QString &message);
|
||||
|
||||
#if !defined(DISABLE_GUI)
|
||||
void showSplashScreen();
|
||||
|
||||
#if defined(Q_OS_UNIX)
|
||||
void setupDpi();
|
||||
#endif // Q_OS_UNIX
|
||||
#endif // DISABLE_GUI
|
||||
|
||||
// Main
|
||||
@@ -119,10 +116,6 @@ int main(int argc, char *argv[])
|
||||
macMigratePlists();
|
||||
#endif
|
||||
|
||||
#if !defined(DISABLE_GUI) && defined(Q_OS_UNIX)
|
||||
setupDpi();
|
||||
#endif
|
||||
|
||||
try {
|
||||
// Create Application
|
||||
QString appId = QLatin1String("qBittorrent-") + Utils::Misc::getUserIDString();
|
||||
@@ -162,7 +155,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
// Set environment variable
|
||||
if (!qputenv("QBITTORRENT", QBT_VERSION))
|
||||
std::cerr << "Couldn't set environment variable...\n";
|
||||
fprintf(stderr, "Couldn't set environment variable...\n");
|
||||
|
||||
#ifndef DISABLE_GUI
|
||||
if (!userAgreesWithLegalNotice())
|
||||
@@ -205,6 +198,10 @@ int main(int argc, char *argv[])
|
||||
// 3. https://bugreports.qt.io/browse/QTBUG-46015
|
||||
|
||||
qputenv("QT_BEARER_POLL_TIMEOUT", QByteArray::number(-1));
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0))
|
||||
// this is the default in Qt6
|
||||
app->setAttribute(Qt::AA_DisableWindowContextHelpButton);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_MAC)
|
||||
@@ -214,7 +211,7 @@ int main(int argc, char *argv[])
|
||||
QByteArray path = "/usr/local/bin:";
|
||||
path += qgetenv("PATH");
|
||||
qputenv("PATH", path.constData());
|
||||
|
||||
|
||||
// On OS X the standard is to not show icons in the menus
|
||||
app->setAttribute(Qt::AA_DontShowIconsInMenus);
|
||||
#endif
|
||||
@@ -229,7 +226,7 @@ int main(int argc, char *argv[])
|
||||
#ifdef DISABLE_GUI
|
||||
if (params.shouldDaemonize) {
|
||||
app.reset(); // Destroy current application
|
||||
if ((daemon(1, 0) == 0)) {
|
||||
if (daemon(1, 0) == 0) {
|
||||
app.reset(new Application(appId, argc, argv));
|
||||
if (app->isRunning()) {
|
||||
// Another instance had time to start.
|
||||
@@ -246,9 +243,9 @@ int main(int argc, char *argv[])
|
||||
showSplashScreen();
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_UNIX) || defined(STACKTRACE_WIN)
|
||||
signal(SIGINT, sigNormalHandler);
|
||||
signal(SIGTERM, sigNormalHandler);
|
||||
#ifdef STACKTRACE
|
||||
signal(SIGABRT, sigAbnormalHandler);
|
||||
signal(SIGSEGV, sigAbnormalHandler);
|
||||
#endif
|
||||
@@ -262,7 +259,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
#if !defined Q_OS_WIN && !defined Q_OS_HAIKU
|
||||
void reportToUser(const char* str)
|
||||
void reportToUser(const char *str)
|
||||
{
|
||||
const size_t strLen = strlen(str);
|
||||
if (write(STDERR_FILENO, str, strLen) < static_cast<ssize_t>(strLen)) {
|
||||
@@ -272,73 +269,67 @@ void reportToUser(const char* str)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_UNIX) || defined(STACKTRACE_WIN)
|
||||
void sigNormalHandler(int signum)
|
||||
{
|
||||
#if !defined Q_OS_WIN && !defined Q_OS_HAIKU
|
||||
const char str1[] = "Catching signal: ";
|
||||
const char *sigName = sysSigName[signum];
|
||||
const char str2[] = "\nExiting cleanly\n";
|
||||
reportToUser(str1);
|
||||
reportToUser(sigName);
|
||||
reportToUser(str2);
|
||||
const char msg1[] = "Catching signal: ";
|
||||
const char msg2[] = "\nExiting cleanly\n";
|
||||
reportToUser(msg1);
|
||||
reportToUser(sysSigName[signum]);
|
||||
reportToUser(msg2);
|
||||
#endif // !defined Q_OS_WIN && !defined Q_OS_HAIKU
|
||||
signal(signum, SIG_DFL);
|
||||
qApp->exit(); // unsafe, but exit anyway
|
||||
}
|
||||
|
||||
#ifdef STACKTRACE
|
||||
void sigAbnormalHandler(int signum)
|
||||
{
|
||||
#if !defined Q_OS_WIN && !defined Q_OS_HAIKU
|
||||
const char str1[] = "\n\n*************************************************************\nCatching signal: ";
|
||||
const char *sigName = sysSigName[signum];
|
||||
const char str2[] = "\nPlease file a bug report at http://bug.qbittorrent.org and provide the following information:\n\n"
|
||||
"qBittorrent version: " QBT_VERSION "\n";
|
||||
reportToUser(str1);
|
||||
#if !defined Q_OS_WIN && !defined Q_OS_HAIKU
|
||||
const char msg[] = "\n\n*************************************************************\n"
|
||||
"Please file a bug report at http://bug.qbittorrent.org and provide the following information:\n\n"
|
||||
"qBittorrent version: " QBT_VERSION "\n\n"
|
||||
"Caught signal: ";
|
||||
reportToUser(msg);
|
||||
reportToUser(sigName);
|
||||
reportToUser(str2);
|
||||
reportToUser("\n");
|
||||
print_stacktrace(); // unsafe
|
||||
#endif // !defined Q_OS_WIN && !defined Q_OS_HAIKU
|
||||
#ifdef STACKTRACE_WIN
|
||||
StraceDlg dlg; // unsafe
|
||||
dlg.setStacktraceString(straceWin::getBacktrace());
|
||||
#endif
|
||||
|
||||
#if defined Q_OS_WIN
|
||||
StacktraceDialog dlg; // unsafe
|
||||
dlg.setStacktraceString(QLatin1String(sigName), straceWin::getBacktrace());
|
||||
dlg.exec();
|
||||
#endif // STACKTRACE_WIN
|
||||
#endif
|
||||
|
||||
signal(signum, SIG_DFL);
|
||||
raise(signum);
|
||||
}
|
||||
#endif // defined(Q_OS_UNIX) || defined(STACKTRACE_WIN)
|
||||
#endif // STACKTRACE
|
||||
|
||||
#if !defined(DISABLE_GUI)
|
||||
void showSplashScreen()
|
||||
{
|
||||
QPixmap splash_img(":/icons/skin/splash.png");
|
||||
QPainter painter(&splash_img);
|
||||
QPixmap splashImg(":/icons/skin/splash.png");
|
||||
QPainter painter(&splashImg);
|
||||
QString version = QBT_VERSION;
|
||||
painter.setPen(QPen(Qt::white));
|
||||
painter.setFont(QFont("Arial", 22, QFont::Black));
|
||||
painter.drawText(224 - painter.fontMetrics().width(version), 270, version);
|
||||
QSplashScreen *splash = new QSplashScreen(splash_img);
|
||||
QSplashScreen *splash = new QSplashScreen(splashImg);
|
||||
splash->show();
|
||||
QTimer::singleShot(1500, splash, SLOT(deleteLater()));
|
||||
QTimer::singleShot(1500, splash, &QObject::deleteLater);
|
||||
qApp->processEvents();
|
||||
}
|
||||
|
||||
#if defined(Q_OS_UNIX)
|
||||
void setupDpi()
|
||||
{
|
||||
if (qgetenv("QT_AUTO_SCREEN_SCALE_FACTOR").isEmpty())
|
||||
qputenv("QT_AUTO_SCREEN_SCALE_FACTOR", "1");
|
||||
}
|
||||
#endif // Q_OS_UNIX
|
||||
#endif // DISABLE_GUI
|
||||
|
||||
void displayVersion()
|
||||
{
|
||||
std::cout << qPrintable(qApp->applicationName()) << " " << QBT_VERSION << std::endl;
|
||||
printf("%s %s\n", qUtf8Printable(qApp->applicationName()), QBT_VERSION);
|
||||
}
|
||||
|
||||
void displayBadArgMessage(const QString& message)
|
||||
void displayBadArgMessage(const QString &message)
|
||||
{
|
||||
QString help = QObject::tr("Run application with -h option to read about command line parameters.");
|
||||
#ifdef Q_OS_WIN
|
||||
@@ -348,24 +339,28 @@ void displayBadArgMessage(const QString& message)
|
||||
msgBox.move(Utils::Misc::screenCenter(&msgBox));
|
||||
msgBox.exec();
|
||||
#else
|
||||
std::cerr << qPrintable(QObject::tr("Bad command line: "));
|
||||
std::cerr << qPrintable(message) << std::endl;
|
||||
std::cerr << qPrintable(help) << std::endl;
|
||||
const QString errMsg = QObject::tr("Bad command line: ") + '\n'
|
||||
+ message + '\n'
|
||||
+ help + '\n';
|
||||
fprintf(stderr, "%s", qUtf8Printable(errMsg));
|
||||
#endif
|
||||
}
|
||||
|
||||
bool userAgreesWithLegalNotice()
|
||||
{
|
||||
Preferences* const pref = Preferences::instance();
|
||||
Preferences *const pref = Preferences::instance();
|
||||
if (pref->getAcceptedLegal()) // Already accepted once
|
||||
return true;
|
||||
|
||||
#ifdef DISABLE_GUI
|
||||
std::cout << std::endl << "*** " << qPrintable(QObject::tr("Legal Notice")) << " ***" << std::endl;
|
||||
std::cout << qPrintable(QObject::tr("qBittorrent is a file sharing program. When you run a torrent, its data will be made available to others by means of upload. Any content you share is your sole responsibility.\n\nNo further notices will be issued.")) << std::endl << std::endl;
|
||||
std::cout << qPrintable(QObject::tr("Press %1 key to accept and continue...").arg("'y'")) << std::endl;
|
||||
const QString eula = QString("\n*** %1 ***\n").arg(QObject::tr("Legal Notice"))
|
||||
+ QObject::tr("qBittorrent is a file sharing program. When you run a torrent, its data will be made available to others by means of upload. Any content you share is your sole responsibility.") + "\n\n"
|
||||
+ QObject::tr("No further notices will be issued.") + "\n\n"
|
||||
+ QObject::tr("Press %1 key to accept and continue...").arg("'y'") + '\n';
|
||||
printf("%s", qUtf8Printable(eula));
|
||||
|
||||
char ret = getchar(); // Read pressed key
|
||||
if (ret == 'y' || ret == 'Y') {
|
||||
if ((ret == 'y') || (ret == 'Y')) {
|
||||
// Save the answer
|
||||
pref->setAcceptedLegal(true);
|
||||
return true;
|
||||
@@ -375,16 +370,16 @@ bool userAgreesWithLegalNotice()
|
||||
msgBox.setText(QObject::tr("qBittorrent is a file sharing program. When you run a torrent, its data will be made available to others by means of upload. Any content you share is your sole responsibility.\n\nNo further notices will be issued."));
|
||||
msgBox.setWindowTitle(QObject::tr("Legal notice"));
|
||||
msgBox.addButton(QObject::tr("Cancel"), QMessageBox::RejectRole);
|
||||
QAbstractButton *agree_button = msgBox.addButton(QObject::tr("I Agree"), QMessageBox::AcceptRole);
|
||||
QAbstractButton *agreeButton = msgBox.addButton(QObject::tr("I Agree"), QMessageBox::AcceptRole);
|
||||
msgBox.show(); // Need to be shown or to moveToCenter does not work
|
||||
msgBox.move(Utils::Misc::screenCenter(&msgBox));
|
||||
msgBox.exec();
|
||||
if (msgBox.clickedButton() == agree_button) {
|
||||
if (msgBox.clickedButton() == agreeButton) {
|
||||
// Save the answer
|
||||
pref->setAcceptedLegal(true);
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
#endif // DISABLE_GUI
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -8,24 +8,24 @@ set(QBT_QTSINGLEAPPLICATION_SOURCES
|
||||
qtlocalpeer.cpp
|
||||
)
|
||||
|
||||
if (GUI)
|
||||
if (Qt5Widgets_FOUND)
|
||||
list(APPEND QBT_QTSINGLEAPPLICATION_HEADERS qtsingleapplication.h)
|
||||
list(APPEND QBT_QTSINGLEAPPLICATION_SOURCES qtsingleapplication.cpp)
|
||||
else (GUI)
|
||||
else (Qt5Widgets_FOUND)
|
||||
list(APPEND QBT_QTSINGLEAPPLICATION_HEADERS qtsinglecoreapplication.h)
|
||||
list(APPEND QBT_QTSINGLEAPPLICATION_SOURCES qtsinglecoreapplication.cpp)
|
||||
endif (GUI)
|
||||
endif (Qt5Widgets_FOUND)
|
||||
|
||||
add_library(qtsingleapplication ${QBT_QTSINGLEAPPLICATION_HEADERS} ${QBT_QTSINGLEAPPLICATION_SOURCES})
|
||||
add_library(qtsingleapplication STATIC ${QBT_QTSINGLEAPPLICATION_HEADERS} ${QBT_QTSINGLEAPPLICATION_SOURCES})
|
||||
target_include_directories(qtsingleapplication INTERFACE "${qtsingleapplication_SOURCE_DIR}")
|
||||
target_link_qt_components(qtsingleapplication Network)
|
||||
target_link_libraries(qtsingleapplication PRIVATE Qt5::Network)
|
||||
|
||||
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
|
||||
target_compile_options(qtsingleapplication PRIVATE "-w") # disable warning for 3rdparty code
|
||||
endif()
|
||||
|
||||
if (GUI)
|
||||
target_link_qt_components(qtsingleapplication Widgets)
|
||||
endif (GUI)
|
||||
if (Qt5Widgets_FOUND)
|
||||
target_link_libraries(qtsingleapplication PRIVATE Qt5::Widgets)
|
||||
endif (Qt5Widgets_FOUND)
|
||||
|
||||
add_library(QtSingleApplication::QtSingleApplication ALIAS qtsingleapplication)
|
||||
|
||||
@@ -176,8 +176,17 @@ void QtLocalPeer::receiveConnection()
|
||||
if (!socket)
|
||||
return;
|
||||
|
||||
while (socket->bytesAvailable() < (int)sizeof(quint32))
|
||||
while (true) {
|
||||
if (socket->state() == QLocalSocket::UnconnectedState) {
|
||||
qWarning("QtLocalPeer: Peer disconnected");
|
||||
delete socket;
|
||||
return;
|
||||
}
|
||||
if (socket->bytesAvailable() >= qint64(sizeof(quint32)))
|
||||
break;
|
||||
socket->waitForReadyRead();
|
||||
}
|
||||
|
||||
QDataStream ds(socket);
|
||||
QByteArray uMsg;
|
||||
quint32 remaining;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
/** Print a demangled stack backtrace of the caller function to FILE* out. */
|
||||
static inline void print_stacktrace(FILE *out = stderr, unsigned int max_frames = 63)
|
||||
{
|
||||
fprintf(out, "stack trace:\n");
|
||||
fprintf(out, "Stack trace:\n");
|
||||
|
||||
// storage array for stack trace address data
|
||||
std::vector<void *> addrlist(max_frames + 1);
|
||||
|
||||
@@ -138,7 +138,7 @@ bool straceWin::makeRelativePath(const QString& dir, QString& file)
|
||||
|
||||
QString straceWin::getSourcePathAndLineNumber(HANDLE hProcess, DWORD64 addr)
|
||||
{
|
||||
IMAGEHLP_LINE64 line = {0};
|
||||
IMAGEHLP_LINE64 line {};
|
||||
line.SizeOfStruct = sizeof(IMAGEHLP_LINE64);
|
||||
DWORD dwDisplacement = 0;
|
||||
|
||||
@@ -291,7 +291,7 @@ const QString straceWin::getBacktrace()
|
||||
demangle(funcName);
|
||||
#endif
|
||||
|
||||
// now ihsf.InstructionOffset points to the instruction that follows CALL instuction
|
||||
// now ihsf.InstructionOffset points to the instruction that follows CALL instruction
|
||||
// decrease the query address by one byte to point somewhere in the CALL instruction byte sequence
|
||||
sourceFile = getSourcePathAndLineNumber(hProcess, ihsf.InstructionOffset - 1);
|
||||
}
|
||||
|
||||
@@ -27,26 +27,27 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef STACKTRACE_WIN_DLG_H
|
||||
#define STACKTRACE_WIN_DLG_H
|
||||
#ifndef STACKTRACEDIALOG_H
|
||||
#define STACKTRACEDIALOG_H
|
||||
|
||||
#include <QString>
|
||||
#include <QDialog>
|
||||
#include "base/utils/misc.h"
|
||||
#include "ui_stacktrace_win_dlg.h"
|
||||
|
||||
class StraceDlg : public QDialog, private Ui::errorDialog
|
||||
#include "base/utils/misc.h"
|
||||
#include "ui_stacktracedialog.h"
|
||||
|
||||
class StacktraceDialog : public QDialog, private Ui::StacktraceDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
StraceDlg(QWidget* parent = 0)
|
||||
StacktraceDialog(QWidget *parent = nullptr)
|
||||
: QDialog(parent)
|
||||
{
|
||||
setupUi(this);
|
||||
}
|
||||
|
||||
void setStacktraceString(const QString& trace)
|
||||
void setStacktraceString(const QString &sigName, const QString &trace)
|
||||
{
|
||||
// try to call Qt function as less as possible
|
||||
QString htmlStr = QString(
|
||||
@@ -68,17 +69,19 @@ public:
|
||||
"Libtorrent version: %1<br/>"
|
||||
"Qt version: " QT_VERSION_STR "<br/>"
|
||||
"Boost version: %2<br/>"
|
||||
"OS version: %3"
|
||||
"</font></p><br/>"
|
||||
"<pre><code>%4</code></pre>"
|
||||
"OS version: %3<br/><br/>"
|
||||
"Caught signal: %4"
|
||||
"</font></p>"
|
||||
"<pre><code>%5</code></pre>"
|
||||
"<br/><hr><br/><br/>")
|
||||
.arg(Utils::Misc::libtorrentVersionString())
|
||||
.arg(Utils::Misc::boostVersionString())
|
||||
.arg(Utils::Misc::osName())
|
||||
.arg(trace);
|
||||
.arg(Utils::Misc::libtorrentVersionString())
|
||||
.arg(Utils::Misc::boostVersionString())
|
||||
.arg(Utils::Misc::osName())
|
||||
.arg(sigName)
|
||||
.arg(trace);
|
||||
|
||||
errorText->setHtml(htmlStr);
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif // STACKTRACEDIALOG_H
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>errorDialog</class>
|
||||
<widget class="QDialog" name="errorDialog">
|
||||
<class>StacktraceDialog</class>
|
||||
<widget class="QDialog" name="StacktraceDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
@@ -29,42 +29,43 @@
|
||||
#ifndef UPGRADE_H
|
||||
#define UPGRADE_H
|
||||
|
||||
#include <libtorrent/version.hpp>
|
||||
#if LIBTORRENT_VERSION_NUM >= 10100
|
||||
#include <libtorrent/bdecode.hpp>
|
||||
#endif
|
||||
#include <libtorrent/bencode.hpp>
|
||||
#include <libtorrent/entry.hpp>
|
||||
#if LIBTORRENT_VERSION_NUM < 10100
|
||||
#include <libtorrent/version.hpp>
|
||||
|
||||
#if LIBTORRENT_VERSION_NUM >= 10100
|
||||
#include <libtorrent/bdecode.hpp>
|
||||
#else
|
||||
#include <libtorrent/lazy_entry.hpp>
|
||||
#endif
|
||||
|
||||
|
||||
#include <QDir>
|
||||
#include <QFile>
|
||||
#include <QRegularExpression>
|
||||
#include <QString>
|
||||
|
||||
#ifndef DISABLE_GUI
|
||||
#include <QMessageBox>
|
||||
#endif
|
||||
#include <QRegExp>
|
||||
#include <QString>
|
||||
#ifdef Q_OS_MAC
|
||||
#include <QSettings>
|
||||
#endif
|
||||
|
||||
#include "base/logger.h"
|
||||
#include "base/preferences.h"
|
||||
#include "base/profile.h"
|
||||
#include "base/utils/fs.h"
|
||||
#include "base/utils/misc.h"
|
||||
#include "base/utils/string.h"
|
||||
#include "base/preferences.h"
|
||||
|
||||
bool userAcceptsUpgrade()
|
||||
{
|
||||
#ifdef DISABLE_GUI
|
||||
std::cout << std::endl << "*** " << qPrintable(QObject::tr("Upgrade")) << " ***" << std::endl;
|
||||
printf("\n*** %s ***\n", qUtf8Printable(QObject::tr("Upgrade")));
|
||||
char ret = '\0';
|
||||
do {
|
||||
std::cout << qPrintable(QObject::tr("You updated from an older version that saved things differently. You must migrate to the new saving system. You will not be able to use an older version than v3.3.0 again. Continue? [y/n]")) << std::endl;
|
||||
printf("%s\n"
|
||||
, qUtf8Printable(QObject::tr("You updated from an older version that saved things differently. You must migrate to the new saving system. You will not be able to use an older version than v3.3.0 again. Continue? [y/n]")));
|
||||
ret = getchar(); // Read pressed key
|
||||
}
|
||||
while ((ret != 'y') && (ret != 'Y') && (ret != 'n') && (ret != 'N'));
|
||||
@@ -113,12 +114,28 @@ bool upgradeResumeFile(const QString &filepath, const QVariantHash &oldTorrent =
|
||||
bool v3_3 = false;
|
||||
int queuePosition = 0;
|
||||
QString outFilePath = filepath;
|
||||
QRegExp rx(QLatin1String("([A-Fa-f0-9]{40})\\.fastresume\\.(\\d+)$"));
|
||||
if (rx.indexIn(filepath) != -1) {
|
||||
// old v3.3.x format
|
||||
queuePosition = rx.cap(2).toInt();
|
||||
static const QRegularExpression rx(QLatin1String("([A-Fa-f0-9]{40})\\.fastresume\\.(.+)$"));
|
||||
const QRegularExpressionMatch rxMatch = rx.match(filepath);
|
||||
if (rxMatch.hasMatch()) {
|
||||
// Old v3.3.x format had a number at the end indicating the queue position.
|
||||
// The naming scheme was '<infohash>.fastresume.<queueposition>'.
|
||||
// However, QSaveFile, which uses QTemporaryFile internally, might leave
|
||||
// non-commited files behind eg after a crash. These files have the
|
||||
// naming scheme '<infohash>.fastresume.XXXXXX' where each X is a random
|
||||
// character. So we detect if the last part is present. Then check if it
|
||||
// is 6 chars long. If all the 6 chars are digits we assume it is an old
|
||||
// v3.3.x format. Otherwise it is considered a non-commited fastresume
|
||||
// and is deleted, because it may be a corrupted/incomplete fastresume.
|
||||
// NOTE: When the upgrade code is removed, we must continue to perform
|
||||
// cleanup of non-commited QSaveFile/QTemporaryFile fastresumes
|
||||
queuePosition = rxMatch.captured(2).toInt();
|
||||
if ((rxMatch.captured(2).size() == 6) && (queuePosition <= 99999)) {
|
||||
Utils::Fs::forceRemove(filepath);
|
||||
return true;
|
||||
}
|
||||
|
||||
v3_3 = true;
|
||||
outFilePath.replace(QRegExp("\\.\\d+$"), "");
|
||||
outFilePath.replace(QRegularExpression("\\.fastresume\\..+$"), ".fastresume");
|
||||
}
|
||||
else {
|
||||
queuePosition = fastOld.dict_find_int_value("qBt-queuePosition", 0);
|
||||
@@ -129,6 +146,15 @@ bool upgradeResumeFile(const QString &filepath, const QVariantHash &oldTorrent =
|
||||
// in versions < 3.3 we have -1 for seeding torrents, so we convert it to 0
|
||||
fastNew["qBt-queuePosition"] = (queuePosition >= 0 ? queuePosition : 0);
|
||||
|
||||
if (v3_3) {
|
||||
QFileInfo oldFile(filepath);
|
||||
QFileInfo newFile(outFilePath);
|
||||
if (newFile.exists()
|
||||
&& (oldFile.lastModified() < newFile.lastModified())) {
|
||||
Utils::Fs::forceRemove(filepath);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
QFile file2(outFilePath);
|
||||
QVector<char> out;
|
||||
libtorrent::bencode(std::back_inserter(out), fastNew);
|
||||
@@ -173,29 +199,32 @@ bool upgrade(bool ask = true)
|
||||
|
||||
QStringList backupFiles = backupFolderDir.entryList(
|
||||
QStringList(QLatin1String("*.fastresume")), QDir::Files, QDir::Unsorted);
|
||||
QRegExp rx(QLatin1String("^([A-Fa-f0-9]{40})\\.fastresume$"));
|
||||
const QRegularExpression rx(QLatin1String("^([A-Fa-f0-9]{40})\\.fastresume$"));
|
||||
foreach (QString backupFile, backupFiles) {
|
||||
if (rx.indexIn(backupFile) != -1) {
|
||||
if (upgradeResumeFile(backupFolderDir.absoluteFilePath(backupFile), oldResumeData[rx.cap(1)].toHash()))
|
||||
oldResumeData.remove(rx.cap(1));
|
||||
const QRegularExpressionMatch rxMatch = rx.match(backupFile);
|
||||
if (rxMatch.hasMatch()) {
|
||||
const QString hashStr = rxMatch.captured(1);
|
||||
if (upgradeResumeFile(backupFolderDir.absoluteFilePath(backupFile), oldResumeData[hashStr].toHash()))
|
||||
oldResumeData.remove(hashStr);
|
||||
else
|
||||
Logger::instance()->addMessage(QObject::tr("Couldn't migrate torrent with hash: %1").arg(rx.cap(1)), Log::WARNING);
|
||||
Logger::instance()->addMessage(QObject::tr("Couldn't migrate torrent with hash: %1").arg(hashStr), Log::WARNING);
|
||||
}
|
||||
else {
|
||||
Logger::instance()->addMessage(QObject::tr("Couldn't migrate torrent. Invalid fastresume file name: %1").arg(backupFile), Log::WARNING);
|
||||
}
|
||||
}
|
||||
|
||||
foreach (const QString &hash, oldResumeData.keys()) {
|
||||
QVariantHash oldTorrent = oldResumeData[hash].toHash();
|
||||
for (auto i = oldResumeData.cbegin(); i != oldResumeData.cend(); ++i) {
|
||||
const QVariantHash oldTorrent = i.value().toHash();
|
||||
if (oldTorrent.value("is_magnet", false).toBool()) {
|
||||
const QString &hash = i.key();
|
||||
libtorrent::entry resumeData;
|
||||
resumeData["qBt-magnetUri"] = oldTorrent.value("magnet_uri").toString().toStdString();
|
||||
resumeData["qBt-paused"] = false;
|
||||
resumeData["qBt-forced"] = false;
|
||||
|
||||
resumeData["qBt-savePath"] = oldTorrent.value("save_path").toString().toStdString();
|
||||
resumeData["qBt-ratioLimit"] = QString::number(oldTorrent.value("max_ratio", -2).toReal()).toStdString();
|
||||
resumeData["qBt-ratioLimit"] = static_cast<int>(oldTorrent.value("max_ratio", -2).toReal() * 1000);
|
||||
resumeData["qBt-label"] = oldTorrent.value("label").toString().toStdString();
|
||||
resumeData["qBt-name"] = oldTorrent.value("name").toString().toStdString();
|
||||
resumeData["qBt-seedStatus"] = oldTorrent.value("seed").toBool();
|
||||
@@ -270,6 +299,6 @@ void migrateRSS()
|
||||
qBTRSSLegacy->remove("old_items");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif // DISABLE_GUI
|
||||
|
||||
#endif // UPGRADE_H
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
find_package(ZLIB 1.2.5.2 REQUIRED)
|
||||
|
||||
set(QBT_BASE_HEADERS
|
||||
add_library(qbt_base STATIC
|
||||
# headers
|
||||
bittorrent/addtorrentparams.h
|
||||
bittorrent/cachestatus.h
|
||||
bittorrent/infohash.h
|
||||
@@ -19,6 +20,7 @@ bittorrent/torrentinfo.h
|
||||
bittorrent/tracker.h
|
||||
bittorrent/trackerentry.h
|
||||
http/connection.h
|
||||
http/httperror.h
|
||||
http/irequesthandler.h
|
||||
http/requestparser.h
|
||||
http/responsebuilder.h
|
||||
@@ -43,6 +45,11 @@ rss/rss_feed.h
|
||||
rss/rss_folder.h
|
||||
rss/rss_item.h
|
||||
rss/rss_session.h
|
||||
search/searchdownloadhandler.h
|
||||
search/searchhandler.h
|
||||
search/searchpluginmanager.h
|
||||
utils/bytearray.h
|
||||
utils/foreignapps.h
|
||||
utils/fs.h
|
||||
utils/gzip.h
|
||||
utils/misc.h
|
||||
@@ -50,7 +57,9 @@ utils/net.h
|
||||
utils/random.h
|
||||
utils/string.h
|
||||
utils/version.h
|
||||
algorithm.h
|
||||
asyncfilestorage.h
|
||||
exceptions.h
|
||||
filesystemwatcher.h
|
||||
global.h
|
||||
iconprovider.h
|
||||
@@ -59,16 +68,14 @@ logger.h
|
||||
preferences.h
|
||||
profile.h
|
||||
scanfoldersmodel.h
|
||||
searchengine.h
|
||||
settingsstorage.h
|
||||
torrentfileguard.h
|
||||
torrentfilter.h
|
||||
tristatebool.h
|
||||
types.h
|
||||
unicodestrings.h
|
||||
)
|
||||
|
||||
set(QBT_BASE_SOURCES
|
||||
# sources
|
||||
bittorrent/infohash.cpp
|
||||
bittorrent/magneturi.cpp
|
||||
bittorrent/peerinfo.cpp
|
||||
@@ -84,6 +91,7 @@ bittorrent/torrentinfo.cpp
|
||||
bittorrent/tracker.cpp
|
||||
bittorrent/trackerentry.cpp
|
||||
http/connection.cpp
|
||||
http/httperror.cpp
|
||||
http/requestparser.cpp
|
||||
http/responsebuilder.cpp
|
||||
http/responsegenerator.cpp
|
||||
@@ -106,6 +114,11 @@ rss/rss_feed.cpp
|
||||
rss/rss_folder.cpp
|
||||
rss/rss_item.cpp
|
||||
rss/rss_session.cpp
|
||||
search/searchdownloadhandler.cpp
|
||||
search/searchhandler.cpp
|
||||
search/searchpluginmanager.cpp
|
||||
utils/bytearray.cpp
|
||||
utils/foreignapps.cpp
|
||||
utils/fs.cpp
|
||||
utils/gzip.cpp
|
||||
utils/misc.cpp
|
||||
@@ -113,33 +126,38 @@ utils/net.cpp
|
||||
utils/random.cpp
|
||||
utils/string.cpp
|
||||
asyncfilestorage.cpp
|
||||
exceptions.cpp
|
||||
filesystemwatcher.cpp
|
||||
iconprovider.cpp
|
||||
logger.cpp
|
||||
preferences.cpp
|
||||
profile.cpp
|
||||
scanfoldersmodel.cpp
|
||||
searchengine.cpp
|
||||
settingsstorage.cpp
|
||||
torrentfileguard.cpp
|
||||
torrentfilter.cpp
|
||||
tristatebool.cpp
|
||||
)
|
||||
|
||||
add_library(qbt_base STATIC ${QBT_BASE_HEADERS} ${QBT_BASE_SOURCES})
|
||||
target_link_libraries(qbt_base PRIVATE ZLIB::ZLIB PUBLIC LibtorrentRasterbar::LibTorrent)
|
||||
target_link_qt_components(qbt_base PUBLIC Core Network Xml)
|
||||
target_link_libraries(qbt_base
|
||||
PRIVATE
|
||||
ZLIB::ZLIB
|
||||
PUBLIC
|
||||
LibtorrentRasterbar::torrent-rasterbar
|
||||
Qt5::Core Qt5::Network Qt5::Xml
|
||||
)
|
||||
|
||||
if (GUI)
|
||||
if (Qt5Widgets_FOUND)
|
||||
target_link_libraries(qbt_base PUBLIC Qt5::Gui Qt5::Widgets)
|
||||
endif (GUI)
|
||||
endif (Qt5Widgets_FOUND)
|
||||
|
||||
if (DBUS)
|
||||
target_link_qt_components(qbt_base PRIVATE DBus)
|
||||
if (Qt5DBus_FOUND)
|
||||
target_link_libraries(qbt_base PRIVATE Qt5::DBus)
|
||||
endif ()
|
||||
|
||||
if (APPLE)
|
||||
find_library(IOKit_LIBRARY IOKit)
|
||||
find_library(Carbon_LIBRARY Carbon)
|
||||
target_link_libraries(qbt_base PRIVATE ${Carbon_LIBRARY} ${IOKit_LIBRARY})
|
||||
find_library(AppKit_LIBRARY AppKit)
|
||||
target_link_libraries(qbt_base PRIVATE ${Carbon_LIBRARY} ${IOKit_LIBRARY} ${AppKit_LIBRARY})
|
||||
endif (APPLE)
|
||||
|
||||
41
src/base/algorithm.h
Normal file
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* Bittorrent Client using Qt and libtorrent.
|
||||
* Copyright (C) 2018 Vladimir Golovnev <glassez@yandex.ru>
|
||||
*
|
||||
* 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
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* 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, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
* In addition, as a special exception, the copyright holders give permission to
|
||||
* link this program with the OpenSSL project's "OpenSSL" library (or with
|
||||
* modified versions of it that use the same license as the "OpenSSL" library),
|
||||
* and distribute the linked executables. You must obey the GNU General Public
|
||||
* License in all respects for all of the code used other than "OpenSSL". If you
|
||||
* modify file(s), you may extend this exception to your version of the file(s),
|
||||
* but you are not obligated to do so. If you do not wish to do so, delete this
|
||||
* exception statement from your version.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace Dict
|
||||
{
|
||||
// To be used with QMap, QHash and it's variants
|
||||
template <typename Dictionary, typename BinaryPredicate>
|
||||
void removeIf(Dictionary &&dict, BinaryPredicate p)
|
||||
{
|
||||
auto it = dict.begin();
|
||||
while (it != dict.end())
|
||||
it = (p(it.key(), it.value()) ? dict.erase(it) : it + 1);
|
||||
}
|
||||
}
|
||||
@@ -34,14 +34,14 @@
|
||||
#include <QFile>
|
||||
#include <QObject>
|
||||
|
||||
class AsyncFileStorageError: public std::runtime_error
|
||||
class AsyncFileStorageError : public std::runtime_error
|
||||
{
|
||||
public:
|
||||
explicit AsyncFileStorageError(const QString &message);
|
||||
QString message() const;
|
||||
};
|
||||
|
||||
class AsyncFileStorage: public QObject
|
||||
class AsyncFileStorage : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
||||
@@ -1,124 +1,137 @@
|
||||
HEADERS += \
|
||||
$$PWD/algorithm.h \
|
||||
$$PWD/asyncfilestorage.h \
|
||||
$$PWD/types.h \
|
||||
$$PWD/tristatebool.h \
|
||||
$$PWD/bittorrent/addtorrentparams.h \
|
||||
$$PWD/bittorrent/cachestatus.h \
|
||||
$$PWD/bittorrent/infohash.h \
|
||||
$$PWD/bittorrent/magneturi.h \
|
||||
$$PWD/bittorrent/peerinfo.h \
|
||||
$$PWD/bittorrent/private/bandwidthscheduler.h \
|
||||
$$PWD/bittorrent/private/filterparserthread.h \
|
||||
$$PWD/bittorrent/private/resumedatasavingmanager.h \
|
||||
$$PWD/bittorrent/private/speedmonitor.h \
|
||||
$$PWD/bittorrent/private/statistics.h \
|
||||
$$PWD/bittorrent/session.h \
|
||||
$$PWD/bittorrent/sessionstatus.h \
|
||||
$$PWD/bittorrent/torrentcreatorthread.h \
|
||||
$$PWD/bittorrent/torrenthandle.h \
|
||||
$$PWD/bittorrent/torrentinfo.h \
|
||||
$$PWD/bittorrent/tracker.h \
|
||||
$$PWD/bittorrent/trackerentry.h \
|
||||
$$PWD/exceptions.h \
|
||||
$$PWD/filesystemwatcher.h \
|
||||
$$PWD/logger.h \
|
||||
$$PWD/settingsstorage.h \
|
||||
$$PWD/settingvalue.h \
|
||||
$$PWD/preferences.h \
|
||||
$$PWD/indexrange.h \
|
||||
$$PWD/iconprovider.h \
|
||||
$$PWD/http/irequesthandler.h \
|
||||
$$PWD/global.h \
|
||||
$$PWD/http/connection.h \
|
||||
$$PWD/http/httperror.h \
|
||||
$$PWD/http/irequesthandler.h \
|
||||
$$PWD/http/requestparser.h \
|
||||
$$PWD/http/responsebuilder.h \
|
||||
$$PWD/http/responsegenerator.h \
|
||||
$$PWD/http/server.h \
|
||||
$$PWD/http/types.h \
|
||||
$$PWD/http/responsebuilder.h \
|
||||
$$PWD/iconprovider.h \
|
||||
$$PWD/indexrange.h \
|
||||
$$PWD/logger.h \
|
||||
$$PWD/net/dnsupdater.h \
|
||||
$$PWD/net/downloadmanager.h \
|
||||
$$PWD/net/downloadhandler.h \
|
||||
$$PWD/net/downloadmanager.h \
|
||||
$$PWD/net/geoipmanager.h \
|
||||
$$PWD/net/portforwarder.h \
|
||||
$$PWD/net/private/geoipdatabase.h \
|
||||
$$PWD/net/proxyconfigurationmanager.h \
|
||||
$$PWD/net/reverseresolution.h \
|
||||
$$PWD/net/smtp.h \
|
||||
$$PWD/net/private/geoipdatabase.h \
|
||||
$$PWD/bittorrent/addtorrentparams.h \
|
||||
$$PWD/bittorrent/infohash.h \
|
||||
$$PWD/bittorrent/session.h \
|
||||
$$PWD/bittorrent/sessionstatus.h \
|
||||
$$PWD/bittorrent/cachestatus.h \
|
||||
$$PWD/bittorrent/magneturi.h \
|
||||
$$PWD/bittorrent/torrentinfo.h \
|
||||
$$PWD/bittorrent/torrenthandle.h \
|
||||
$$PWD/bittorrent/peerinfo.h \
|
||||
$$PWD/bittorrent/trackerentry.h \
|
||||
$$PWD/bittorrent/tracker.h \
|
||||
$$PWD/bittorrent/torrentcreatorthread.h \
|
||||
$$PWD/bittorrent/private/speedmonitor.h \
|
||||
$$PWD/bittorrent/private/bandwidthscheduler.h \
|
||||
$$PWD/bittorrent/private/filterparserthread.h \
|
||||
$$PWD/bittorrent/private/statistics.h \
|
||||
$$PWD/bittorrent/private/resumedatasavingmanager.h \
|
||||
$$PWD/preferences.h \
|
||||
$$PWD/private/profile_p.h \
|
||||
$$PWD/profile.h \
|
||||
$$PWD/rss/private/rss_parser.h \
|
||||
$$PWD/rss/rss_article.h \
|
||||
$$PWD/rss/rss_item.h \
|
||||
$$PWD/rss/rss_feed.h \
|
||||
$$PWD/rss/rss_folder.h \
|
||||
$$PWD/rss/rss_session.h \
|
||||
$$PWD/rss/rss_autodownloader.h \
|
||||
$$PWD/rss/rss_autodownloadrule.h \
|
||||
$$PWD/rss/private/rss_parser.h \
|
||||
$$PWD/rss/rss_feed.h \
|
||||
$$PWD/rss/rss_folder.h \
|
||||
$$PWD/rss/rss_item.h \
|
||||
$$PWD/rss/rss_session.h \
|
||||
$$PWD/scanfoldersmodel.h \
|
||||
$$PWD/search/searchhandler.h \
|
||||
$$PWD/search/searchdownloadhandler.h \
|
||||
$$PWD/search/searchpluginmanager.h \
|
||||
$$PWD/settingsstorage.h \
|
||||
$$PWD/settingvalue.h \
|
||||
$$PWD/torrentfileguard.h \
|
||||
$$PWD/torrentfilter.h \
|
||||
$$PWD/tristatebool.h \
|
||||
$$PWD/types.h \
|
||||
$$PWD/unicodestrings.h \
|
||||
$$PWD/utils/bytearray.h \
|
||||
$$PWD/utils/foreignapps.h \
|
||||
$$PWD/utils/fs.h \
|
||||
$$PWD/utils/gzip.h \
|
||||
$$PWD/utils/misc.h \
|
||||
$$PWD/utils/net.h \
|
||||
$$PWD/utils/random.h \
|
||||
$$PWD/utils/string.h \
|
||||
$$PWD/utils/version.h \
|
||||
$$PWD/profile.h \
|
||||
$$PWD/private/profile_p.h \
|
||||
$$PWD/unicodestrings.h \
|
||||
$$PWD/torrentfileguard.h \
|
||||
$$PWD/torrentfilter.h \
|
||||
$$PWD/scanfoldersmodel.h \
|
||||
$$PWD/searchengine.h \
|
||||
$$PWD/global.h
|
||||
$$PWD/utils/version.h
|
||||
|
||||
SOURCES += \
|
||||
$$PWD/asyncfilestorage.cpp \
|
||||
$$PWD/tristatebool.cpp \
|
||||
$$PWD/bittorrent/infohash.cpp \
|
||||
$$PWD/bittorrent/magneturi.cpp \
|
||||
$$PWD/bittorrent/peerinfo.cpp \
|
||||
$$PWD/bittorrent/private/bandwidthscheduler.cpp \
|
||||
$$PWD/bittorrent/private/filterparserthread.cpp \
|
||||
$$PWD/bittorrent/private/resumedatasavingmanager.cpp \
|
||||
$$PWD/bittorrent/private/speedmonitor.cpp \
|
||||
$$PWD/bittorrent/private/statistics.cpp \
|
||||
$$PWD/bittorrent/session.cpp \
|
||||
$$PWD/bittorrent/torrentcreatorthread.cpp \
|
||||
$$PWD/bittorrent/torrenthandle.cpp \
|
||||
$$PWD/bittorrent/torrentinfo.cpp \
|
||||
$$PWD/bittorrent/tracker.cpp \
|
||||
$$PWD/bittorrent/trackerentry.cpp \
|
||||
$$PWD/exceptions.cpp \
|
||||
$$PWD/filesystemwatcher.cpp \
|
||||
$$PWD/logger.cpp \
|
||||
$$PWD/settingsstorage.cpp \
|
||||
$$PWD/preferences.cpp \
|
||||
$$PWD/iconprovider.cpp \
|
||||
$$PWD/http/connection.cpp \
|
||||
$$PWD/http/httperror.cpp \
|
||||
$$PWD/http/requestparser.cpp \
|
||||
$$PWD/http/responsebuilder.cpp \
|
||||
$$PWD/http/responsegenerator.cpp \
|
||||
$$PWD/http/server.cpp \
|
||||
$$PWD/http/responsebuilder.cpp \
|
||||
$$PWD/iconprovider.cpp \
|
||||
$$PWD/logger.cpp \
|
||||
$$PWD/net/dnsupdater.cpp \
|
||||
$$PWD/net/downloadmanager.cpp \
|
||||
$$PWD/net/downloadhandler.cpp \
|
||||
$$PWD/net/downloadmanager.cpp \
|
||||
$$PWD/net/geoipmanager.cpp \
|
||||
$$PWD/net/portforwarder.cpp \
|
||||
$$PWD/net/private/geoipdatabase.cpp \
|
||||
$$PWD/net/proxyconfigurationmanager.cpp \
|
||||
$$PWD/net/reverseresolution.cpp \
|
||||
$$PWD/net/smtp.cpp \
|
||||
$$PWD/net/private/geoipdatabase.cpp \
|
||||
$$PWD/bittorrent/infohash.cpp \
|
||||
$$PWD/bittorrent/session.cpp \
|
||||
$$PWD/bittorrent/magneturi.cpp \
|
||||
$$PWD/bittorrent/torrentinfo.cpp \
|
||||
$$PWD/bittorrent/torrenthandle.cpp \
|
||||
$$PWD/bittorrent/peerinfo.cpp \
|
||||
$$PWD/bittorrent/trackerentry.cpp \
|
||||
$$PWD/bittorrent/tracker.cpp \
|
||||
$$PWD/bittorrent/torrentcreatorthread.cpp \
|
||||
$$PWD/bittorrent/private/speedmonitor.cpp \
|
||||
$$PWD/bittorrent/private/bandwidthscheduler.cpp \
|
||||
$$PWD/bittorrent/private/filterparserthread.cpp \
|
||||
$$PWD/bittorrent/private/statistics.cpp \
|
||||
$$PWD/bittorrent/private/resumedatasavingmanager.cpp \
|
||||
$$PWD/preferences.cpp \
|
||||
$$PWD/private/profile_p.cpp \
|
||||
$$PWD/profile.cpp \
|
||||
$$PWD/rss/private/rss_parser.cpp \
|
||||
$$PWD/rss/rss_article.cpp \
|
||||
$$PWD/rss/rss_item.cpp \
|
||||
$$PWD/rss/rss_feed.cpp \
|
||||
$$PWD/rss/rss_folder.cpp \
|
||||
$$PWD/rss/rss_session.cpp \
|
||||
$$PWD/rss/rss_autodownloader.cpp \
|
||||
$$PWD/rss/rss_autodownloadrule.cpp \
|
||||
$$PWD/rss/private/rss_parser.cpp \
|
||||
$$PWD/rss/rss_feed.cpp \
|
||||
$$PWD/rss/rss_folder.cpp \
|
||||
$$PWD/rss/rss_item.cpp \
|
||||
$$PWD/rss/rss_session.cpp \
|
||||
$$PWD/scanfoldersmodel.cpp \
|
||||
$$PWD/search/searchdownloadhandler.cpp \
|
||||
$$PWD/search/searchhandler.cpp \
|
||||
$$PWD/search/searchpluginmanager.cpp \
|
||||
$$PWD/settingsstorage.cpp \
|
||||
$$PWD/torrentfileguard.cpp \
|
||||
$$PWD/torrentfilter.cpp \
|
||||
$$PWD/tristatebool.cpp \
|
||||
$$PWD/utils/bytearray.cpp \
|
||||
$$PWD/utils/foreignapps.cpp \
|
||||
$$PWD/utils/fs.cpp \
|
||||
$$PWD/utils/gzip.cpp \
|
||||
$$PWD/utils/misc.cpp \
|
||||
$$PWD/utils/net.cpp \
|
||||
$$PWD/utils/random.cpp \
|
||||
$$PWD/utils/string.cpp \
|
||||
$$PWD/profile.cpp \
|
||||
$$PWD/private/profile_p.cpp \
|
||||
$$PWD/torrentfileguard.cpp \
|
||||
$$PWD/torrentfilter.cpp \
|
||||
$$PWD/scanfoldersmodel.cpp \
|
||||
$$PWD/searchengine.cpp
|
||||
$$PWD/utils/string.cpp
|
||||
|
||||
@@ -51,5 +51,8 @@ namespace BitTorrent
|
||||
bool ignoreShareLimits = false;
|
||||
bool skipChecking = false;
|
||||
TriStateBool createSubfolder;
|
||||
TriStateBool useAutoTMM;
|
||||
int uploadLimit = -1;
|
||||
int downloadLimit = -1;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -26,9 +26,10 @@
|
||||
* exception statement from your version.
|
||||
*/
|
||||
|
||||
#include <QHash>
|
||||
#include "infohash.h"
|
||||
|
||||
#include <QHash>
|
||||
|
||||
using namespace BitTorrent;
|
||||
|
||||
InfoHash::InfoHash()
|
||||
@@ -91,7 +92,7 @@ bool InfoHash::operator!=(const InfoHash &other) const
|
||||
return (m_nativeHash != other.m_nativeHash);
|
||||
}
|
||||
|
||||
uint qHash(const InfoHash &key, uint seed)
|
||||
uint BitTorrent::qHash(const InfoHash &key, uint seed)
|
||||
{
|
||||
return qHash(static_cast<QString>(key), seed);
|
||||
}
|
||||
|
||||
@@ -54,8 +54,8 @@ namespace BitTorrent
|
||||
libtorrent::sha1_hash m_nativeHash;
|
||||
QString m_hashString;
|
||||
};
|
||||
|
||||
uint qHash(const InfoHash &key, uint seed);
|
||||
}
|
||||
|
||||
uint qHash(const BitTorrent::InfoHash &key, uint seed);
|
||||
|
||||
#endif // BITTORRENT_INFOHASH_H
|
||||
|
||||
@@ -26,16 +26,17 @@
|
||||
* exception statement from your version.
|
||||
*/
|
||||
|
||||
#include <QByteArray>
|
||||
#include <QRegExp>
|
||||
#include <QStringList>
|
||||
#include "magneturi.h"
|
||||
|
||||
#include <libtorrent/bencode.hpp>
|
||||
#include <libtorrent/error_code.hpp>
|
||||
#include <libtorrent/magnet_uri.hpp>
|
||||
|
||||
#include <QByteArray>
|
||||
#include <QRegularExpression>
|
||||
#include <QStringList>
|
||||
|
||||
#include "base/utils/string.h"
|
||||
#include "magneturi.h"
|
||||
|
||||
namespace
|
||||
{
|
||||
@@ -45,7 +46,7 @@ namespace
|
||||
rawBc = rawBc.mid(8); // skip bc://bt/
|
||||
rawBc = QByteArray::fromBase64(rawBc); // Decode base64
|
||||
// Format is now AA/url_encoded_filename/size_bytes/info_hash/ZZ
|
||||
QStringList parts = QString(rawBc).split("/");
|
||||
QStringList parts = QString(rawBc).split('/');
|
||||
if (parts.size() != 5) return QString();
|
||||
|
||||
QString filename = parts.at(1);
|
||||
@@ -69,8 +70,8 @@ MagnetUri::MagnetUri(const QString &source)
|
||||
qDebug("Creating magnet link from bc link");
|
||||
m_url = bcLinkToMagnet(source);
|
||||
}
|
||||
else if (((source.size() == 40) && !source.contains(QRegExp("[^0-9A-Fa-f]")))
|
||||
|| ((source.size() == 32) && !source.contains(QRegExp("[^2-7A-Za-z]")))) {
|
||||
else if (((source.size() == 40) && !source.contains(QRegularExpression("[^0-9A-Fa-f]")))
|
||||
|| ((source.size() == 32) && !source.contains(QRegularExpression("[^2-7A-Za-z]")))) {
|
||||
m_url = "magnet:?xt=urn:btih:" + source;
|
||||
}
|
||||
|
||||
|
||||
@@ -29,8 +29,8 @@
|
||||
#ifndef BITTORRENT_MAGNETURI_H
|
||||
#define BITTORRENT_MAGNETURI_H
|
||||
|
||||
#include <QString>
|
||||
#include <QList>
|
||||
#include <QString>
|
||||
#include <QUrl>
|
||||
|
||||
#include <libtorrent/add_torrent_params.hpp>
|
||||
|
||||
@@ -26,12 +26,13 @@
|
||||
* exception statement from your version.
|
||||
*/
|
||||
|
||||
#include "base/net/geoipmanager.h"
|
||||
#include "base/utils/string.h"
|
||||
#include "base/unicodestrings.h"
|
||||
#include "base/bittorrent/torrenthandle.h"
|
||||
#include "peerinfo.h"
|
||||
|
||||
#include "base/bittorrent/torrenthandle.h"
|
||||
#include "base/net/geoipmanager.h"
|
||||
#include "base/unicodestrings.h"
|
||||
#include "base/utils/string.h"
|
||||
|
||||
namespace libt = libtorrent;
|
||||
using namespace BitTorrent;
|
||||
|
||||
@@ -99,7 +100,6 @@ bool PeerInfo::isRemoteChocked() const
|
||||
return (m_nativeInfo.flags & libt::peer_info::remote_choked);
|
||||
}
|
||||
|
||||
|
||||
bool PeerInfo::isSupportsExtensions() const
|
||||
{
|
||||
return (m_nativeInfo.flags & libt::peer_info::supports_extensions);
|
||||
@@ -115,7 +115,6 @@ bool PeerInfo::isHandshake() const
|
||||
return (m_nativeInfo.flags & libt::peer_info::handshake);
|
||||
}
|
||||
|
||||
|
||||
bool PeerInfo::isConnecting() const
|
||||
{
|
||||
return (m_nativeInfo.flags & libt::peer_info::connecting);
|
||||
@@ -136,7 +135,6 @@ bool PeerInfo::optimisticUnchoke() const
|
||||
return (m_nativeInfo.flags & libt::peer_info::optimistic_unchoke);
|
||||
}
|
||||
|
||||
|
||||
bool PeerInfo::isSnubbed() const
|
||||
{
|
||||
return (m_nativeInfo.flags & libt::peer_info::snubbed);
|
||||
@@ -152,7 +150,6 @@ bool PeerInfo::isEndgameMode() const
|
||||
return (m_nativeInfo.flags & libt::peer_info::endgame_mode);
|
||||
}
|
||||
|
||||
|
||||
bool PeerInfo::isHolepunched() const
|
||||
{
|
||||
return (m_nativeInfo.flags & libt::peer_info::holepunched);
|
||||
@@ -183,7 +180,6 @@ bool PeerInfo::isPlaintextEncrypted() const
|
||||
return (m_nativeInfo.flags & libt::peer_info::plaintext_encrypted);
|
||||
}
|
||||
|
||||
|
||||
PeerAddress PeerInfo::address() const
|
||||
{
|
||||
return PeerAddress(QHostAddress(QString::fromStdString(m_nativeInfo.ip.address().to_string())),
|
||||
@@ -195,7 +191,6 @@ QString PeerInfo::client() const
|
||||
return QString::fromStdString(m_nativeInfo.client);
|
||||
}
|
||||
|
||||
|
||||
qreal PeerInfo::progress() const
|
||||
{
|
||||
return m_nativeInfo.progress;
|
||||
@@ -206,7 +201,6 @@ int PeerInfo::payloadUpSpeed() const
|
||||
return m_nativeInfo.payload_up_speed;
|
||||
}
|
||||
|
||||
|
||||
int PeerInfo::payloadDownSpeed() const
|
||||
{
|
||||
return m_nativeInfo.payload_down_speed;
|
||||
@@ -217,7 +211,6 @@ qlonglong PeerInfo::totalUpload() const
|
||||
return m_nativeInfo.total_upload;
|
||||
}
|
||||
|
||||
|
||||
qlonglong PeerInfo::totalDownload() const
|
||||
{
|
||||
return m_nativeInfo.total_download;
|
||||
@@ -239,7 +232,7 @@ QString PeerInfo::connectionType() const
|
||||
return QString::fromUtf8(C_UTP);
|
||||
|
||||
QString connection;
|
||||
switch(m_nativeInfo.connection_type) {
|
||||
switch (m_nativeInfo.connection_type) {
|
||||
case libt::peer_info::http_seed:
|
||||
case libt::peer_info::web_seed:
|
||||
connection = "Web";
|
||||
@@ -253,8 +246,8 @@ QString PeerInfo::connectionType() const
|
||||
|
||||
void PeerInfo::calcRelevance(const TorrentHandle *torrent)
|
||||
{
|
||||
const QBitArray &allPieces = torrent->pieces();
|
||||
const QBitArray &peerPieces = pieces();
|
||||
const QBitArray allPieces = torrent->pieces();
|
||||
const QBitArray peerPieces = pieces();
|
||||
|
||||
int localMissing = 0;
|
||||
int remoteHaves = 0;
|
||||
@@ -280,117 +273,116 @@ qreal PeerInfo::relevance() const
|
||||
|
||||
void PeerInfo::determineFlags()
|
||||
{
|
||||
QStringList flagsDescriptionList;
|
||||
|
||||
if (isInteresting()) {
|
||||
//d = Your client wants to download, but peer doesn't want to send (interested and choked)
|
||||
// d = Your client wants to download, but peer doesn't want to send (interested and choked)
|
||||
if (isRemoteChocked()) {
|
||||
m_flags += "d ";
|
||||
m_flagsDescription += tr("interested(local) and choked(peer)");
|
||||
m_flagsDescription += ", ";
|
||||
flagsDescriptionList += "d = "
|
||||
+ tr("Interested(local) and Choked(peer)");
|
||||
}
|
||||
else {
|
||||
//D = Currently downloading (interested and not choked)
|
||||
// D = Currently downloading (interested and not choked)
|
||||
m_flags += "D ";
|
||||
m_flagsDescription += tr("interested(local) and unchoked(peer)");
|
||||
m_flagsDescription += ", ";
|
||||
flagsDescriptionList += "D = "
|
||||
+ tr("interested(local) and unchoked(peer)");
|
||||
}
|
||||
}
|
||||
|
||||
if (isRemoteInterested()) {
|
||||
//u = Peer wants your client to upload, but your client doesn't want to (interested and choked)
|
||||
// u = Peer wants your client to upload, but your client doesn't want to (interested and choked)
|
||||
if (isChocked()) {
|
||||
m_flags += "u ";
|
||||
m_flagsDescription += tr("interested(peer) and choked(local)");
|
||||
m_flagsDescription += ", ";
|
||||
flagsDescriptionList += "u = "
|
||||
+ tr("interested(peer) and choked(local)");
|
||||
}
|
||||
else {
|
||||
//U = Currently uploading (interested and not choked)
|
||||
// U = Currently uploading (interested and not choked)
|
||||
m_flags += "U ";
|
||||
m_flagsDescription += tr("interested(peer) and unchoked(local)");
|
||||
m_flagsDescription += ", ";
|
||||
flagsDescriptionList += "U = "
|
||||
+ tr("interested(peer) and unchoked(local)");
|
||||
}
|
||||
}
|
||||
|
||||
//O = Optimistic unchoke
|
||||
// O = Optimistic unchoke
|
||||
if (optimisticUnchoke()) {
|
||||
m_flags += "O ";
|
||||
m_flagsDescription += tr("optimistic unchoke");
|
||||
m_flagsDescription += ", ";
|
||||
flagsDescriptionList += "O = "
|
||||
+ tr("optimistic unchoke");
|
||||
}
|
||||
|
||||
//S = Peer is snubbed
|
||||
// S = Peer is snubbed
|
||||
if (isSnubbed()) {
|
||||
m_flags += "S ";
|
||||
m_flagsDescription += tr("peer snubbed");
|
||||
m_flagsDescription += ", ";
|
||||
flagsDescriptionList += "S = "
|
||||
+ tr("peer snubbed");
|
||||
}
|
||||
|
||||
//I = Peer is an incoming connection
|
||||
// I = Peer is an incoming connection
|
||||
if (!isLocalConnection()) {
|
||||
m_flags += "I ";
|
||||
m_flagsDescription += tr("incoming connection");
|
||||
m_flagsDescription += ", ";
|
||||
flagsDescriptionList += "I = "
|
||||
+ tr("incoming connection");
|
||||
}
|
||||
|
||||
//K = Peer is unchoking your client, but your client is not interested
|
||||
// K = Peer is unchoking your client, but your client is not interested
|
||||
if (!isRemoteChocked() && !isInteresting()) {
|
||||
m_flags += "K ";
|
||||
m_flagsDescription += tr("not interested(local) and unchoked(peer)");
|
||||
m_flagsDescription += ", ";
|
||||
flagsDescriptionList += "K = "
|
||||
+ tr("not interested(local) and unchoked(peer)");
|
||||
}
|
||||
|
||||
//? = Your client unchoked the peer but the peer is not interested
|
||||
// ? = Your client unchoked the peer but the peer is not interested
|
||||
if (!isChocked() && !isRemoteInterested()) {
|
||||
m_flags += "? ";
|
||||
m_flagsDescription += tr("not interested(peer) and unchoked(local)");
|
||||
m_flagsDescription += ", ";
|
||||
flagsDescriptionList += "? = "
|
||||
+ tr("not interested(peer) and unchoked(local)");
|
||||
}
|
||||
|
||||
//X = Peer was included in peerlists obtained through Peer Exchange (PEX)
|
||||
// X = Peer was included in peerlists obtained through Peer Exchange (PEX)
|
||||
if (fromPeX()) {
|
||||
m_flags += "X ";
|
||||
m_flagsDescription += tr("peer from PEX");
|
||||
m_flagsDescription += ", ";
|
||||
flagsDescriptionList += "X = "
|
||||
+ tr("peer from PEX");
|
||||
}
|
||||
|
||||
//H = Peer was obtained through DHT
|
||||
// H = Peer was obtained through DHT
|
||||
if (fromDHT()) {
|
||||
m_flags += "H ";
|
||||
m_flagsDescription += tr("peer from DHT");
|
||||
m_flagsDescription += ", ";
|
||||
flagsDescriptionList += "H = "
|
||||
+ tr("peer from DHT");
|
||||
}
|
||||
|
||||
//E = Peer is using Protocol Encryption (all traffic)
|
||||
// E = Peer is using Protocol Encryption (all traffic)
|
||||
if (isRC4Encrypted()) {
|
||||
m_flags += "E ";
|
||||
m_flagsDescription += tr("encrypted traffic");
|
||||
m_flagsDescription += ", ";
|
||||
flagsDescriptionList += "E = "
|
||||
+ tr("encrypted traffic");
|
||||
}
|
||||
|
||||
//e = Peer is using Protocol Encryption (handshake)
|
||||
// e = Peer is using Protocol Encryption (handshake)
|
||||
if (isPlaintextEncrypted()) {
|
||||
m_flags += "e ";
|
||||
m_flagsDescription += tr("encrypted handshake");
|
||||
m_flagsDescription += ", ";
|
||||
flagsDescriptionList += "e = "
|
||||
+ tr("encrypted handshake");
|
||||
}
|
||||
|
||||
//P = Peer is using uTorrent uTP
|
||||
|
||||
// P = Peer is using uTorrent uTP
|
||||
if (useUTPSocket()) {
|
||||
m_flags += "P ";
|
||||
m_flagsDescription += QString::fromUtf8(C_UTP);
|
||||
m_flagsDescription += ", ";
|
||||
flagsDescriptionList += "P = "
|
||||
+ QString::fromUtf8(C_UTP);
|
||||
}
|
||||
|
||||
//L = Peer is local
|
||||
// L = Peer is local
|
||||
if (fromLSD()) {
|
||||
m_flags += "L";
|
||||
m_flagsDescription += tr("peer from LSD");
|
||||
m_flags += 'L';
|
||||
flagsDescriptionList += "L = "
|
||||
+ tr("peer from LSD");
|
||||
}
|
||||
|
||||
m_flags = m_flags.trimmed();
|
||||
m_flagsDescription = m_flagsDescription.trimmed();
|
||||
if (m_flagsDescription.endsWith(',', Qt::CaseInsensitive))
|
||||
m_flagsDescription.chop(1);
|
||||
m_flagsDescription = flagsDescriptionList.join('\n');
|
||||
}
|
||||
|
||||
QString PeerInfo::flags() const
|
||||
|
||||
@@ -29,11 +29,11 @@
|
||||
#ifndef BITTORRENT_PEERINFO_H
|
||||
#define BITTORRENT_PEERINFO_H
|
||||
|
||||
#include <libtorrent/peer_info.hpp>
|
||||
|
||||
#include <QHostAddress>
|
||||
#include <QBitArray>
|
||||
#include <QCoreApplication>
|
||||
#include <QHostAddress>
|
||||
|
||||
#include <libtorrent/peer_info.hpp>
|
||||
|
||||
namespace BitTorrent
|
||||
{
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/*
|
||||
* Bittorrent Client using Qt and libtorrent.
|
||||
* Copyright (C) 2010 Christophe Dumez
|
||||
* Copyright (C) 2017 Vladimir Golovnev <glassez@yandex.ru>
|
||||
* Copyright (C) 2010 Christophe Dumez <chris@qbittorrent.org>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
@@ -24,72 +25,78 @@
|
||||
* modify file(s), you may extend this exception to your version of the file(s),
|
||||
* but you are not obligated to do so. If you do not wish to do so, delete this
|
||||
* exception statement from your version.
|
||||
*
|
||||
* Contact : chris@qbittorrent.org
|
||||
*/
|
||||
|
||||
#include <QTime>
|
||||
#include <QDateTime>
|
||||
|
||||
#include "base/bittorrent/session.h"
|
||||
#include "base/preferences.h"
|
||||
#include "bandwidthscheduler.h"
|
||||
|
||||
#include <utility>
|
||||
|
||||
#include <QDate>
|
||||
#include <QTime>
|
||||
|
||||
#include "base/preferences.h"
|
||||
|
||||
BandwidthScheduler::BandwidthScheduler(QObject *parent)
|
||||
: QTimer(parent)
|
||||
: QObject(parent)
|
||||
, m_lastAlternative(false)
|
||||
{
|
||||
// Single shot, we call start() again manually
|
||||
setSingleShot(true);
|
||||
// Connect Signals/Slots
|
||||
connect(this, SIGNAL(timeout()), this, SLOT(start()));
|
||||
connect(&m_timer, &QTimer::timeout, this, &BandwidthScheduler::onTimeout);
|
||||
}
|
||||
|
||||
void BandwidthScheduler::start()
|
||||
{
|
||||
const Preferences* const pref = Preferences::instance();
|
||||
bool alt_bw_enabled = BitTorrent::Session::instance()->isAltGlobalSpeedLimitEnabled();
|
||||
|
||||
QTime start = pref->getSchedulerStartTime();
|
||||
QTime end = pref->getSchedulerEndTime();
|
||||
QTime now = QTime::currentTime();
|
||||
int sched_days = pref->getSchedulerDays();
|
||||
int day = QDateTime::currentDateTime().toLocalTime().date().dayOfWeek();
|
||||
bool new_mode = false;
|
||||
bool reverse = false;
|
||||
|
||||
if (start > end) {
|
||||
QTime temp = start;
|
||||
start = end;
|
||||
end = temp;
|
||||
reverse = true;
|
||||
}
|
||||
|
||||
if ((start <= now) && (end >= now)) {
|
||||
switch(sched_days) {
|
||||
case EVERY_DAY:
|
||||
new_mode = true;
|
||||
break;
|
||||
case WEEK_ENDS:
|
||||
if ((day == 6) || (day == 7))
|
||||
new_mode = true;
|
||||
break;
|
||||
case WEEK_DAYS:
|
||||
if ((day != 6) && (day != 7))
|
||||
new_mode = true;
|
||||
break;
|
||||
default:
|
||||
if (day == (sched_days - 2))
|
||||
new_mode = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (reverse)
|
||||
new_mode = !new_mode;
|
||||
|
||||
if (new_mode != alt_bw_enabled)
|
||||
emit switchToAlternativeMode(new_mode);
|
||||
m_lastAlternative = isTimeForAlternative();
|
||||
emit bandwidthLimitRequested(m_lastAlternative);
|
||||
|
||||
// Timeout regularly to accommodate for external system clock changes
|
||||
// eg from the user or from a timesync utility
|
||||
QTimer::start(1500);
|
||||
m_timer.start(30000);
|
||||
}
|
||||
|
||||
bool BandwidthScheduler::isTimeForAlternative() const
|
||||
{
|
||||
const Preferences *const pref = Preferences::instance();
|
||||
|
||||
QTime start = pref->getSchedulerStartTime();
|
||||
QTime end = pref->getSchedulerEndTime();
|
||||
const QTime now = QTime::currentTime();
|
||||
const int schedulerDays = pref->getSchedulerDays();
|
||||
const int day = QDate::currentDate().dayOfWeek();
|
||||
bool alternative = false;
|
||||
|
||||
if (start > end) {
|
||||
std::swap(start, end);
|
||||
alternative = true;
|
||||
}
|
||||
|
||||
if ((start <= now) && (end >= now)) {
|
||||
switch (schedulerDays) {
|
||||
case EVERY_DAY:
|
||||
alternative = !alternative;
|
||||
break;
|
||||
case WEEK_ENDS:
|
||||
if ((day == 6) || (day == 7))
|
||||
alternative = !alternative;
|
||||
break;
|
||||
case WEEK_DAYS:
|
||||
if ((day != 6) && (day != 7))
|
||||
alternative = !alternative;
|
||||
break;
|
||||
default:
|
||||
if (day == (schedulerDays - 2))
|
||||
alternative = !alternative;
|
||||
}
|
||||
}
|
||||
|
||||
return alternative;
|
||||
}
|
||||
|
||||
void BandwidthScheduler::onTimeout()
|
||||
{
|
||||
bool alternative = isTimeForAlternative();
|
||||
|
||||
if (alternative != m_lastAlternative) {
|
||||
m_lastAlternative = alternative;
|
||||
emit bandwidthLimitRequested(alternative);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/*
|
||||
* Bittorrent Client using Qt and libtorrent.
|
||||
* Copyright (C) 2010 Christophe Dumez
|
||||
* Copyright (C) 2017 Vladimir Golovnev <glassez@yandex.ru>
|
||||
* Copyright (C) 2010 Christophe Dumez <chris@qbittorrent.org>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
@@ -24,27 +25,32 @@
|
||||
* modify file(s), you may extend this exception to your version of the file(s),
|
||||
* but you are not obligated to do so. If you do not wish to do so, delete this
|
||||
* exception statement from your version.
|
||||
*
|
||||
* Contact : chris@qbittorrent.org
|
||||
*/
|
||||
|
||||
#ifndef BANDWIDTHSCHEDULER_H
|
||||
#define BANDWIDTHSCHEDULER_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QTimer>
|
||||
|
||||
class BandwidthScheduler : public QTimer
|
||||
class BandwidthScheduler : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_DISABLE_COPY(BandwidthScheduler)
|
||||
|
||||
public:
|
||||
BandwidthScheduler(QObject *parent = 0);
|
||||
|
||||
public slots:
|
||||
explicit BandwidthScheduler(QObject *parent = nullptr);
|
||||
void start();
|
||||
|
||||
signals:
|
||||
void switchToAlternativeMode(bool alternative);
|
||||
void bandwidthLimitRequested(bool alternative);
|
||||
|
||||
private:
|
||||
bool isTimeForAlternative() const;
|
||||
void onTimeout();
|
||||
|
||||
QTimer m_timer;
|
||||
bool m_lastAlternative;
|
||||
};
|
||||
|
||||
#endif // BANDWIDTHSCHEDULER_H
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Bittorrent Client using Qt and libt.
|
||||
* Copyright (C) 2006 Christophe Dumez
|
||||
* Bittorrent Client using Qt and libtorrent.
|
||||
* Copyright (C) 2006 Christophe Dumez <chris@qbittorrent.org>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
@@ -24,17 +24,15 @@
|
||||
* modify file(s), you may extend this exception to your version of the file(s),
|
||||
* but you are not obligated to do so. If you do not wish to do so, delete this
|
||||
* exception statement from your version.
|
||||
*
|
||||
* Contact : chris@qbittorrent.org
|
||||
*/
|
||||
|
||||
#include "filterparserthread.h"
|
||||
|
||||
#include <cctype>
|
||||
|
||||
#include <QDataStream>
|
||||
#include <QFile>
|
||||
|
||||
#include <cctype>
|
||||
|
||||
#include "base/logger.h"
|
||||
|
||||
namespace libt = libtorrent;
|
||||
@@ -104,6 +102,7 @@ namespace
|
||||
}
|
||||
|
||||
const int BUFFER_SIZE = 2 * 1024 * 1024; // 2 MiB
|
||||
const int MAX_LOGGED_ERRORS = 5;
|
||||
}
|
||||
|
||||
FilterParserThread::FilterParserThread(QObject *parent)
|
||||
@@ -126,7 +125,7 @@ int FilterParserThread::parseDATFilterFile()
|
||||
if (!file.exists()) return ruleCount;
|
||||
|
||||
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
||||
LogMsg(tr("I/O Error: Could not open ip filter file in read mode."), Log::CRITICAL);
|
||||
LogMsg(tr("I/O Error: Could not open IP filter file in read mode."), Log::CRITICAL);
|
||||
return ruleCount;
|
||||
}
|
||||
|
||||
@@ -136,19 +135,25 @@ int FilterParserThread::parseDATFilterFile()
|
||||
int start = 0;
|
||||
int endOfLine = -1;
|
||||
int nbLine = 0;
|
||||
int parseErrorCount = 0;
|
||||
const auto addLog = [&parseErrorCount](const QString &msg)
|
||||
{
|
||||
if (parseErrorCount <= MAX_LOGGED_ERRORS)
|
||||
LogMsg(msg, Log::CRITICAL);
|
||||
};
|
||||
|
||||
while (true) {
|
||||
bytesRead = file.read(buffer.data() + offset, BUFFER_SIZE - offset - 1);
|
||||
if (bytesRead < 0)
|
||||
break;
|
||||
int dataSize = bytesRead + offset;
|
||||
if (bytesRead == 0 && dataSize == 0)
|
||||
if ((bytesRead == 0) && (dataSize == 0))
|
||||
break;
|
||||
|
||||
for (start = 0; start < dataSize; ++start) {
|
||||
endOfLine = -1;
|
||||
// The file might have ended without the last line having a newline
|
||||
if (!(bytesRead == 0 && dataSize > 0)) {
|
||||
if (!((bytesRead == 0) && (dataSize > 0))) {
|
||||
for (int i = start; i < dataSize; ++i) {
|
||||
if (buffer[i] == '\n') {
|
||||
endOfLine = i;
|
||||
@@ -204,7 +209,8 @@ int FilterParserThread::parseDATFilterFile()
|
||||
int endOfIPRange = ((firstComma == -1) ? (endOfLine - 1) : (firstComma - 1));
|
||||
int delimIP = findAndNullDelimiter(buffer.data(), '-', start, endOfIPRange);
|
||||
if (delimIP == -1) {
|
||||
LogMsg(tr("IP filter line %1 is malformed.").arg(nbLine), Log::CRITICAL);
|
||||
++parseErrorCount;
|
||||
addLog(tr("IP filter line %1 is malformed.").arg(nbLine));
|
||||
start = endOfLine;
|
||||
continue;
|
||||
}
|
||||
@@ -212,7 +218,8 @@ int FilterParserThread::parseDATFilterFile()
|
||||
libt::address startAddr;
|
||||
int newStart = trim(buffer.data(), start, delimIP - 1);
|
||||
if (!parseIPAddress(buffer.data() + newStart, startAddr)) {
|
||||
LogMsg(tr("IP filter line %1 is malformed. Start IP of the range is malformed.").arg(nbLine), Log::CRITICAL);
|
||||
++parseErrorCount;
|
||||
addLog(tr("IP filter line %1 is malformed. Start IP of the range is malformed.").arg(nbLine));
|
||||
start = endOfLine;
|
||||
continue;
|
||||
}
|
||||
@@ -220,14 +227,16 @@ int FilterParserThread::parseDATFilterFile()
|
||||
libt::address endAddr;
|
||||
newStart = trim(buffer.data(), delimIP + 1, endOfIPRange);
|
||||
if (!parseIPAddress(buffer.data() + newStart, endAddr)) {
|
||||
LogMsg(tr("IP filter line %1 is malformed. End IP of the range is malformed.").arg(nbLine), Log::CRITICAL);
|
||||
++parseErrorCount;
|
||||
addLog(tr("IP filter line %1 is malformed. End IP of the range is malformed.").arg(nbLine));
|
||||
start = endOfLine;
|
||||
continue;
|
||||
}
|
||||
|
||||
if ((startAddr.is_v4() != endAddr.is_v4())
|
||||
|| (startAddr.is_v6() != endAddr.is_v6())) {
|
||||
LogMsg(tr("IP filter line %1 is malformed. One IP is IPv4 and the other is IPv6!").arg(nbLine), Log::CRITICAL);
|
||||
++parseErrorCount;
|
||||
addLog(tr("IP filter line %1 is malformed. One IP is IPv4 and the other is IPv6!").arg(nbLine));
|
||||
start = endOfLine;
|
||||
continue;
|
||||
}
|
||||
@@ -240,8 +249,9 @@ int FilterParserThread::parseDATFilterFile()
|
||||
++ruleCount;
|
||||
}
|
||||
catch (std::exception &e) {
|
||||
LogMsg(tr("IP filter exception thrown for line %1. Exception is: %2").arg(nbLine)
|
||||
.arg(QString::fromLocal8Bit(e.what())), Log::CRITICAL);
|
||||
++parseErrorCount;
|
||||
addLog(tr("IP filter exception thrown for line %1. Exception is: %2")
|
||||
.arg(nbLine).arg(QString::fromLocal8Bit(e.what())));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -249,6 +259,9 @@ int FilterParserThread::parseDATFilterFile()
|
||||
offset = 0;
|
||||
}
|
||||
|
||||
if (parseErrorCount > MAX_LOGGED_ERRORS)
|
||||
LogMsg(tr("%1 extra IP filter parsing errors occurred.", "513 extra IP filter parsing errors occurred.")
|
||||
.arg(parseErrorCount - MAX_LOGGED_ERRORS), Log::CRITICAL);
|
||||
return ruleCount;
|
||||
}
|
||||
|
||||
@@ -260,7 +273,7 @@ int FilterParserThread::parseP2PFilterFile()
|
||||
if (!file.exists()) return ruleCount;
|
||||
|
||||
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
||||
LogMsg(tr("I/O Error: Could not open ip filter file in read mode."), Log::CRITICAL);
|
||||
LogMsg(tr("I/O Error: Could not open IP filter file in read mode."), Log::CRITICAL);
|
||||
return ruleCount;
|
||||
}
|
||||
|
||||
@@ -270,19 +283,25 @@ int FilterParserThread::parseP2PFilterFile()
|
||||
int start = 0;
|
||||
int endOfLine = -1;
|
||||
int nbLine = 0;
|
||||
int parseErrorCount = 0;
|
||||
const auto addLog = [&parseErrorCount](const QString &msg)
|
||||
{
|
||||
if (parseErrorCount <= MAX_LOGGED_ERRORS)
|
||||
LogMsg(msg, Log::CRITICAL);
|
||||
};
|
||||
|
||||
while (true) {
|
||||
bytesRead = file.read(buffer.data() + offset, BUFFER_SIZE - offset - 1);
|
||||
if (bytesRead < 0)
|
||||
break;
|
||||
int dataSize = bytesRead + offset;
|
||||
if (bytesRead == 0 && dataSize == 0)
|
||||
if ((bytesRead == 0) && (dataSize == 0))
|
||||
break;
|
||||
|
||||
for (start = 0; start < dataSize; ++start) {
|
||||
endOfLine = -1;
|
||||
// The file might have ended without the last line having a newline
|
||||
if (!(bytesRead == 0 && dataSize > 0)) {
|
||||
if (!((bytesRead == 0) && (dataSize > 0))) {
|
||||
for (int i = start; i < dataSize; ++i) {
|
||||
if (buffer[i] == '\n') {
|
||||
endOfLine = i;
|
||||
@@ -321,7 +340,8 @@ int FilterParserThread::parseP2PFilterFile()
|
||||
// The "Some organization" part might contain a ':' char itself so we find the last occurrence
|
||||
int partsDelimiter = findAndNullDelimiter(buffer.data(), ':', start, endOfLine, true);
|
||||
if (partsDelimiter == -1) {
|
||||
LogMsg(tr("IP filter line %1 is malformed.").arg(nbLine), Log::CRITICAL);
|
||||
++parseErrorCount;
|
||||
addLog(tr("IP filter line %1 is malformed.").arg(nbLine));
|
||||
start = endOfLine;
|
||||
continue;
|
||||
}
|
||||
@@ -329,7 +349,8 @@ int FilterParserThread::parseP2PFilterFile()
|
||||
// IP Range should be split by a dash
|
||||
int delimIP = findAndNullDelimiter(buffer.data(), '-', partsDelimiter + 1, endOfLine);
|
||||
if (delimIP == -1) {
|
||||
LogMsg(tr("IP filter line %1 is malformed.").arg(nbLine), Log::CRITICAL);
|
||||
++parseErrorCount;
|
||||
addLog(tr("IP filter line %1 is malformed.").arg(nbLine));
|
||||
start = endOfLine;
|
||||
continue;
|
||||
}
|
||||
@@ -337,7 +358,8 @@ int FilterParserThread::parseP2PFilterFile()
|
||||
libt::address startAddr;
|
||||
int newStart = trim(buffer.data(), partsDelimiter + 1, delimIP - 1);
|
||||
if (!parseIPAddress(buffer.data() + newStart, startAddr)) {
|
||||
LogMsg(tr("IP filter line %1 is malformed. Start IP of the range is malformed.").arg(nbLine), Log::CRITICAL);
|
||||
++parseErrorCount;
|
||||
addLog(tr("IP filter line %1 is malformed. Start IP of the range is malformed.").arg(nbLine));
|
||||
start = endOfLine;
|
||||
continue;
|
||||
}
|
||||
@@ -345,14 +367,16 @@ int FilterParserThread::parseP2PFilterFile()
|
||||
libt::address endAddr;
|
||||
newStart = trim(buffer.data(), delimIP + 1, endOfLine);
|
||||
if (!parseIPAddress(buffer.data() + newStart, endAddr)) {
|
||||
LogMsg(tr("IP filter line %1 is malformed. End IP of the range is malformed.").arg(nbLine), Log::CRITICAL);
|
||||
++parseErrorCount;
|
||||
addLog(tr("IP filter line %1 is malformed. End IP of the range is malformed.").arg(nbLine));
|
||||
start = endOfLine;
|
||||
continue;
|
||||
}
|
||||
|
||||
if ((startAddr.is_v4() != endAddr.is_v4())
|
||||
|| (startAddr.is_v6() != endAddr.is_v6())) {
|
||||
LogMsg(tr("IP filter line %1 is malformed. One IP is IPv4 and the other is IPv6!").arg(nbLine), Log::CRITICAL);
|
||||
++parseErrorCount;
|
||||
addLog(tr("IP filter line %1 is malformed. One IP is IPv4 and the other is IPv6!").arg(nbLine));
|
||||
start = endOfLine;
|
||||
continue;
|
||||
}
|
||||
@@ -364,8 +388,9 @@ int FilterParserThread::parseP2PFilterFile()
|
||||
++ruleCount;
|
||||
}
|
||||
catch (std::exception &e) {
|
||||
LogMsg(tr("IP filter exception thrown for line %1. Exception is: %2").arg(nbLine)
|
||||
.arg(QString::fromLocal8Bit(e.what())), Log::CRITICAL);
|
||||
++parseErrorCount;
|
||||
addLog(tr("IP filter exception thrown for line %1. Exception is: %2")
|
||||
.arg(nbLine).arg(QString::fromLocal8Bit(e.what())));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -373,30 +398,33 @@ int FilterParserThread::parseP2PFilterFile()
|
||||
offset = 0;
|
||||
}
|
||||
|
||||
if (parseErrorCount > MAX_LOGGED_ERRORS)
|
||||
LogMsg(tr("%1 extra IP filter parsing errors occurred.", "513 extra IP filter parsing errors occurred.")
|
||||
.arg(parseErrorCount - MAX_LOGGED_ERRORS), Log::CRITICAL);
|
||||
return ruleCount;
|
||||
}
|
||||
|
||||
int FilterParserThread::getlineInStream(QDataStream &stream, std::string &name, char delim)
|
||||
{
|
||||
char c;
|
||||
int total_read = 0;
|
||||
int totalRead = 0;
|
||||
int read;
|
||||
do {
|
||||
read = stream.readRawData(&c, 1);
|
||||
total_read += read;
|
||||
totalRead += read;
|
||||
if (read > 0) {
|
||||
if (c != delim) {
|
||||
name += c;
|
||||
}
|
||||
else {
|
||||
// Delim found
|
||||
return total_read;
|
||||
return totalRead;
|
||||
}
|
||||
}
|
||||
}
|
||||
while(read > 0);
|
||||
while (read > 0);
|
||||
|
||||
return total_read;
|
||||
return totalRead;
|
||||
}
|
||||
|
||||
// Parser for PeerGuardian ip filter in p2p format
|
||||
@@ -407,7 +435,7 @@ int FilterParserThread::parseP2BFilterFile()
|
||||
if (!file.exists()) return ruleCount;
|
||||
|
||||
if (!file.open(QIODevice::ReadOnly)) {
|
||||
LogMsg(tr("I/O Error: Could not open ip filter file in read mode."), Log::CRITICAL);
|
||||
LogMsg(tr("I/O Error: Could not open IP filter file in read mode."), Log::CRITICAL);
|
||||
return ruleCount;
|
||||
}
|
||||
|
||||
@@ -427,7 +455,7 @@ int FilterParserThread::parseP2BFilterFile()
|
||||
unsigned int start, end;
|
||||
|
||||
std::string name;
|
||||
while(getlineInStream(stream, name, '\0') && !m_abort) {
|
||||
while (getlineInStream(stream, name, '\0') && !m_abort) {
|
||||
if (!stream.readRawData(reinterpret_cast<char*>(&start), sizeof(start))
|
||||
|| !stream.readRawData(reinterpret_cast<char*>(&end), sizeof(end))) {
|
||||
LogMsg(tr("Parsing Error: The filter file is not a valid PeerGuardian P2B file."), Log::CRITICAL);
|
||||
@@ -444,7 +472,7 @@ int FilterParserThread::parseP2BFilterFile()
|
||||
m_filter.add_rule(first, last, libt::ip_filter::blocked);
|
||||
++ruleCount;
|
||||
}
|
||||
catch(std::exception &) {}
|
||||
catch (std::exception &) {}
|
||||
}
|
||||
}
|
||||
else if (version == 3) {
|
||||
@@ -494,7 +522,7 @@ int FilterParserThread::parseP2BFilterFile()
|
||||
m_filter.add_rule(first, last, libt::ip_filter::blocked);
|
||||
++ruleCount;
|
||||
}
|
||||
catch(std::exception &) {}
|
||||
catch (std::exception &) {}
|
||||
|
||||
if (m_abort) return ruleCount;
|
||||
}
|
||||
@@ -553,7 +581,7 @@ void FilterParserThread::run()
|
||||
try {
|
||||
emit IPFilterParsed(ruleCount);
|
||||
}
|
||||
catch(std::exception &) {
|
||||
catch (std::exception &) {
|
||||
emit IPFilterError();
|
||||
}
|
||||
|
||||
@@ -582,7 +610,7 @@ int FilterParserThread::findAndNullDelimiter(char *const data, char delimiter, i
|
||||
return -1;
|
||||
}
|
||||
|
||||
int FilterParserThread::trim(char* const data, int start, int end)
|
||||
int FilterParserThread::trim(char *const data, int start, int end)
|
||||
{
|
||||
if (start >= end) return start;
|
||||
int newStart = start;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Bittorrent Client using Qt and libtorrent.
|
||||
* Copyright (C) 2006 Christophe Dumez
|
||||
* Copyright (C) 2006 Christophe Dumez <chris@qbittorrent.org>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
@@ -24,8 +24,6 @@
|
||||
* modify file(s), you may extend this exception to your version of the file(s),
|
||||
* but you are not obligated to do so. If you do not wish to do so, delete this
|
||||
* exception statement from your version.
|
||||
*
|
||||
* Contact : chris@qbittorrent.org
|
||||
*/
|
||||
|
||||
#ifndef FILTERPARSERTHREAD_H
|
||||
@@ -42,7 +40,7 @@ class FilterParserThread : public QThread
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
FilterParserThread(QObject *parent = 0);
|
||||
FilterParserThread(QObject *parent = nullptr);
|
||||
~FilterParserThread();
|
||||
void processFilterFile(const QString &filePath);
|
||||
libtorrent::ip_filter IPfilter();
|
||||
|
||||