Compare commits
513 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1d745535f7 | ||
|
|
3184aeed43 | ||
|
|
3faf010b55 | ||
|
|
163c80e203 | ||
|
|
73462e97aa | ||
|
|
6f4144a464 | ||
|
|
9820464545 | ||
|
|
3ecd7823f9 | ||
|
|
9b504eaddd | ||
|
|
838ca6cba0 | ||
|
|
7e5e40d5c4 | ||
|
|
abd8d1fda1 | ||
|
|
0a3491f332 | ||
|
|
15d9ca2b00 | ||
|
|
7682749415 | ||
|
|
a18fc5b5c9 | ||
|
|
96783a9b80 | ||
|
|
258c2cee2e | ||
|
|
65ff3c0de1 | ||
|
|
6879c9f1c9 | ||
|
|
fade8465e4 | ||
|
|
76b5c6b6d4 | ||
|
|
bdd0cc4dc3 | ||
|
|
876b1e239e | ||
|
|
da2007c7f6 | ||
|
|
7a33cb97cd | ||
|
|
7a18a58fae | ||
|
|
fcc9d02bcc | ||
|
|
98238669fe | ||
|
|
a80de38517 | ||
|
|
4cb75d91f9 | ||
|
|
55e4dceeb7 | ||
|
|
0006b35abf | ||
|
|
b153391cbf | ||
|
|
c0659a3124 | ||
|
|
de8a7aa680 | ||
|
|
03b11693a3 | ||
|
|
23f2d79f70 | ||
|
|
f6db365391 | ||
|
|
95f74ceb1f | ||
|
|
91be4961d7 | ||
|
|
b3eb16bfd3 | ||
|
|
52d91ce198 | ||
|
|
c49efcc137 | ||
|
|
c14556153f | ||
|
|
5e1a2a423f | ||
|
|
3ac1ba079a | ||
|
|
b7a9cd1d45 | ||
|
|
c7b0ce036d | ||
|
|
f5afa07b0a | ||
|
|
1b550b976f | ||
|
|
68f0b9e0aa | ||
|
|
8945ef2652 | ||
|
|
0cc74d21a2 | ||
|
|
f4c79c8f68 | ||
|
|
b6ef8edb12 | ||
|
|
06ffd3e841 | ||
|
|
a3596b80e9 | ||
|
|
8ac1d92161 | ||
|
|
d55f1d5c06 | ||
|
|
854c637c73 | ||
|
|
92ad0c4a43 | ||
|
|
fb8facb787 | ||
|
|
30832cc427 | ||
|
|
ab7f29c0b2 | ||
|
|
6500442217 | ||
|
|
0e6a9fd0c1 | ||
|
|
ed7c489722 | ||
|
|
d4b9b5129a | ||
|
|
4a79e24db2 | ||
|
|
215d185fbe | ||
|
|
6f273bf7dd | ||
|
|
f2bc25c9ca | ||
|
|
ca6de6128f | ||
|
|
a1e5e6ca40 | ||
|
|
cf8bb1c5bc | ||
|
|
ebe1cef357 | ||
|
|
922d14f016 | ||
|
|
7a0c6a2f8f | ||
|
|
f35a2c0b2c | ||
|
|
c6b22089e3 | ||
|
|
cf0082f92f | ||
|
|
f4e129d4e2 | ||
|
|
ec6eaf2121 | ||
|
|
1dc1f91620 | ||
|
|
5adbc01ef1 | ||
|
|
c4a04bfd05 | ||
|
|
03711429f4 | ||
|
|
e3cb040c3c | ||
|
|
83a21179fa | ||
|
|
829da85aa5 | ||
|
|
3b1ac89312 | ||
|
|
57df29e7c9 | ||
|
|
d774067004 | ||
|
|
728154386c | ||
|
|
bc31182c63 | ||
|
|
a6bb84080a | ||
|
|
576ba7c011 | ||
|
|
b6893aad16 | ||
|
|
59d1624ce5 | ||
|
|
a0faf1f54d | ||
|
|
caa7c845c2 | ||
|
|
e43a80d0be | ||
|
|
f060a92563 | ||
|
|
483696261d | ||
|
|
610e35ec64 | ||
|
|
5fa5526ea2 | ||
|
|
42d9d99a92 | ||
|
|
c3ff9ca917 | ||
|
|
875f123d5b | ||
|
|
a5f053afe4 | ||
|
|
63a6992f97 | ||
|
|
54740378f0 | ||
|
|
1dc443bc06 | ||
|
|
e541109d7c | ||
|
|
993f124120 | ||
|
|
0a373ea708 | ||
|
|
0fae01495e | ||
|
|
97867384b1 | ||
|
|
c54f6e83ed | ||
|
|
a9a731dfc0 | ||
|
|
d0f469bd90 | ||
|
|
374375ce3f | ||
|
|
89ef03412e | ||
|
|
07d3fe3a79 | ||
|
|
24107040cc | ||
|
|
9d9fc6d0bf | ||
|
|
51f5991f1e | ||
|
|
a8b93516cc | ||
|
|
a85c228e59 | ||
|
|
04a75eaca2 | ||
|
|
2f46601396 | ||
|
|
18fc6a9e0e | ||
|
|
34675e03a8 | ||
|
|
4b5cf94a29 | ||
|
|
1729e1a94c | ||
|
|
60859714ae | ||
|
|
b5fcfd918b | ||
|
|
44176be964 | ||
|
|
3935866052 | ||
|
|
1e9c45222c | ||
|
|
adc3b1a25c | ||
|
|
9ae0417cad | ||
|
|
03453d6800 | ||
|
|
1ac9c4ea8d | ||
|
|
986bb49a88 | ||
|
|
8f39c4140e | ||
|
|
9c7903868f | ||
|
|
8ee1adf058 | ||
|
|
27fb1fcd53 | ||
|
|
29cc5c1e7f | ||
|
|
29bb76019f | ||
|
|
bf6d57f327 | ||
|
|
eb5ec05ef8 | ||
|
|
c723028eae | ||
|
|
5d024fdf33 | ||
|
|
ed99cb297b | ||
|
|
a0e794a7f1 | ||
|
|
0761342840 | ||
|
|
4da9123b67 | ||
|
|
c7158e2c7c | ||
|
|
4adc45483a | ||
|
|
ae0ff6b3e3 | ||
|
|
dc6d2e6a6d | ||
|
|
5127f50d1e | ||
|
|
a26f2a7359 | ||
|
|
42f1f445a9 | ||
|
|
51304485c3 | ||
|
|
63cc6edddd | ||
|
|
58abebe9ac | ||
|
|
1182ae9e26 | ||
|
|
3407174c2f | ||
|
|
913894eaa5 | ||
|
|
db91552578 | ||
|
|
286e45bafe | ||
|
|
aa1bb470e6 | ||
|
|
3be9adde4b | ||
|
|
41d97abd08 | ||
|
|
6bc232c9b4 | ||
|
|
d4a0be92ae | ||
|
|
75bf41fba1 | ||
|
|
a2bfd5039c | ||
|
|
a9ee7472b9 | ||
|
|
211d6cb162 | ||
|
|
501c353291 | ||
|
|
aeba2e4de6 | ||
|
|
2f9f84c1f2 | ||
|
|
33646b1775 | ||
|
|
acb9fc7c8e | ||
|
|
081f9741e4 | ||
|
|
a70b7d5852 | ||
|
|
8b2c47cdcb | ||
|
|
a3beb9ba41 | ||
|
|
c4dfe576d0 | ||
|
|
0841fe8dd3 | ||
|
|
c3b270ba26 | ||
|
|
9ab5241459 | ||
|
|
ec603b061d | ||
|
|
b792a627e2 | ||
|
|
0e8c6a176b | ||
|
|
0353724472 | ||
|
|
bbb295fea4 | ||
|
|
d36ddb752a | ||
|
|
680f70aa1a | ||
|
|
4ea64bf9ee | ||
|
|
c1dd0079d9 | ||
|
|
f33d0a322d | ||
|
|
429c9afd60 | ||
|
|
a6653af440 | ||
|
|
abb2711d26 | ||
|
|
0a5ba5a3c7 | ||
|
|
0a643c06e7 | ||
|
|
6f5dcfa78b | ||
|
|
e2f7947966 | ||
|
|
4b9e8274b5 | ||
|
|
7aefa5afaf | ||
|
|
1606cf2e09 | ||
|
|
464cdabecf | ||
|
|
defa0b2781 | ||
|
|
acd2425250 | ||
|
|
aa37a67729 | ||
|
|
1b2e64788d | ||
|
|
b8ef78205a | ||
|
|
3e6422a889 | ||
|
|
0bcc923a8a | ||
|
|
0cb1f4d14b | ||
|
|
7ac6df24a3 | ||
|
|
5ef9600007 | ||
|
|
fcc84b6dc4 | ||
|
|
88dcbad790 | ||
|
|
7e4323c7de | ||
|
|
af831a7653 | ||
|
|
8bd85fa71d | ||
|
|
9d225452bd | ||
|
|
b79a82cc3f | ||
|
|
0380271499 | ||
|
|
2e243e5a38 | ||
|
|
e56b1a082b | ||
|
|
ef9c092662 | ||
|
|
86f559add4 | ||
|
|
5bcff7dab6 | ||
|
|
812e688572 | ||
|
|
8f3bf3313e | ||
|
|
87bf0d9a7e | ||
|
|
bb9140d075 | ||
|
|
267224b258 | ||
|
|
61884d1ada | ||
|
|
29ff9f403e | ||
|
|
b52292db92 | ||
|
|
57d0a17744 | ||
|
|
85a2860e86 | ||
|
|
7fc95c4c52 | ||
|
|
2c4336ab2a | ||
|
|
d584bedcb6 | ||
|
|
5c34f9e247 | ||
|
|
dbde585049 | ||
|
|
18404a128b | ||
|
|
302ca0e04e | ||
|
|
50cd6af394 | ||
|
|
fd8345ccbe | ||
|
|
7add98e9a3 | ||
|
|
aa93a04fd6 | ||
|
|
628bab92c4 | ||
|
|
12f2ea6728 | ||
|
|
8fa55b97b4 | ||
|
|
2742411abd | ||
|
|
9941d49579 | ||
|
|
93f6bb2740 | ||
|
|
95c6dd32e9 | ||
|
|
c5f8b00a6b | ||
|
|
7135d441e6 | ||
|
|
e0a1d78441 | ||
|
|
eb31925a00 | ||
|
|
6f4de8f503 | ||
|
|
db83302546 | ||
|
|
c74db8677b | ||
|
|
5e3c2d2a96 | ||
|
|
7a9b13a563 | ||
|
|
e27645cb00 | ||
|
|
34fcb13e78 | ||
|
|
758483bc6e | ||
|
|
9f4873e864 | ||
|
|
94448a8b33 | ||
|
|
acf0b0f7c4 | ||
|
|
d4816442ef | ||
|
|
e44a2302de | ||
|
|
4a2b91a043 | ||
|
|
14279104ae | ||
|
|
7843660bbf | ||
|
|
037b2338de | ||
|
|
cfa6f13620 | ||
|
|
00d222891c | ||
|
|
1ed8c898e9 | ||
|
|
c2f401a77a | ||
|
|
169dea1627 | ||
|
|
1883c04a12 | ||
|
|
ec70ee96f3 | ||
|
|
0337507446 | ||
|
|
890c7d731d | ||
|
|
3a6f9e51f5 | ||
|
|
eb41f01857 | ||
|
|
681c03b097 | ||
|
|
233333a616 | ||
|
|
f9947334f6 | ||
|
|
9b6b14b374 | ||
|
|
4c8da1a3e7 | ||
|
|
9e7868b3de | ||
|
|
8fad2acc36 | ||
|
|
4befda1eab | ||
|
|
29218158c0 | ||
|
|
40753860cf | ||
|
|
5142cf026f | ||
|
|
d64b477280 | ||
|
|
d0cf21d355 | ||
|
|
4257f70d2e | ||
|
|
d000328700 | ||
|
|
b5e45711fc | ||
|
|
9f94f412ef | ||
|
|
c13d4ca40e | ||
|
|
04d825f4b6 | ||
|
|
b448e215ad | ||
|
|
2d2c1ef29e | ||
|
|
d654a65ac7 | ||
|
|
f462bfc7c5 | ||
|
|
d6ab7920d9 | ||
|
|
ec359d0e6b | ||
|
|
be3713a535 | ||
|
|
a21258487f | ||
|
|
3ea472d9f2 | ||
|
|
a0587f3cde | ||
|
|
96c35a9410 | ||
|
|
41900140df | ||
|
|
a47dd69a71 | ||
|
|
0539e34c69 | ||
|
|
5d30f4b1eb | ||
|
|
4559965abf | ||
|
|
4801bd5818 | ||
|
|
9411a34a2b | ||
|
|
94bff61c45 | ||
|
|
cf3dd53e12 | ||
|
|
0ae72cd68a | ||
|
|
88624f055d | ||
|
|
50be2e067c | ||
|
|
116c5b361f | ||
|
|
ae28be4a10 | ||
|
|
fa2f52b551 | ||
|
|
658f6817ce | ||
|
|
28c401236b | ||
|
|
57ca82e620 | ||
|
|
7d700a3c84 | ||
|
|
2c2cc5c23e | ||
|
|
1763504b4e | ||
|
|
94db2f82a2 | ||
|
|
d967ebac9a | ||
|
|
6b5b3c96cf | ||
|
|
a8bf75d496 | ||
|
|
bb34de2bd8 | ||
|
|
b146654474 | ||
|
|
c897564d28 | ||
|
|
ae9bc786ad | ||
|
|
b2d85cc4bf | ||
|
|
ac505aac0e | ||
|
|
4eac71a032 | ||
|
|
fa29fc4028 | ||
|
|
f352af7ffb | ||
|
|
d7098343a2 | ||
|
|
908f4d34e3 | ||
|
|
78c7aed3b9 | ||
|
|
a8986124b8 | ||
|
|
57ec1cdda4 | ||
|
|
9dc47438c9 | ||
|
|
d6a0a5272a | ||
|
|
47ac10fb8e | ||
|
|
459a17bd7e | ||
|
|
de65b6fb7e | ||
|
|
6ddfc80672 | ||
|
|
048cf3b23e | ||
|
|
3c958dea20 | ||
|
|
0b420c5fe6 | ||
|
|
bb7d330516 | ||
|
|
795c29d5bd | ||
|
|
ad04116c00 | ||
|
|
42b9dec1d0 | ||
|
|
51e398d4f4 | ||
|
|
5c2e8c9574 | ||
|
|
feee0bf62b | ||
|
|
f6dee2b10f | ||
|
|
57fc438b91 | ||
|
|
aa5b62c931 | ||
|
|
f089fa34fc | ||
|
|
200032c9cb | ||
|
|
6a294bb4a0 | ||
|
|
4aa2e2e8c3 | ||
|
|
4cd7095a40 | ||
|
|
d3c5a71689 | ||
|
|
f4340b98ce | ||
|
|
867e546fa9 | ||
|
|
eb28fe9990 | ||
|
|
fa5c1eff25 | ||
|
|
bcdc88ecf0 | ||
|
|
1dca017537 | ||
|
|
9ff1a30dc4 | ||
|
|
4f0ff154d3 | ||
|
|
981a4ee240 | ||
|
|
378dd744fb | ||
|
|
d38e829330 | ||
|
|
ad65b6fdf3 | ||
|
|
ea6f3be374 | ||
|
|
85d217ec95 | ||
|
|
e8213242a9 | ||
|
|
0c603944b8 | ||
|
|
559187df6c | ||
|
|
eb00500b0b | ||
|
|
876f69dc7d | ||
|
|
33605d7f65 | ||
|
|
492fc846df | ||
|
|
febf206704 | ||
|
|
e1eeaadaff | ||
|
|
4f17366262 | ||
|
|
a8ac89c20c | ||
|
|
a13bba7f42 | ||
|
|
e0f421ac7a | ||
|
|
b6c0f9db5d | ||
|
|
50755d0295 | ||
|
|
9dc0027304 | ||
|
|
37ee52a930 | ||
|
|
692d885b55 | ||
|
|
6c0d796b4b | ||
|
|
db7e5e01b3 | ||
|
|
ae0b1ce3d6 | ||
|
|
419b8a3ff9 | ||
|
|
bdfc5dcd14 | ||
|
|
c0704cd500 | ||
|
|
1b36dbc435 | ||
|
|
188374f60c | ||
|
|
fd9d7563c2 | ||
|
|
bd9fcd88d8 | ||
|
|
b6ff17c50b | ||
|
|
2d3bac4e53 | ||
|
|
7af786fde9 | ||
|
|
1f1a7a27f0 | ||
|
|
c2e3cbca31 | ||
|
|
92a5e64487 | ||
|
|
9153f710df | ||
|
|
8151eb4837 | ||
|
|
a5b65a73a8 | ||
|
|
26b9bf0281 | ||
|
|
19c968de76 | ||
|
|
e64fa74899 | ||
|
|
9b3fa62b2d | ||
|
|
68983c54bb | ||
|
|
d9af9b895f | ||
|
|
50f332eac7 | ||
|
|
ad095efe3a | ||
|
|
3c947819c1 | ||
|
|
f52f9f0abe | ||
|
|
75ccffa5a2 | ||
|
|
f0035b95bb | ||
|
|
955f54cdef | ||
|
|
c5b8cda323 | ||
|
|
ae0dbcde5b | ||
|
|
f32d83e993 | ||
|
|
d7b881feb6 | ||
|
|
6bd98518e4 | ||
|
|
54d80bbc9b | ||
|
|
5f9ec1762a | ||
|
|
1c8dfd701b | ||
|
|
f520d7364d | ||
|
|
4d61a7c263 | ||
|
|
ac6ef500cc | ||
|
|
b5b2ef3120 | ||
|
|
7f3c3f6eb6 | ||
|
|
936bdd04a8 | ||
|
|
33baf40061 | ||
|
|
6a63d8f2b9 | ||
|
|
b11a4217c7 | ||
|
|
35114cf45c | ||
|
|
e07c472057 | ||
|
|
0fed1cc54d | ||
|
|
ac257cd65f | ||
|
|
088b0817d8 | ||
|
|
b0c75723e2 | ||
|
|
b368a93e2e | ||
|
|
c75cb390dd | ||
|
|
d39f826e0e | ||
|
|
1ea8b18893 | ||
|
|
8491ef428e | ||
|
|
42ce5c0c0d | ||
|
|
acca019afe | ||
|
|
4591f9c09f | ||
|
|
088a5a9771 | ||
|
|
19079c65c1 | ||
|
|
3804410949 | ||
|
|
b8e874a3a7 | ||
|
|
3a03568ec8 | ||
|
|
40da5630e1 | ||
|
|
b36626d50a | ||
|
|
26f897d22c | ||
|
|
1b4cb6483b | ||
|
|
9312c18c57 | ||
|
|
96434aabe9 | ||
|
|
95ec0777ca | ||
|
|
283423f1bd | ||
|
|
3a893d6179 | ||
|
|
6a83b31c5a | ||
|
|
9a3667c1de | ||
|
|
90fa47bbe6 | ||
|
|
44c265e2a7 | ||
|
|
bb9017d3a6 | ||
|
|
9d87f707a6 | ||
|
|
89cda9a1b4 | ||
|
|
653e56268d | ||
|
|
0862d6cfb0 |
596
.drone.yml
@@ -1,228 +1,382 @@
|
|||||||
clone:
|
kind: pipeline
|
||||||
git:
|
name: qt-5.7
|
||||||
image: plugins/git
|
|
||||||
tags: true
|
|
||||||
depth: 1
|
|
||||||
|
|
||||||
pipeline:
|
steps:
|
||||||
qt-5.7:
|
- name: build and test
|
||||||
image: nextcloudci/client-5.7:client-5.7-4
|
image: nextcloudci/client-5.7:client-5.7-4
|
||||||
commands:
|
commands:
|
||||||
# Install QtKeyChain
|
# Install QtKeyChain
|
||||||
- /bin/bash -c "
|
- /bin/bash -c "
|
||||||
source /opt/qt57/bin/qt57-env.sh &&
|
source /opt/qt57/bin/qt57-env.sh &&
|
||||||
cd /tmp &&
|
cd /tmp &&
|
||||||
git clone https://github.com/frankosterfeld/qtkeychain.git &&
|
git clone https://github.com/frankosterfeld/qtkeychain.git &&
|
||||||
cd qtkeychain &&
|
cd qtkeychain &&
|
||||||
git checkout v0.9.1 &&
|
git checkout v0.9.1 &&
|
||||||
mkdir build &&
|
mkdir build &&
|
||||||
cd build &&
|
cd build &&
|
||||||
cmake ../ &&
|
cmake ../ &&
|
||||||
make &&
|
make &&
|
||||||
make install"
|
make install"
|
||||||
# Build client
|
# Build client
|
||||||
- /bin/bash -c "
|
- /bin/bash -c "
|
||||||
source /opt/qt57/bin/qt57-env.sh &&
|
source /opt/qt57/bin/qt57-env.sh &&
|
||||||
mkdir build &&
|
mkdir build &&
|
||||||
cd build &&
|
cd build &&
|
||||||
cmake -D NO_SHIBBOLETH=1 -DCMAKE_BUILD_TYPE=Debug -DUNIT_TESTING=1 ../ &&
|
cmake -D NO_SHIBBOLETH=1 -DCMAKE_BUILD_TYPE=Debug -DUNIT_TESTING=1 ../ &&
|
||||||
make &&
|
make &&
|
||||||
useradd -m -s /bin/bash test &&
|
useradd -m -s /bin/bash test &&
|
||||||
chown -R test:test . &&
|
chown -R test:test . &&
|
||||||
su -c 'ctest --output-on-failure' test"
|
su -c 'ctest --output-on-failure' test"
|
||||||
when:
|
trigger:
|
||||||
matrix:
|
branch:
|
||||||
TESTS: qt-5.7
|
- master
|
||||||
qt-5.8:
|
event:
|
||||||
image: nextcloudci/client-5.8:client-5.8-4
|
- pull_request
|
||||||
commands:
|
- push
|
||||||
# Install QtKeyChain
|
|
||||||
- /bin/bash -c "
|
|
||||||
source /opt/qt58/bin/qt58-env.sh &&
|
|
||||||
cd /tmp &&
|
|
||||||
git clone https://github.com/frankosterfeld/qtkeychain.git &&
|
|
||||||
cd qtkeychain &&
|
|
||||||
git checkout v0.9.1 &&
|
|
||||||
mkdir build &&
|
|
||||||
cd build &&
|
|
||||||
cmake ../ &&
|
|
||||||
make &&
|
|
||||||
make install"
|
|
||||||
# Build client
|
|
||||||
- /bin/bash -c "
|
|
||||||
source /opt/qt58/bin/qt58-env.sh &&
|
|
||||||
mkdir build &&
|
|
||||||
cd build &&
|
|
||||||
cmake -D NO_SHIBBOLETH=1 -DCMAKE_BUILD_TYPE=Debug -DUNIT_TESTING=1 ../ &&
|
|
||||||
make &&
|
|
||||||
useradd -m -s /bin/bash test &&
|
|
||||||
chown -R test:test . &&
|
|
||||||
su -c 'ctest --output-on-failure' test"
|
|
||||||
when:
|
|
||||||
matrix:
|
|
||||||
TESTS: qt-5.8
|
|
||||||
qt-5.9:
|
|
||||||
image: nextcloudci/client-5.9:client-5.9-5
|
|
||||||
commands:
|
|
||||||
# Install QtKeyChain
|
|
||||||
- /bin/bash -c "
|
|
||||||
source /opt/qt59/bin/qt59-env.sh &&
|
|
||||||
cd /tmp &&
|
|
||||||
git clone https://github.com/frankosterfeld/qtkeychain.git &&
|
|
||||||
cd qtkeychain &&
|
|
||||||
git checkout v0.9.1 &&
|
|
||||||
mkdir build &&
|
|
||||||
cd build &&
|
|
||||||
cmake ../ &&
|
|
||||||
make &&
|
|
||||||
make install"
|
|
||||||
# Build client
|
|
||||||
- /bin/bash -c "
|
|
||||||
source /opt/qt59/bin/qt59-env.sh &&
|
|
||||||
mkdir build &&
|
|
||||||
cd build &&
|
|
||||||
cmake -D NO_SHIBBOLETH=1 -DCMAKE_BUILD_TYPE=Debug -DUNIT_TESTING=1 ../ &&
|
|
||||||
make &&
|
|
||||||
useradd -m -s /bin/bash test &&
|
|
||||||
chown -R test:test . &&
|
|
||||||
su -c 'ctest --output-on-failure' test"
|
|
||||||
when:
|
|
||||||
matrix:
|
|
||||||
TESTS: qt-5.9
|
|
||||||
qt-5.10:
|
|
||||||
image: nextcloudci/client-5.10:client-5.10-3
|
|
||||||
commands:
|
|
||||||
# Install QtKeyChain
|
|
||||||
- /bin/bash -c "
|
|
||||||
export CC=gcc-7 &&
|
|
||||||
export CXX=g++-7 &&
|
|
||||||
source /opt/qt510/bin/qt510-env.sh &&
|
|
||||||
cd /tmp &&
|
|
||||||
git clone https://github.com/frankosterfeld/qtkeychain.git &&
|
|
||||||
cd qtkeychain &&
|
|
||||||
git checkout v0.9.1 &&
|
|
||||||
mkdir build &&
|
|
||||||
cd build &&
|
|
||||||
cmake ../ &&
|
|
||||||
make &&
|
|
||||||
make install"
|
|
||||||
# Build client
|
|
||||||
- /bin/bash -c "
|
|
||||||
export CC=gcc-7 &&
|
|
||||||
export CXX=g++-7 &&
|
|
||||||
source /opt/qt510/bin/qt510-env.sh &&
|
|
||||||
mkdir build &&
|
|
||||||
cd build &&
|
|
||||||
cmake -D NO_SHIBBOLETH=1 -DCMAKE_BUILD_TYPE=Debug -DUNIT_TESTING=1 ../ &&
|
|
||||||
make &&
|
|
||||||
useradd -m -s /bin/bash test &&
|
|
||||||
chown -R test:test . &&
|
|
||||||
su -c 'ctest --output-on-failure' test"
|
|
||||||
when:
|
|
||||||
matrix:
|
|
||||||
TESTS: qt-5.10
|
|
||||||
qt-5.11:
|
|
||||||
image: nextcloudci/client-5.11:client-5.11-3
|
|
||||||
commands:
|
|
||||||
# Install QtKeyChain
|
|
||||||
- /bin/bash -c "
|
|
||||||
export CC=gcc-7 &&
|
|
||||||
export CXX=g++-7 &&
|
|
||||||
source /opt/qt511/bin/qt511-env.sh &&
|
|
||||||
cd /tmp &&
|
|
||||||
git clone https://github.com/frankosterfeld/qtkeychain.git &&
|
|
||||||
cd qtkeychain &&
|
|
||||||
git checkout v0.9.1 &&
|
|
||||||
mkdir build &&
|
|
||||||
cd build &&
|
|
||||||
cmake ../ &&
|
|
||||||
make &&
|
|
||||||
make install"
|
|
||||||
# Build client
|
|
||||||
- /bin/bash -c "
|
|
||||||
export CC=gcc-7 &&
|
|
||||||
export CXX=g++-7 &&
|
|
||||||
source /opt/qt511/bin/qt511-env.sh &&
|
|
||||||
mkdir build &&
|
|
||||||
cd build &&
|
|
||||||
cmake -D NO_SHIBBOLETH=1 -DCMAKE_BUILD_TYPE=Debug -DUNIT_TESTING=1 ../ &&
|
|
||||||
make &&
|
|
||||||
useradd -m -s /bin/bash test &&
|
|
||||||
chown -R test:test . &&
|
|
||||||
su -c 'ctest --output-on-failure' test"
|
|
||||||
when:
|
|
||||||
matrix:
|
|
||||||
TESTS: qt-5.11
|
|
||||||
|
|
||||||
qt-5.11-clang:
|
---
|
||||||
image: nextcloudci/client-5.11:client-5.11-3
|
kind: pipeline
|
||||||
commands:
|
name: qt-5.8
|
||||||
# Install QtKeyChain
|
|
||||||
- /bin/bash -c "
|
|
||||||
export CC=clang-6.0 &&
|
|
||||||
export CXX=clang++-6.0 &&
|
|
||||||
source /opt/qt511/bin/qt511-env.sh &&
|
|
||||||
cd /tmp &&
|
|
||||||
git clone https://github.com/frankosterfeld/qtkeychain.git &&
|
|
||||||
cd qtkeychain &&
|
|
||||||
git checkout v0.9.1 &&
|
|
||||||
mkdir build &&
|
|
||||||
cd build &&
|
|
||||||
cmake ../ &&
|
|
||||||
make &&
|
|
||||||
make install"
|
|
||||||
# Build client
|
|
||||||
- /bin/bash -c "
|
|
||||||
export CC=clang-6.0 &&
|
|
||||||
export CXX=clang++-6.0 &&
|
|
||||||
source /opt/qt511/bin/qt511-env.sh &&
|
|
||||||
mkdir build &&
|
|
||||||
cd build &&
|
|
||||||
cmake -D NO_SHIBBOLETH=1 -DCMAKE_BUILD_TYPE=Debug -DUNIT_TESTING=1 ../ &&
|
|
||||||
make &&
|
|
||||||
useradd -m -s /bin/bash test &&
|
|
||||||
chown -R test:test . &&
|
|
||||||
su -c 'ctest --output-on-failure' test"
|
|
||||||
when:
|
|
||||||
matrix:
|
|
||||||
TESTS: qt-5.11-clang
|
|
||||||
|
|
||||||
AppImage:
|
steps:
|
||||||
image: nextcloudci/client-5.11:client-5.11-3
|
- name: build and test
|
||||||
commands:
|
image: nextcloudci/client-5.8:client-5.8-4
|
||||||
- /bin/bash -c "./admin/linux/build-appimage.sh"
|
commands:
|
||||||
when:
|
# Install QtKeyChain
|
||||||
matrix:
|
- /bin/bash -c "
|
||||||
BUILD: AppImage
|
source /opt/qt58/bin/qt58-env.sh &&
|
||||||
|
cd /tmp &&
|
||||||
|
git clone https://github.com/frankosterfeld/qtkeychain.git &&
|
||||||
|
cd qtkeychain &&
|
||||||
|
git checkout v0.9.1 &&
|
||||||
|
mkdir build &&
|
||||||
|
cd build &&
|
||||||
|
cmake ../ &&
|
||||||
|
make &&
|
||||||
|
make install"
|
||||||
|
# Build client
|
||||||
|
- /bin/bash -c "
|
||||||
|
source /opt/qt58/bin/qt58-env.sh &&
|
||||||
|
mkdir build &&
|
||||||
|
cd build &&
|
||||||
|
cmake -D NO_SHIBBOLETH=1 -DCMAKE_BUILD_TYPE=Debug -DUNIT_TESTING=1 ../ &&
|
||||||
|
make &&
|
||||||
|
useradd -m -s /bin/bash test &&
|
||||||
|
chown -R test:test . &&
|
||||||
|
su -c 'ctest --output-on-failure' test"
|
||||||
|
trigger:
|
||||||
|
branch:
|
||||||
|
- master
|
||||||
|
event:
|
||||||
|
- pull_request
|
||||||
|
- push
|
||||||
|
|
||||||
Debian:
|
---
|
||||||
image: nextcloudci/client-debian-ci:client-debian-ci-2
|
kind: pipeline
|
||||||
commands:
|
name: qt-5.9
|
||||||
- /bin/bash -c "./admin/linux/debian/drone-build.sh"
|
|
||||||
secrets: [ DEBIAN_SECRET_KEY, DEBIAN_SECRET_IV ]
|
|
||||||
when:
|
|
||||||
matrix:
|
|
||||||
BUILD: Debian
|
|
||||||
|
|
||||||
documentation:
|
steps:
|
||||||
image: nextcloudci/documentation:documentation-5
|
- name: build and test
|
||||||
commands:
|
image: nextcloudci/client-5.9:client-5.9-5
|
||||||
- cd doc
|
commands:
|
||||||
- make html
|
# Install QtKeyChain
|
||||||
when:
|
- /bin/bash -c "
|
||||||
matrix:
|
source /opt/qt59/bin/qt59-env.sh &&
|
||||||
TESTS: documentation
|
cd /tmp &&
|
||||||
|
git clone https://github.com/frankosterfeld/qtkeychain.git &&
|
||||||
|
cd qtkeychain &&
|
||||||
|
git checkout v0.9.1 &&
|
||||||
|
mkdir build &&
|
||||||
|
cd build &&
|
||||||
|
cmake ../ &&
|
||||||
|
make &&
|
||||||
|
make install"
|
||||||
|
# Build client
|
||||||
|
- /bin/bash -c "
|
||||||
|
source /opt/qt59/bin/qt59-env.sh &&
|
||||||
|
mkdir build &&
|
||||||
|
cd build &&
|
||||||
|
cmake -D NO_SHIBBOLETH=1 -DCMAKE_BUILD_TYPE=Debug -DUNIT_TESTING=1 ../ &&
|
||||||
|
make &&
|
||||||
|
useradd -m -s /bin/bash test &&
|
||||||
|
chown -R test:test . &&
|
||||||
|
su -c 'ctest --output-on-failure' test"
|
||||||
|
trigger:
|
||||||
|
branch:
|
||||||
|
- master
|
||||||
|
event:
|
||||||
|
- pull_request
|
||||||
|
- push
|
||||||
|
|
||||||
matrix:
|
---
|
||||||
include:
|
kind: pipeline
|
||||||
- TESTS: qt-5.7
|
name: qt-5.10
|
||||||
- TESTS: qt-5.8
|
|
||||||
- TESTS: qt-5.9
|
|
||||||
- TESTS: qt-5.10
|
|
||||||
- TESTS: qt-5.11
|
|
||||||
- TESTS: qt-5.11-clang
|
|
||||||
- BUILD: AppImage
|
|
||||||
- BUILD: Debian
|
|
||||||
- TESTS: documentation
|
|
||||||
|
|
||||||
branches: [ master, 2.* ]
|
steps:
|
||||||
|
- name: build and test
|
||||||
|
image: nextcloudci/client-5.10:client-5.10-3
|
||||||
|
commands:
|
||||||
|
# Install QtKeyChain
|
||||||
|
- /bin/bash -c "
|
||||||
|
export CC=gcc-7 &&
|
||||||
|
export CXX=g++-7 &&
|
||||||
|
source /opt/qt510/bin/qt510-env.sh &&
|
||||||
|
cd /tmp &&
|
||||||
|
git clone https://github.com/frankosterfeld/qtkeychain.git &&
|
||||||
|
cd qtkeychain &&
|
||||||
|
git checkout v0.9.1 &&
|
||||||
|
mkdir build &&
|
||||||
|
cd build &&
|
||||||
|
cmake ../ &&
|
||||||
|
make &&
|
||||||
|
make install"
|
||||||
|
# Build client
|
||||||
|
- /bin/bash -c "
|
||||||
|
export CC=gcc-7 &&
|
||||||
|
export CXX=g++-7 &&
|
||||||
|
source /opt/qt510/bin/qt510-env.sh &&
|
||||||
|
mkdir build &&
|
||||||
|
cd build &&
|
||||||
|
cmake -D NO_SHIBBOLETH=1 -DCMAKE_BUILD_TYPE=Debug -DUNIT_TESTING=1 ../ &&
|
||||||
|
make &&
|
||||||
|
useradd -m -s /bin/bash test &&
|
||||||
|
chown -R test:test . &&
|
||||||
|
su -c 'ctest --output-on-failure' test"
|
||||||
|
trigger:
|
||||||
|
branch:
|
||||||
|
- master
|
||||||
|
event:
|
||||||
|
- pull_request
|
||||||
|
- push
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
name: qt-5.11
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: build and test
|
||||||
|
image: nextcloudci/client-5.11:client-5.11-3
|
||||||
|
commands:
|
||||||
|
# Install QtKeyChain
|
||||||
|
- /bin/bash -c "
|
||||||
|
export CC=gcc-7 &&
|
||||||
|
export CXX=g++-7 &&
|
||||||
|
source /opt/qt511/bin/qt511-env.sh &&
|
||||||
|
cd /tmp &&
|
||||||
|
git clone https://github.com/frankosterfeld/qtkeychain.git &&
|
||||||
|
cd qtkeychain &&
|
||||||
|
git checkout v0.9.1 &&
|
||||||
|
mkdir build &&
|
||||||
|
cd build &&
|
||||||
|
cmake ../ &&
|
||||||
|
make &&
|
||||||
|
make install"
|
||||||
|
# Build client
|
||||||
|
- /bin/bash -c "
|
||||||
|
export CC=gcc-7 &&
|
||||||
|
export CXX=g++-7 &&
|
||||||
|
source /opt/qt511/bin/qt511-env.sh &&
|
||||||
|
mkdir build &&
|
||||||
|
cd build &&
|
||||||
|
cmake -D NO_SHIBBOLETH=1 -DCMAKE_BUILD_TYPE=Debug -DUNIT_TESTING=1 ../ &&
|
||||||
|
make &&
|
||||||
|
useradd -m -s /bin/bash test &&
|
||||||
|
chown -R test:test . &&
|
||||||
|
su -c 'ctest --output-on-failure' test"
|
||||||
|
trigger:
|
||||||
|
branch:
|
||||||
|
- master
|
||||||
|
event:
|
||||||
|
- pull_request
|
||||||
|
- push
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
name: qt-5.11-clang
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: build and test
|
||||||
|
image: nextcloudci/client-5.11:client-5.11-3
|
||||||
|
commands:
|
||||||
|
# Install QtKeyChain
|
||||||
|
- /bin/bash -c "
|
||||||
|
export CC=clang-6.0 &&
|
||||||
|
export CXX=clang++-6.0 &&
|
||||||
|
source /opt/qt511/bin/qt511-env.sh &&
|
||||||
|
cd /tmp &&
|
||||||
|
git clone https://github.com/frankosterfeld/qtkeychain.git &&
|
||||||
|
cd qtkeychain &&
|
||||||
|
git checkout v0.9.1 &&
|
||||||
|
mkdir build &&
|
||||||
|
cd build &&
|
||||||
|
cmake ../ &&
|
||||||
|
make &&
|
||||||
|
make install"
|
||||||
|
# Build client
|
||||||
|
- /bin/bash -c "
|
||||||
|
export CC=clang-6.0 &&
|
||||||
|
export CXX=clang++-6.0 &&
|
||||||
|
source /opt/qt511/bin/qt511-env.sh &&
|
||||||
|
mkdir build &&
|
||||||
|
cd build &&
|
||||||
|
cmake -D NO_SHIBBOLETH=1 -DCMAKE_BUILD_TYPE=Debug -DUNIT_TESTING=1 ../ &&
|
||||||
|
make &&
|
||||||
|
useradd -m -s /bin/bash test &&
|
||||||
|
chown -R test:test . &&
|
||||||
|
su -c 'ctest --output-on-failure' test"
|
||||||
|
trigger:
|
||||||
|
branch:
|
||||||
|
- master
|
||||||
|
event:
|
||||||
|
- pull_request
|
||||||
|
- push
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
name: qt-5.12
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: build and test
|
||||||
|
image: nextcloudci/client-5.12:client-5.12-5
|
||||||
|
commands:
|
||||||
|
# Install QtKeyChain
|
||||||
|
- /bin/bash -c "
|
||||||
|
export CC=gcc-7 &&
|
||||||
|
export CXX=g++-7 &&
|
||||||
|
export QT_BASE_DIR=/opt/qt5.12.5 &&
|
||||||
|
export QTDIR=\$QT_BASE_DIR &&
|
||||||
|
export PATH=\$QT_BASE_DIR/bin:\$PATH &&
|
||||||
|
export LD_LIBRARY_PATH=\$QT_BASE_DIR/lib/x86_64-linux-gnu:\$QT_BASE_DIR/lib:/usr/local/lib:\$LD_LIBRARY_PATH &&
|
||||||
|
export PKG_CONFIG_PATH=\$QT_BASE_DIR/lib/pkgconfig:\$PKG_CONFIG_PATH &&
|
||||||
|
cd /tmp &&
|
||||||
|
git clone https://github.com/frankosterfeld/qtkeychain.git &&
|
||||||
|
cd qtkeychain &&
|
||||||
|
git checkout v0.9.1 &&
|
||||||
|
mkdir build &&
|
||||||
|
cd build &&
|
||||||
|
cmake ../ &&
|
||||||
|
make &&
|
||||||
|
make install"
|
||||||
|
# Build client
|
||||||
|
- /bin/bash -c "
|
||||||
|
export CC=gcc-7 &&
|
||||||
|
export CXX=g++-7 &&
|
||||||
|
export QT_BASE_DIR=/opt/qt5.12.5 &&
|
||||||
|
export QTDIR=\$QT_BASE_DIR &&
|
||||||
|
export PATH=\$QT_BASE_DIR/bin:\$PATH &&
|
||||||
|
export LD_LIBRARY_PATH=\$QT_BASE_DIR/lib/x86_64-linux-gnu:\$QT_BASE_DIR/lib:/usr/local/lib:\$LD_LIBRARY_PATH &&
|
||||||
|
export PKG_CONFIG_PATH=\$QT_BASE_DIR/lib/pkgconfig:\$PKG_CONFIG_PATH &&
|
||||||
|
mkdir build &&
|
||||||
|
cd build &&
|
||||||
|
cmake -D NO_SHIBBOLETH=1 -DCMAKE_BUILD_TYPE=Debug -DUNIT_TESTING=1 ../ &&
|
||||||
|
make &&
|
||||||
|
useradd -m -s /bin/bash test &&
|
||||||
|
chown -R test:test . &&
|
||||||
|
su -c 'ctest --output-on-failure' test"
|
||||||
|
trigger:
|
||||||
|
branch:
|
||||||
|
- master
|
||||||
|
event:
|
||||||
|
- pull_request
|
||||||
|
- push
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
name: qt-5.12-clang
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: build and test
|
||||||
|
image: nextcloudci/client-5.12:client-5.12-5
|
||||||
|
commands:
|
||||||
|
# Install QtKeyChain
|
||||||
|
- /bin/bash -c "
|
||||||
|
export CC=clang-6.0 &&
|
||||||
|
export CXX=clang++-6.0 &&
|
||||||
|
export QT_BASE_DIR=/opt/qt5.12.5 &&
|
||||||
|
export QTDIR=\$QT_BASE_DIR &&
|
||||||
|
export PATH=\$QT_BASE_DIR/bin:\$PATH &&
|
||||||
|
export LD_LIBRARY_PATH=\$QT_BASE_DIR/lib/x86_64-linux-gnu:\$QT_BASE_DIR/lib:/usr/local/lib:\$LD_LIBRARY_PATH &&
|
||||||
|
export PKG_CONFIG_PATH=\$QT_BASE_DIR/lib/pkgconfig:\$PKG_CONFIG_PATH &&
|
||||||
|
cd /tmp &&
|
||||||
|
git clone https://github.com/frankosterfeld/qtkeychain.git &&
|
||||||
|
cd qtkeychain &&
|
||||||
|
git checkout v0.9.1 &&
|
||||||
|
mkdir build &&
|
||||||
|
cd build &&
|
||||||
|
cmake ../ &&
|
||||||
|
make &&
|
||||||
|
make install"
|
||||||
|
# Build client
|
||||||
|
- /bin/bash -c "
|
||||||
|
export CC=clang-6.0 &&
|
||||||
|
export CXX=clang++-6.0 &&
|
||||||
|
export QT_BASE_DIR=/opt/qt5.12.5 &&
|
||||||
|
export QTDIR=\$QT_BASE_DIR &&
|
||||||
|
export PATH=\$QT_BASE_DIR/bin:\$PATH &&
|
||||||
|
export LD_LIBRARY_PATH=\$QT_BASE_DIR/lib/x86_64-linux-gnu:\$QT_BASE_DIR/lib:/usr/local/lib:\$LD_LIBRARY_PATH &&
|
||||||
|
export PKG_CONFIG_PATH=\$QT_BASE_DIR/lib/pkgconfig:\$PKG_CONFIG_PATH &&
|
||||||
|
mkdir build &&
|
||||||
|
cd build &&
|
||||||
|
cmake -D NO_SHIBBOLETH=1 -DCMAKE_BUILD_TYPE=Debug -DUNIT_TESTING=1 ../ &&
|
||||||
|
make &&
|
||||||
|
useradd -m -s /bin/bash test &&
|
||||||
|
chown -R test:test . &&
|
||||||
|
su -c 'ctest --output-on-failure' test"
|
||||||
|
trigger:
|
||||||
|
branch:
|
||||||
|
- master
|
||||||
|
event:
|
||||||
|
- pull_request
|
||||||
|
- push
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
name: AppImage
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: build
|
||||||
|
image: nextcloudci/client-5.12:client-5.12-5
|
||||||
|
commands:
|
||||||
|
- /bin/bash -c "./admin/linux/build-appimage.sh"
|
||||||
|
- /bin/bash -c "./admin/linux/upload-appimage.sh"
|
||||||
|
trigger:
|
||||||
|
branch:
|
||||||
|
- master
|
||||||
|
event:
|
||||||
|
- pull_request
|
||||||
|
- push
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
name: Debian
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: build
|
||||||
|
image: nextcloudci/client-debian-ci:client-debian-ci-2
|
||||||
|
commands:
|
||||||
|
- /bin/bash -c "./admin/linux/debian/drone-build.sh"
|
||||||
|
environment:
|
||||||
|
DEBIAN_SECRET_KEY:
|
||||||
|
from_secret: DEBIAN_SECRET_KEY
|
||||||
|
DEBIAN_SECRET_IV:
|
||||||
|
from_secret: DEBIAN_SECRET_IV
|
||||||
|
trigger:
|
||||||
|
branch:
|
||||||
|
- stable-2.6
|
||||||
|
event:
|
||||||
|
- tag
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
name: Documentation
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: build
|
||||||
|
image: nextcloudci/documentation:documentation-5
|
||||||
|
commands:
|
||||||
|
- cd doc
|
||||||
|
- make html
|
||||||
|
trigger:
|
||||||
|
branch:
|
||||||
|
- master
|
||||||
|
event:
|
||||||
|
- pull_request
|
||||||
|
- push
|
||||||
|
|||||||
33
.github/issue_template.md
vendored
@@ -1,9 +1,14 @@
|
|||||||
<!---
|
<!--
|
||||||
Please try to only report a bug if it happens with the latest version
|
Dear user,
|
||||||
The latest version can be seen by checking https://download.nextcloud.com/desktop/
|
Please understand that at the moment, we are very busy with customer issues
|
||||||
For support try our forums: https://help.nextcloud.com
|
and some high priority development work. A lot of issues are getting reported.
|
||||||
--->
|
Right now we can't keep up and timely respond to all of them.
|
||||||
|
We're sorry for that and are expanding our team, if you're looking for a C++
|
||||||
|
job or know somebody who is, please point them to https://nextcloud.com/jobs
|
||||||
|
Don't forget that Github is not a support system or a place to ask for
|
||||||
|
features but only a place to report verified bugs - see nextcloud.com/support
|
||||||
|
for support options!
|
||||||
|
-->
|
||||||
|
|
||||||
### Expected behaviour
|
### Expected behaviour
|
||||||
Tell us what should happen
|
Tell us what should happen
|
||||||
@@ -18,6 +23,11 @@ Tell us what happens instead
|
|||||||
|
|
||||||
### Client configuration
|
### Client configuration
|
||||||
Client version:
|
Client version:
|
||||||
|
<!---
|
||||||
|
Please try to only report a bug if it happens with the latest version
|
||||||
|
The latest version can be seen by checking https://download.nextcloud.com/desktop/
|
||||||
|
For support try our forums: https://help.nextcloud.com
|
||||||
|
--->
|
||||||
|
|
||||||
Operating system:
|
Operating system:
|
||||||
|
|
||||||
@@ -34,15 +44,6 @@ Installation path of client:
|
|||||||
<!---
|
<!---
|
||||||
Optional section. It depends on the issue.
|
Optional section. It depends on the issue.
|
||||||
--->
|
--->
|
||||||
|
|
||||||
Operating system:
|
|
||||||
|
|
||||||
Web server:
|
|
||||||
|
|
||||||
Database:
|
|
||||||
|
|
||||||
PHP version:
|
|
||||||
|
|
||||||
Nextcloud version:
|
Nextcloud version:
|
||||||
|
|
||||||
Storage backend (external storage):
|
Storage backend (external storage):
|
||||||
@@ -52,8 +53,6 @@ Storage backend (external storage):
|
|||||||
Please use Gist (https://gist.github.com/) or a similar code paster for longer
|
Please use Gist (https://gist.github.com/) or a similar code paster for longer
|
||||||
logs.
|
logs.
|
||||||
|
|
||||||
```Template for output < 10 lines```
|
|
||||||
|
|
||||||
1. Client logfile: Output of `nextcloud --logwindow` or `nextcloud --logfile log.txt`
|
1. Client logfile: Output of `nextcloud --logwindow` or `nextcloud --logfile log.txt`
|
||||||
(On Windows using `cmd.exe`, you might need to first `cd` into the Nextcloud directory)
|
(On Windows using `cmd.exe`, you might need to first `cd` into the Nextcloud directory)
|
||||||
(See also https://docs.nextcloud.com/desktop/2.3/troubleshooting.html#log-files)
|
(See also https://docs.nextcloud.com/desktop/2.3/troubleshooting.html#log-files)
|
||||||
|
|||||||
10
.gitignore
vendored
@@ -15,9 +15,18 @@ cscope.*
|
|||||||
tags
|
tags
|
||||||
t1.cfg
|
t1.cfg
|
||||||
|
|
||||||
|
## Ignore Visual Studio Code config & environment files
|
||||||
|
|
||||||
|
.vs/
|
||||||
|
.vscode/
|
||||||
|
|
||||||
## Ignore Visual Studio temporary files, build results, and
|
## Ignore Visual Studio temporary files, build results, and
|
||||||
## files generated by popular Visual Studio add-ons.
|
## files generated by popular Visual Studio add-ons.
|
||||||
|
|
||||||
|
# CMake integration on VS2019+
|
||||||
|
|
||||||
|
CMakeSettings.json
|
||||||
|
|
||||||
# User-specific files
|
# User-specific files
|
||||||
*.suo
|
*.suo
|
||||||
*.user
|
*.user
|
||||||
@@ -171,3 +180,4 @@ CPackConfig.cmake
|
|||||||
CPackOptions.cmake
|
CPackOptions.cmake
|
||||||
CPackSourceConfig.cmake
|
CPackSourceConfig.cmake
|
||||||
|
|
||||||
|
compile_commands.json
|
||||||
|
|||||||
3
.gitmodules
vendored
@@ -1,6 +1,3 @@
|
|||||||
[submodule "src/3rdparty/qtmacgoodies"]
|
|
||||||
path = src/3rdparty/qtmacgoodies
|
|
||||||
url = https://github.com/camilasan/qtmacgoodies.git
|
|
||||||
[submodule "binary"]
|
[submodule "binary"]
|
||||||
path = binary
|
path = binary
|
||||||
url = git://github.com/owncloud/owncloud-client-binary.git
|
url = git://github.com/owncloud/owncloud-client-binary.git
|
||||||
|
|||||||
201
.tx/nextcloud.client-desktop/ar_translation
Normal file
@@ -0,0 +1,201 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Categories=Utility;X-SuSE-SyncUtility;
|
||||||
|
Type=Application
|
||||||
|
Exec=@APPLICATION_EXECUTABLE@
|
||||||
|
Name=@APPLICATION_NAME@ desktop sync client
|
||||||
|
Comment=@APPLICATION_NAME@ desktop synchronization client
|
||||||
|
GenericName=Folder Sync
|
||||||
|
Icon=@APPLICATION_ICON_NAME@
|
||||||
|
Keywords=@APPLICATION_NAME@;syncing;file;sharing;
|
||||||
|
X-GNOME-Autostart-Delay=3
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
GenericName[ar]=مزامنة المجلد
|
||||||
204
.tx/nextcloud.client-desktop/bg_translation
Normal file
@@ -0,0 +1,204 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Categories=Utility;X-SuSE-SyncUtility;
|
||||||
|
Type=Application
|
||||||
|
Exec=@APPLICATION_EXECUTABLE@
|
||||||
|
Name=@APPLICATION_NAME@ desktop sync client
|
||||||
|
Comment=@APPLICATION_NAME@ desktop synchronization client
|
||||||
|
GenericName=Folder Sync
|
||||||
|
Icon=@APPLICATION_ICON_NAME@
|
||||||
|
Keywords=@APPLICATION_NAME@;syncing;file;sharing;
|
||||||
|
X-GNOME-Autostart-Delay=3
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
Icon[bg_BG]=@APPLICATION_ICON_NAME@
|
||||||
|
Name[bg_BG]=@APPLICATION_NAME@ клиент за синхронизиране на десктоп
|
||||||
|
Comment[bg_BG]=@APPLICATION_NAME@ клиент за синхронизиране на десктоп
|
||||||
|
GenericName[bg_BG]=Синхронизиране на папка
|
||||||
@@ -199,6 +199,6 @@ X-GNOME-Autostart-Delay=3
|
|||||||
|
|
||||||
# Translations
|
# Translations
|
||||||
Icon[ca]=@APPLICATION_ICON_NAME@
|
Icon[ca]=@APPLICATION_ICON_NAME@
|
||||||
Name[ca]=@APPLICATION_NAME@ client de sincro d'escriptori
|
Name[ca]=@APPLICATION_NAME@ client de sincronització d'escriptori
|
||||||
Comment[ca]=@APPLICATION_NAME@ client de sincronització d'escriptori
|
Comment[ca]=@APPLICATION_NAME@ client de sincronització d'escriptori
|
||||||
GenericName[ca]=Directori de sincronització
|
GenericName[ca]=Directori de sincronització
|
||||||
|
|||||||
204
.tx/nextcloud.client-desktop/cy_GB_translation
Normal file
@@ -0,0 +1,204 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Categories=Utility;X-SuSE-SyncUtility;
|
||||||
|
Type=Application
|
||||||
|
Exec=@APPLICATION_EXECUTABLE@
|
||||||
|
Name=@APPLICATION_NAME@ desktop sync client
|
||||||
|
Comment=@APPLICATION_NAME@ desktop synchronization client
|
||||||
|
GenericName=Folder Sync
|
||||||
|
Icon=@APPLICATION_ICON_NAME@
|
||||||
|
Keywords=@APPLICATION_NAME@;syncing;file;sharing;
|
||||||
|
X-GNOME-Autostart-Delay=3
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
Icon[cy_GB]=@APPLICATION_ICON_NAME@
|
||||||
|
Name[cy_GB]=@APPLICATION_NAME@ cleient cydweddu bwrdd gwaith
|
||||||
|
Comment[cy_GB]=@APPLICATION_NAME@ cleient cydweddu bwrdd gwaith
|
||||||
|
GenericName[cy_GB]=Cydweddu Ffolder
|
||||||
@@ -201,4 +201,4 @@ X-GNOME-Autostart-Delay=3
|
|||||||
Icon[da]=@APPLICATION_ICON_NAME@
|
Icon[da]=@APPLICATION_ICON_NAME@
|
||||||
Name[da]=@APPLICATION_NAME@ Arbejdsstationsssynkroniseringsklient
|
Name[da]=@APPLICATION_NAME@ Arbejdsstationsssynkroniseringsklient
|
||||||
Comment[da]=@APPLICATION_NAME@ Arbejdsstationsssynkroniseringsklient
|
Comment[da]=@APPLICATION_NAME@ Arbejdsstationsssynkroniseringsklient
|
||||||
GenericName[da]=Mappe sync
|
GenericName[da]=Mappesynkronisering
|
||||||
|
|||||||
@@ -198,7 +198,7 @@ X-GNOME-Autostart-Delay=3
|
|||||||
|
|
||||||
|
|
||||||
# Translations
|
# Translations
|
||||||
Icon[de_DE]=@APPLICATION_ICON_NAME@
|
Icon[de]=@APPLICATION_ICON_NAME@
|
||||||
Name[de_DE]=@APPLICATION_NAME@ Client zur Desktop-Synchronisation
|
Name[de]=@APPLICATION_NAME@ Client zur Desktop-Synchronisation
|
||||||
Comment[de_DE]=@APPLICATION_NAME@ Client zur Desktop-Synchronisation
|
Comment[de]=@APPLICATION_NAME@ Client zur Desktop-Synchronisation
|
||||||
GenericName[de_DE]=Synchronisationsordner
|
GenericName[de]=Synchronisationsordner
|
||||||
|
|||||||
@@ -198,4 +198,7 @@ X-GNOME-Autostart-Delay=3
|
|||||||
|
|
||||||
|
|
||||||
# Translations
|
# Translations
|
||||||
|
Icon[el]=@APPLICATION_ICON_NAME@
|
||||||
|
Name[el]=@APPLICATION_NAME@ πρόγραμμα συγχρονισμού
|
||||||
|
Comment[el]=@APPLICATION_NAME@ πρόγραμμα συγχρονισμού
|
||||||
GenericName[el]=Συγχρονισμός φακέλου
|
GenericName[el]=Συγχρονισμός φακέλου
|
||||||
|
|||||||
@@ -198,6 +198,7 @@ X-GNOME-Autostart-Delay=3
|
|||||||
|
|
||||||
|
|
||||||
# Translations
|
# Translations
|
||||||
Name[hr]=sinkronizacija računala
|
Icon[hr]=@APPLICATION_ICON_NAME@
|
||||||
Comment[hr]=klijent za sinkronizaciju računala
|
Name[hr]=@APPLICATION_NAME@ klijent za sink. računala
|
||||||
|
Comment[hr]=@APPLICATION_NAME@ klijent za sinkronizaciju računala
|
||||||
GenericName[hr]=Sinkronizacija mapa
|
GenericName[hr]=Sinkronizacija mapa
|
||||||
|
|||||||
204
.tx/nextcloud.client-desktop/mk_translation
Normal file
@@ -0,0 +1,204 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Categories=Utility;X-SuSE-SyncUtility;
|
||||||
|
Type=Application
|
||||||
|
Exec=@APPLICATION_EXECUTABLE@
|
||||||
|
Name=@APPLICATION_NAME@ desktop sync client
|
||||||
|
Comment=@APPLICATION_NAME@ desktop synchronization client
|
||||||
|
GenericName=Folder Sync
|
||||||
|
Icon=@APPLICATION_ICON_NAME@
|
||||||
|
Keywords=@APPLICATION_NAME@;syncing;file;sharing;
|
||||||
|
X-GNOME-Autostart-Delay=3
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
Icon[mk]=@APPLICATION_ICON_NAME@
|
||||||
|
Name[mk]=@APPLICATION_NAME@ клиент за синхронизација на компјутер
|
||||||
|
Comment[mk]=@APPLICATION_NAME@ клиент за синхронизација на компјутер
|
||||||
|
GenericName[mk]=Папка за синхронизација
|
||||||
@@ -201,4 +201,4 @@ X-GNOME-Autostart-Delay=3
|
|||||||
Icon[pt_BR]=@APPLICATION_ICON_NAME@
|
Icon[pt_BR]=@APPLICATION_ICON_NAME@
|
||||||
Name[pt_BR]=@APPLICATION_NAME@ cliente de sincronização desktop
|
Name[pt_BR]=@APPLICATION_NAME@ cliente de sincronização desktop
|
||||||
Comment[pt_BR]=@APPLICATION_NAME@ cliente de sincronização desktop
|
Comment[pt_BR]=@APPLICATION_NAME@ cliente de sincronização desktop
|
||||||
GenericName[pt_BR]=Sincronizar Pasta
|
GenericName[pt_BR]=Sincronizar pasta
|
||||||
|
|||||||
@@ -201,4 +201,4 @@ X-GNOME-Autostart-Delay=3
|
|||||||
Icon[ro]=@APPLICATION_ICON_NAME@
|
Icon[ro]=@APPLICATION_ICON_NAME@
|
||||||
Name[ro]=@APPLICATION_NAME@ client de sincronizare pentru desktop
|
Name[ro]=@APPLICATION_NAME@ client de sincronizare pentru desktop
|
||||||
Comment[ro]=@APPLICATION_NAME@ client de sincronizare pentru desktop
|
Comment[ro]=@APPLICATION_NAME@ client de sincronizare pentru desktop
|
||||||
GenericName[ro]=Sincronizare dosare
|
GenericName[ro]=Sincronizare director
|
||||||
|
|||||||
@@ -199,6 +199,6 @@ X-GNOME-Autostart-Delay=3
|
|||||||
|
|
||||||
# Translations
|
# Translations
|
||||||
Icon[sk_SK]=@APPLICATION_ICON_NAME@
|
Icon[sk_SK]=@APPLICATION_ICON_NAME@
|
||||||
Name[sk_SK]=@APPLICATION_NAME@ Synchronizačný klient pre PC
|
Name[sk_SK]=@APPLICATION_NAME@ synchronizačný klient pre PC
|
||||||
Comment[sk_SK]=@APPLICATION_NAME@ Synchronizačný klient pre PC
|
Comment[sk_SK]=@APPLICATION_NAME@ synchronizačný klient pre PC
|
||||||
GenericName[sk_SK]=Synchnonizácia priečinka
|
GenericName[sk_SK]=Synchronizácia priečinkov
|
||||||
|
|||||||
@@ -199,6 +199,6 @@ X-GNOME-Autostart-Delay=3
|
|||||||
|
|
||||||
# Translations
|
# Translations
|
||||||
Icon[sl]=@APPLICATION_ICON_NAME@
|
Icon[sl]=@APPLICATION_ICON_NAME@
|
||||||
Name[sl]=@APPLICATION_NAME@ odjemalec za usklajevanje
|
Name[sl]=@APPLICATION_NAME@ program za usklajevanje
|
||||||
Comment[sl]=@APPLICATION_NAME@ odjemalec za usklajevanje
|
Comment[sl]=@APPLICATION_NAME@ program za usklajevanje
|
||||||
GenericName[sl]=Usklajevanje map
|
GenericName[sl]=Usklajevanje map
|
||||||
|
|||||||
204
.tx/nextcloud.client-desktop/sw_translation
Normal file
@@ -0,0 +1,204 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Categories=Utility;X-SuSE-SyncUtility;
|
||||||
|
Type=Application
|
||||||
|
Exec=@APPLICATION_EXECUTABLE@
|
||||||
|
Name=@APPLICATION_NAME@ desktop sync client
|
||||||
|
Comment=@APPLICATION_NAME@ desktop synchronization client
|
||||||
|
GenericName=Folder Sync
|
||||||
|
Icon=@APPLICATION_ICON_NAME@
|
||||||
|
Keywords=@APPLICATION_NAME@;syncing;file;sharing;
|
||||||
|
X-GNOME-Autostart-Delay=3
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
Icon[sw]=@APPLICATION_ICON_NAME@
|
||||||
|
Name[sw]=Teja ya @APPLICATION_NAME@ ya kufanana faili kwa seva na faili ziko hapa
|
||||||
|
Comment[sw]=Teja ya @APPLICATION_NAME@ ya kufanana faili kwa seva na faili ziko hapa
|
||||||
|
GenericName[sw]=Fanana Kabrasha
|
||||||
@@ -203,8 +203,16 @@ if( WIN32 )
|
|||||||
add_definitions( -D__USE_MINGW_ANSI_STDIO=1 )
|
add_definitions( -D__USE_MINGW_ANSI_STDIO=1 )
|
||||||
add_definitions( -DNOMINMAX )
|
add_definitions( -DNOMINMAX )
|
||||||
# Get APIs from from Vista onwards.
|
# Get APIs from from Vista onwards.
|
||||||
add_definitions( -D_WIN32_WINNT=0x0600)
|
add_definitions( -D_WIN32_WINNT=0x0601 )
|
||||||
add_definitions( -DWINVER=0x0600)
|
add_definitions( -DWINVER=0x0601 )
|
||||||
|
if( MSVC )
|
||||||
|
# Use automatic overload for suitable CRT safe-functions
|
||||||
|
# See https://docs.microsoft.com/de-de/cpp/c-runtime-library/security-features-in-the-crt?view=vs-2019
|
||||||
|
add_definitions( -D_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1 )
|
||||||
|
# Also: Disable compiler warnings because we don't use Windows CRT safe-functions explicitly and don't intend to
|
||||||
|
# as this is a pure cross-platform source the only alternative would be a ton of ifdefs with calls to the _s version
|
||||||
|
add_definitions( -D_CRT_SECURE_NO_WARNINGS )
|
||||||
|
endif( MSVC )
|
||||||
endif( WIN32 )
|
endif( WIN32 )
|
||||||
|
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
|
|||||||
350
ChangeLog
@@ -1,5 +1,138 @@
|
|||||||
ChangeLog
|
2.5 Series ChangeLog
|
||||||
=========
|
====================
|
||||||
|
|
||||||
|
version 2.5.3 (release 2019-07-22)
|
||||||
|
* Fix empty file wording in error log (small)
|
||||||
|
* Add Qt-5.12 to CI
|
||||||
|
* Fix a minor typo
|
||||||
|
* Libcloudproviders: Add missing check for Qt5DBus
|
||||||
|
* Fix several memory leaks in cloudproviders and add translation support
|
||||||
|
* Share link fixing
|
||||||
|
* New drone config
|
||||||
|
* Uses configuraion to determine if it should show empty folder popup.
|
||||||
|
* Simplify cmake command to make copy-pastable
|
||||||
|
* Updated default remote poll to 5 seconds #1115
|
||||||
|
* Fix memory leak with device pointer
|
||||||
|
* Added a nice UI for the E2E-enabled account first connect
|
||||||
|
* This should fix issue #1000
|
||||||
|
* Adds parameter to retrieve shares with its reshares.
|
||||||
|
* Fixed typo
|
||||||
|
* Fixed typo in "certificate"
|
||||||
|
* WebView: Properly handle usernames with spaces and plus signs in it
|
||||||
|
* Add error category for http file lock error status 423.
|
||||||
|
* Displays the uid_owner of a shared file.
|
||||||
|
* Minor text change in the link to help in the tab 'General'.
|
||||||
|
|
||||||
|
version 2.5.2 (release 2019-04-11)
|
||||||
|
* Handle spaces in username properly in login flow
|
||||||
|
* Wizard: show an error message if there is no enough free space in the local folder
|
||||||
|
* Removed whitespace from string
|
||||||
|
* Do not add double slash to login flow url
|
||||||
|
* Fix login flow with system proxy
|
||||||
|
* Start with easier theming
|
||||||
|
* Do not display dismissed notifications
|
||||||
|
* Fixed l18n issue. Added space for separating string
|
||||||
|
* Add invalid certiticate messagebox
|
||||||
|
* Correct app passwords link
|
||||||
|
* Be less verbose with logging
|
||||||
|
* Fix typo in translation string
|
||||||
|
* Add a command line option to launch the client in the background
|
||||||
|
* Support Ubuntu Disco Dingo
|
||||||
|
* Added missing Include
|
||||||
|
* Make sure _profile and _page are deleted in the correct order
|
||||||
|
* Fix KDEInstallDirs deprecation warnings
|
||||||
|
* Removed Stylesheet
|
||||||
|
|
||||||
|
version 2.5.1 (release 2019-01-06)
|
||||||
|
* Fixup the port in server notification URLs
|
||||||
|
* GUI: let Clang-Tidy modernize nullptr & override usage
|
||||||
|
* Improve the slide show
|
||||||
|
* Libsync: let Clang-Tidy modernize nullptr & override usage
|
||||||
|
* SettingsDialog: fix a little glitch in the account tool button size
|
||||||
|
* SettingsDialog: tweak color aware icons
|
||||||
|
* More verbose error and proper app name on configuration read error
|
||||||
|
* Fix cmake build using WITH_PROVIDERS=OFF
|
||||||
|
* Debian/Ubuntu target repository update
|
||||||
|
* Change man page names and contents for nextcloud
|
||||||
|
* Share dialog alignment
|
||||||
|
* Fixed typo
|
||||||
|
* Change link to docs for NC 15
|
||||||
|
* Do not fetch activities if they are not enabled
|
||||||
|
* Do not read system exclude list if user exclude is present
|
||||||
|
* Fix the activity loop
|
||||||
|
* Write the actual folder to the log
|
||||||
|
* Fix appname for Nautilus integration script
|
||||||
|
|
||||||
|
version 2.5.0 (release 2018-11-14)
|
||||||
|
* End to end encryption
|
||||||
|
* New Web login flow
|
||||||
|
* UI improvements: Notifications
|
||||||
|
* UI improvements: refactoring of Activities
|
||||||
|
* SyncJournal: Clear etag filter before sync
|
||||||
|
* Partial local discovery: Fix scheduling logic
|
||||||
|
* Sync hidden files by default
|
||||||
|
* Larger Windows App Icon
|
||||||
|
* Show a tray message when a folder watcher becomes unreliable #6119
|
||||||
|
* Create symlinks for the small-letter application icon file names
|
||||||
|
* In setup wizard put link to nextcloud installation
|
||||||
|
* Web view scales vertically
|
||||||
|
* Add a WebFlowCredentialsAccessManager
|
||||||
|
* Mac Application Icon
|
||||||
|
* Ensure GETFileJob notices finishing #6581
|
||||||
|
* OAuth2: Try to refresh the token even if the credentials weren't ready.
|
||||||
|
* Tray workarounds #6545
|
||||||
|
* UpdateInfo: Remove unused code
|
||||||
|
* OAuth: Remove the timeout
|
||||||
|
* TestOAuth: Don't have global static QObject
|
||||||
|
* Log: Adjust update/reconcile log verbosity
|
||||||
|
* Reconcile: When detecting a local move, keep the local mtime
|
||||||
|
* Wizard enhancement
|
||||||
|
* FolderMan::checkPathValidityForNewFolder: make sure to work when fold…
|
||||||
|
* Update: Report on readdir() errors #6610
|
||||||
|
* Use encode()/decode() with Python 3 only
|
||||||
|
* Sqlite: Update bundled version to 3.24.0
|
||||||
|
* Do not require server replies to contain an mtime
|
||||||
|
* Settings: Attempt to fix rename issue on old macOS
|
||||||
|
* Support higher resolution theme icons
|
||||||
|
* OAuth: Fix infinite loop when the refresh token is expired
|
||||||
|
* Windows: Don't ignore files with FILE_ATTRIBUTE_TEMPORARY
|
||||||
|
* Data-Fingerprint: Fix backup detection when fingerprint is empty
|
||||||
|
* Nautilus: Fix GET_MENU_ITEMS with utf8 filenames #6643
|
||||||
|
* Windows: Release handle/fd when file open fails #6699
|
||||||
|
* SettingsDialog: Show the page for the newly created account
|
||||||
|
* Updates submodule qtmacgoodies.
|
||||||
|
* Fixes #665 Adds slot for confirmShare button.
|
||||||
|
* Rename INSTALL to INSTALL.md for Preview :)
|
||||||
|
* Add cmake temporary stuff
|
||||||
|
* Inform user that configuration is not writable
|
||||||
|
* Uses QByteArray to store private key.
|
||||||
|
* Fix cmake command for linux in README too
|
||||||
|
* Build fix: remove an unused QtSvg/QSvgRenderer include
|
||||||
|
* Qtkeychain: 0.8.0 -> 0.9.1
|
||||||
|
* Setup wizard: implement an animated and interactive slide show
|
||||||
|
* Theming for general settings ui
|
||||||
|
* Make the "Add Folder Sync Connection" button act like a button
|
||||||
|
* Allow to use the login flow with a self signed certificate
|
||||||
|
* Fix warning in ShareUserGroupWidget
|
||||||
|
* Copy over config file to new location on windows
|
||||||
|
* Update to translate strings
|
||||||
|
* Migrate http auth to webflow
|
||||||
|
* Margins
|
||||||
|
* Qt 5.5 compatibility patch for Xenial
|
||||||
|
* Fix cmake build of documentation
|
||||||
|
* Use Nextcloud
|
||||||
|
* Update isntaller background for OSX
|
||||||
|
* Fix ActivityWidget palette
|
||||||
|
* SettingsDialog: disable unnecessary wrapping for the about label
|
||||||
|
* Added default scheme when server returns just a host
|
||||||
|
* Removed explicit initialization; Fixed RAND_bytes not found
|
||||||
|
* Actually open the activity view on a click for more info
|
||||||
|
* Use a format that supports alpha channels for avatars
|
||||||
|
* L10n. Added space for correct grammar.
|
||||||
|
|
||||||
|
|
||||||
|
2.4 Series ChangeLog
|
||||||
|
====================
|
||||||
|
|
||||||
version 2.4.1 (2017-02-xx)
|
version 2.4.1 (2017-02-xx)
|
||||||
* Ignore files with file names that can't be encoded for the filesystem (#6287, #5676, #5719)
|
* Ignore files with file names that can't be encoded for the filesystem (#6287, #5676, #5719)
|
||||||
@@ -114,6 +247,10 @@ version 2.4.0 (2017-12-21)
|
|||||||
* Compile with stack-smashing protection
|
* Compile with stack-smashing protection
|
||||||
* Updater: Rudimentary support for beta channel (#6048)
|
* Updater: Rudimentary support for beta channel (#6048)
|
||||||
|
|
||||||
|
|
||||||
|
2.3 Series ChangeLog
|
||||||
|
====================
|
||||||
|
|
||||||
version 2.3.4 (2017-11-02)
|
version 2.3.4 (2017-11-02)
|
||||||
* Checksums: Use addData function to avoid endless loop CPU load issues with Office files
|
* Checksums: Use addData function to avoid endless loop CPU load issues with Office files
|
||||||
* Packaging: Require ZLIB
|
* Packaging: Require ZLIB
|
||||||
@@ -184,6 +321,10 @@ version 2.3.0 (2017-03-03)
|
|||||||
* Improved documentation
|
* Improved documentation
|
||||||
* Crash fixes
|
* Crash fixes
|
||||||
|
|
||||||
|
|
||||||
|
2.2 Series ChangeLog
|
||||||
|
====================
|
||||||
|
|
||||||
version 2.2.4 (release 2016-09-27)
|
version 2.2.4 (release 2016-09-27)
|
||||||
* Dolphin Plugin: Use the Application name for the socket path (#5172)
|
* Dolphin Plugin: Use the Application name for the socket path (#5172)
|
||||||
* SyncEngine: Fix renaming of folder when file are changed (#5195)
|
* SyncEngine: Fix renaming of folder when file are changed (#5195)
|
||||||
@@ -248,6 +389,10 @@ version 2.2.0 (release 2016-05-12)
|
|||||||
* Update of QtKeyChain to support Windows credential store
|
* Update of QtKeyChain to support Windows credential store
|
||||||
* Packaging of dolphin overlay icon module for bleeding edge distros
|
* Packaging of dolphin overlay icon module for bleeding edge distros
|
||||||
|
|
||||||
|
|
||||||
|
2.1 Series ChangeLog
|
||||||
|
====================
|
||||||
|
|
||||||
version 2.1.1 (release 2016-02-10)
|
version 2.1.1 (release 2016-02-10)
|
||||||
* UI improvements for HiDPI screens, error messages, RTL languages
|
* UI improvements for HiDPI screens, error messages, RTL languages
|
||||||
* Fix occurences of "Connection Closed" when a new unauthenticated TCP socket is used
|
* Fix occurences of "Connection Closed" when a new unauthenticated TCP socket is used
|
||||||
@@ -281,8 +426,8 @@ version 2.1 (release 2015-12-03)
|
|||||||
* Improved reconnecting after network change/disconnect (#4167 #3969 ...)
|
* Improved reconnecting after network change/disconnect (#4167 #3969 ...)
|
||||||
* Improved performance in Windows file system discovery
|
* Improved performance in Windows file system discovery
|
||||||
* Removed libneon-based propagator. As a consequence, The client can no
|
* Removed libneon-based propagator. As a consequence, The client can no
|
||||||
longer provide bandwith limiting on Linux-distributions where it is
|
* longer provide bandwith limiting on Linux-distributions where it is
|
||||||
using Qt < 5.4
|
* using Qt < 5.4
|
||||||
* Performance improvements in the logging functions
|
* Performance improvements in the logging functions
|
||||||
* Ensured that local disk space problems are handled gracefully (#2939)
|
* Ensured that local disk space problems are handled gracefully (#2939)
|
||||||
* Improved handling of checksums: transport validation, db (#3735)
|
* Improved handling of checksums: transport validation, db (#3735)
|
||||||
@@ -318,6 +463,10 @@ version 2.1 (release 2015-12-03)
|
|||||||
* Organized patches to our base Qt version into admin/qt/patches
|
* Organized patches to our base Qt version into admin/qt/patches
|
||||||
* Plus: A lot of unmentioned improvements and fixes
|
* Plus: A lot of unmentioned improvements and fixes
|
||||||
|
|
||||||
|
|
||||||
|
2.0 Series ChangeLog
|
||||||
|
====================
|
||||||
|
|
||||||
version 2.0.2 (release 2015-10-21)
|
version 2.0.2 (release 2015-10-21)
|
||||||
* csync_file_stat_s: Save a bit of memory
|
* csync_file_stat_s: Save a bit of memory
|
||||||
* Shibboleth: Add our base user agent to WebKit
|
* Shibboleth: Add our base user agent to WebKit
|
||||||
@@ -393,6 +542,10 @@ version 2.0.0 (release 2015-08-25)
|
|||||||
* Bandwidth Throttling: Provide automatic limit setting for downloads (#3084)
|
* Bandwidth Throttling: Provide automatic limit setting for downloads (#3084)
|
||||||
* Systray: Workaround for issue with Qt 5.5.0 #3656
|
* Systray: Workaround for issue with Qt 5.5.0 #3656
|
||||||
|
|
||||||
|
|
||||||
|
1.8 Series ChangeLog
|
||||||
|
====================
|
||||||
|
|
||||||
version 1.8.4 (release 2015-07-13)
|
version 1.8.4 (release 2015-07-13)
|
||||||
* Release to ship a security release of openSSL. No source changes of the ownCloud Client code.
|
* Release to ship a security release of openSSL. No source changes of the ownCloud Client code.
|
||||||
|
|
||||||
@@ -402,7 +555,7 @@ version 1.8.3 (release 2015-06-23)
|
|||||||
* Ignores: Force a remote discovery after ignore list change (#3172)
|
* Ignores: Force a remote discovery after ignore list change (#3172)
|
||||||
* Shibboleth: Avoid crash by letting the webview use its own QNAM (#3359)
|
* Shibboleth: Avoid crash by letting the webview use its own QNAM (#3359)
|
||||||
* System Ignores: Removed *.tmp from system ignore again. If a user
|
* System Ignores: Removed *.tmp from system ignore again. If a user
|
||||||
wants to ignore *.tmp, it needs to be added to the user ignore list.
|
* wants to ignore *.tmp, it needs to be added to the user ignore list.
|
||||||
|
|
||||||
version 1.8.2 (release 2015-06-08)
|
version 1.8.2 (release 2015-06-08)
|
||||||
* Improve reporting of server error messages (#3220)
|
* Improve reporting of server error messages (#3220)
|
||||||
@@ -415,16 +568,16 @@ version 1.8.2 (release 2015-06-08)
|
|||||||
* HTTP: Add the branding name to the UserAgent string
|
* HTTP: Add the branding name to the UserAgent string
|
||||||
* ConnectonValidator: Always run with new credentials (#3266)
|
* ConnectonValidator: Always run with new credentials (#3266)
|
||||||
* Recall Feature: Admins can trigger an upload of a file from
|
* Recall Feature: Admins can trigger an upload of a file from
|
||||||
client to server again (#3246)
|
* client to server again (#3246)
|
||||||
* Propagator: Add 'Content-Length: 0' header to MKCOL request (#3256)
|
* Propagator: Add 'Content-Length: 0' header to MKCOL request (#3256)
|
||||||
* Switch on checksum verification through branding or config
|
* Switch on checksum verification through branding or config
|
||||||
* Add ability for checksum verification of up and download
|
* Add ability for checksum verification of up and download
|
||||||
* Fix opening external links for some labels (#3135)
|
* Fix opening external links for some labels (#3135)
|
||||||
* AccountState: Run only a single validator, allow error message
|
* AccountState: Run only a single validator, allow error message
|
||||||
overriding (#3236, #3153)
|
* overriding (#3236, #3153)
|
||||||
* SyncJournalDB: Minor fixes and simplificatons
|
* SyncJournalDB: Minor fixes and simplificatons
|
||||||
* SyncEngine: Force re-read of folder Etags for upgrades from
|
* SyncEngine: Force re-read of folder Etags for upgrades from
|
||||||
1.8.0 and 1.8.1
|
* 1.8.0 and 1.8.1
|
||||||
* Propagator: Limit length of temporary file name (#2789)
|
* Propagator: Limit length of temporary file name (#2789)
|
||||||
* ShareDialog: Password ui fixes (#3189)
|
* ShareDialog: Password ui fixes (#3189)
|
||||||
* Fix startup hang by removing QSettings lock file (#3175)
|
* Fix startup hang by removing QSettings lock file (#3175)
|
||||||
@@ -445,12 +598,12 @@ version 1.8.2 (release 2015-06-08)
|
|||||||
version 1.8.1 (release 2015-05-07)
|
version 1.8.1 (release 2015-05-07)
|
||||||
* Make "operation canceled" error a soft error
|
* Make "operation canceled" error a soft error
|
||||||
* Do not throw an error for files that are scheduled to be removed,
|
* Do not throw an error for files that are scheduled to be removed,
|
||||||
but can not be found on the server. #2919
|
* but can not be found on the server. #2919
|
||||||
* Windows: Reset QNAM to proper function after hibernation. #2899 #2895 #2973
|
* Windows: Reset QNAM to proper function after hibernation. #2899 #2895 #2973
|
||||||
* Fix argument verification of --confdir #2453
|
* Fix argument verification of --confdir #2453
|
||||||
* Fix a crash when accessing a dangling UploadDevice pointer #2984
|
* Fix a crash when accessing a dangling UploadDevice pointer #2984
|
||||||
* Add-folder wizard: Make sure there is a scrollbar if folder names
|
* Add-folder wizard: Make sure there is a scrollbar if folder names
|
||||||
are too long #2962
|
* are too long #2962
|
||||||
* Add-folder Wizard: Select the newly created folder
|
* Add-folder Wizard: Select the newly created folder
|
||||||
* Activity: Correctly restore column sizes #3005
|
* Activity: Correctly restore column sizes #3005
|
||||||
* SSL Button: do not crash on empty certificate chain
|
* SSL Button: do not crash on empty certificate chain
|
||||||
@@ -458,8 +611,8 @@ version 1.8.1 (release 2015-05-07)
|
|||||||
* Lookup system proxy async to avoid hangs #2993 #2802
|
* Lookup system proxy async to avoid hangs #2993 #2802
|
||||||
* ShareDialog: Some GUI refinements
|
* ShareDialog: Some GUI refinements
|
||||||
* ShareDialog: On creation of a share always retrieve the share
|
* ShareDialog: On creation of a share always retrieve the share
|
||||||
This makes sure that if a default expiration date is set this is reflected
|
* This makes sure that if a default expiration date is set this is reflected
|
||||||
in the dialog. #2889
|
* in the dialog. #2889
|
||||||
* ShareDialog: Only show share dialog if we are connected.
|
* ShareDialog: Only show share dialog if we are connected.
|
||||||
* HttpCreds: Fill pw dialog with previous password. #2848 #2879
|
* HttpCreds: Fill pw dialog with previous password. #2848 #2879
|
||||||
* HttpCreds: Delete password from old location. #2186
|
* HttpCreds: Delete password from old location. #2186
|
||||||
@@ -468,7 +621,7 @@ version 1.8.1 (release 2015-05-07)
|
|||||||
* ProtocolWidget: Always add seconds to the DateTime locale. #2535
|
* ProtocolWidget: Always add seconds to the DateTime locale. #2535
|
||||||
* Updater: Give context as to which app is about to be updated #3040
|
* Updater: Give context as to which app is about to be updated #3040
|
||||||
* Windows: Add version information for owncloud.exe. This should help us know
|
* Windows: Add version information for owncloud.exe. This should help us know
|
||||||
what version or build number a crash report was generated with.
|
* what version or build number a crash report was generated with.
|
||||||
* Fix a crash on shutdown in ~SocketApi #3057
|
* Fix a crash on shutdown in ~SocketApi #3057
|
||||||
* SyncEngine: Show more timing measurements #3064
|
* SyncEngine: Show more timing measurements #3064
|
||||||
* Discovery: Add warning if returned etag is 0
|
* Discovery: Add warning if returned etag is 0
|
||||||
@@ -491,8 +644,8 @@ version 1.8.1 (release 2015-05-07)
|
|||||||
version 1.8.0 (release 2015-03-17)
|
version 1.8.0 (release 2015-03-17)
|
||||||
* Mac OS: HIDPI support
|
* Mac OS: HIDPI support
|
||||||
* Support Sharing from desktop: Added a share dialog that can be
|
* Support Sharing from desktop: Added a share dialog that can be
|
||||||
opened by context menu in the file managers (Win, Mac, Nautilus)
|
* opened by context menu in the file managers (Win, Mac, Nautilus)
|
||||||
Supports public links with password enforcement
|
* Supports public links with password enforcement
|
||||||
* Enhanced usage of parallel HTTP requests for ownCloud 8 servers
|
* Enhanced usage of parallel HTTP requests for ownCloud 8 servers
|
||||||
* Renamed github repository from mirall to client.
|
* Renamed github repository from mirall to client.
|
||||||
* Mac OS: Use native notification support
|
* Mac OS: Use native notification support
|
||||||
@@ -505,7 +658,7 @@ version 1.8.0 (release 2015-03-17)
|
|||||||
* Build with Qt 5.4
|
* Build with Qt 5.4
|
||||||
* Dropped libneon dependency if Qt 5.4 is available
|
* Dropped libneon dependency if Qt 5.4 is available
|
||||||
* Keep files open very short, that avoid lock problems on Windows
|
* Keep files open very short, that avoid lock problems on Windows
|
||||||
especially with office software but also others.
|
* especially with office software but also others.
|
||||||
* Merged some NetBSD patches
|
* Merged some NetBSD patches
|
||||||
* Selective sync support for owncloudcmd
|
* Selective sync support for owncloudcmd
|
||||||
* Reorganize the source repository
|
* Reorganize the source repository
|
||||||
@@ -514,13 +667,17 @@ version 1.8.0 (release 2015-03-17)
|
|||||||
* A huge amount of bug fixes in all areas of the client.
|
* A huge amount of bug fixes in all areas of the client.
|
||||||
* almost 700 commits since 1.7.1
|
* almost 700 commits since 1.7.1
|
||||||
|
|
||||||
|
|
||||||
|
1.7 Series ChangeLog
|
||||||
|
====================
|
||||||
|
|
||||||
version 1.7.1 (release 2014-12-18)
|
version 1.7.1 (release 2014-12-18)
|
||||||
* Documentation fixes and updates
|
* Documentation fixes and updates
|
||||||
* Nautilus Python plugin fixed for Python 3
|
* Nautilus Python plugin fixed for Python 3
|
||||||
* GUI wording fixes plus improved log messages
|
* GUI wording fixes plus improved log messages
|
||||||
* Fix hidning of the database files in the sync directories
|
* Fix hidning of the database files in the sync directories
|
||||||
* Compare http download size with the header value to avoid broken
|
* Compare http download size with the header value to avoid broken
|
||||||
downloads, bug #2528
|
* downloads, bug #2528
|
||||||
* Avoid initial ETag fetch job at startup, which is not needed.
|
* Avoid initial ETag fetch job at startup, which is not needed.
|
||||||
* Add chunk size http header to PUT requests
|
* Add chunk size http header to PUT requests
|
||||||
* Fixed deteteCookie method of our CookieJar, fix for Shibboleth
|
* Fixed deteteCookie method of our CookieJar, fix for Shibboleth
|
||||||
@@ -543,21 +700,20 @@ version 1.7.1 (release 2014-12-18)
|
|||||||
* Win32: Improve reliability of Installer, fix removal of Shell Extensions
|
* Win32: Improve reliability of Installer, fix removal of Shell Extensions
|
||||||
|
|
||||||
version 1.7.0 (release 2014-11-07)
|
version 1.7.0 (release 2014-11-07)
|
||||||
|
|
||||||
* oC7 Sharing: Handle new sharing options of ownCloud 7 correctly.
|
* oC7 Sharing: Handle new sharing options of ownCloud 7 correctly.
|
||||||
* Added Selective sync: Ability to unselect server folders which are
|
* Added Selective sync: Ability to unselect server folders which are
|
||||||
excluded from syncing, plus GUI and setup GUI
|
* excluded from syncing, plus GUI and setup GUI
|
||||||
* Added overlay icons for Windows Explorer, Mac OS Finder and GNOME Nautilus.
|
* Added overlay icons for Windows Explorer, Mac OS Finder and GNOME Nautilus.
|
||||||
Information is provided by the client via a local socket / named pipe API
|
* Information is provided by the client via a local socket / named pipe API
|
||||||
which provides information about the sync status of files.
|
* which provides information about the sync status of files.
|
||||||
* Improved local change detection: consider file size, detect files
|
* Improved local change detection: consider file size, detect files
|
||||||
with ongoing changes and do not upload immediately
|
* with ongoing changes and do not upload immediately
|
||||||
* Improved HTTP request timeout handler: all successful requests reset
|
* Improved HTTP request timeout handler: all successful requests reset
|
||||||
the timeout counter
|
* the timeout counter
|
||||||
* Improvements for syncing command line tool: netrc support, improved
|
* Improvements for syncing command line tool: netrc support, improved
|
||||||
SSL support, non interactive mode
|
* SSL support, non interactive mode
|
||||||
* Permission system: ownCloud 7 delivers file and folder permissions,
|
* Permission system: ownCloud 7 delivers file and folder permissions,
|
||||||
added ability to deal with it for shared folders and more.
|
* added ability to deal with it for shared folders and more.
|
||||||
* Ignore handling: Do not recurse into ignored or excluded directories
|
* Ignore handling: Do not recurse into ignored or excluded directories
|
||||||
* Major sync journal database improvements for more stability and performance
|
* Major sync journal database improvements for more stability and performance
|
||||||
* New library interface to sqlite3
|
* New library interface to sqlite3
|
||||||
@@ -566,35 +722,40 @@ version 1.7.0 (release 2014-11-07)
|
|||||||
* Improved logging: more useful meta info, removed noise
|
* Improved logging: more useful meta info, removed noise
|
||||||
* Updated to latest Qt5 versions on Windows and OS X
|
* Updated to latest Qt5 versions on Windows and OS X
|
||||||
* Fixed data loss when renaming a download temporary fails and there was
|
* Fixed data loss when renaming a download temporary fails and there was
|
||||||
a conflict at the same time.
|
* a conflict at the same time.
|
||||||
* Fixed missing warnings about reusing a sync folder when the back button
|
* Fixed missing warnings about reusing a sync folder when the back button
|
||||||
was used in the advanced folder setup wizard.
|
* was used in the advanced folder setup wizard.
|
||||||
* The 'Retry Sync' button now also restarts all downloads.
|
* The 'Retry Sync' button now also restarts all downloads.
|
||||||
* Clean up temporary downloads and some extra database files when wiping a
|
* Clean up temporary downloads and some extra database files when wiping a
|
||||||
folder.
|
* folder.
|
||||||
* OS X: Sparkle update to provide pkg format properly
|
* OS X: Sparkle update to provide pkg format properly
|
||||||
* OS X: Change distribution format from dmg to pkg with new installer.
|
* OS X: Change distribution format from dmg to pkg with new installer.
|
||||||
* Windows: Fix handling of filenames with trailing dot or space
|
* Windows: Fix handling of filenames with trailing dot or space
|
||||||
* Windows: Don't use the wrong way to get file mtimes in the legacy propagator.
|
* Windows: Don't use the wrong way to get file mtimes in the legacy propagator.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
1.6 Series ChangeLog
|
||||||
|
====================
|
||||||
|
|
||||||
version 1.6.4 (release 2014-10-22)
|
version 1.6.4 (release 2014-10-22)
|
||||||
* Fix startup logic, fixes bug #1989
|
* Fix startup logic, fixes bug #1989
|
||||||
* Fix raise dialog on X11
|
* Fix raise dialog on X11
|
||||||
* Win32: fix overflow when computing the size of file > 4GiB
|
* Win32: fix overflow when computing the size of file > 4GiB
|
||||||
* Use a fixed function to get files modification time, the
|
* Use a fixed function to get files modification time, the
|
||||||
original one was broken for certain timezone issues, see
|
* original one was broken for certain timezone issues, see
|
||||||
core bug #9781 for details
|
* core bug #9781 for details
|
||||||
* Added some missing copyright headers
|
* Added some missing copyright headers
|
||||||
* Avoid data corruption due to wrong error handling, bug #2280
|
* Avoid data corruption due to wrong error handling, bug #2280
|
||||||
* Do improved request timeout handling to reduce the number of
|
* Do improved request timeout handling to reduce the number of
|
||||||
timed out jobs, bug #2155
|
* timed out jobs, bug #2155
|
||||||
version 1.6.3 (release 2014-09-03)
|
* version 1.6.3 (release 2014-09-03)
|
||||||
* Fixed updater on OS X
|
* Fixed updater on OS X
|
||||||
* Fixed memory leak in SSL button that could lead to quick memory draining
|
* Fixed memory leak in SSL button that could lead to quick memory draining
|
||||||
* Fixed upload problem with files >4 GB
|
* Fixed upload problem with files >4 GB
|
||||||
* MacOSX, Linux: Bring Settings window to front properly
|
* MacOSX, Linux: Bring Settings window to front properly
|
||||||
* Branded clients: If no configuration is detected, try to import the data
|
* Branded clients: If no configuration is detected, try to import the data
|
||||||
from a previously configured community edition.
|
* from a previously configured community edition.
|
||||||
|
|
||||||
version 1.6.2 (release 2014-07-28 )
|
version 1.6.2 (release 2014-07-28 )
|
||||||
* Limit the HTTP buffer size when downloading to limit memory consumption.
|
* Limit the HTTP buffer size when downloading to limit memory consumption.
|
||||||
@@ -602,7 +763,7 @@ version 1.6.2 (release 2014-07-28 )
|
|||||||
* Fix local file name clash detection for MacOSX.
|
* Fix local file name clash detection for MacOSX.
|
||||||
* Limit maximum wait time to ten seconds in network limiting.
|
* Limit maximum wait time to ten seconds in network limiting.
|
||||||
* Fix data corruption while trying to resume and the server does
|
* Fix data corruption while trying to resume and the server does
|
||||||
not support it.
|
* not support it.
|
||||||
* HTTP Credentials: Read password from legacy place if not found.
|
* HTTP Credentials: Read password from legacy place if not found.
|
||||||
* Shibboleth: Fix the waiting curser that would not disapear (#1915)
|
* Shibboleth: Fix the waiting curser that would not disapear (#1915)
|
||||||
* Limit memory usage to avoid mem wasting and crashes
|
* Limit memory usage to avoid mem wasting and crashes
|
||||||
@@ -616,18 +777,18 @@ version 1.6.1 (release 2014-06-26 )
|
|||||||
* Fix openSSL problems for windows deployment
|
* Fix openSSL problems for windows deployment
|
||||||
* Fix syncing a folder with '#' in the name
|
* Fix syncing a folder with '#' in the name
|
||||||
* Fix #1845: do not update parent directory etag before sub
|
* Fix #1845: do not update parent directory etag before sub
|
||||||
directories are removed
|
* directories are removed
|
||||||
* Fix reappearing directories if dirs are removed during its
|
* Fix reappearing directories if dirs are removed during its
|
||||||
upload
|
* upload
|
||||||
* Fix app version in settings dialog, General tab
|
* Fix app version in settings dialog, General tab
|
||||||
* Fix crash in FolderWizard when going offline
|
* Fix crash in FolderWizard when going offline
|
||||||
* Shibboleth fixes
|
* Shibboleth fixes
|
||||||
* More specific error messages (file remove during upload, open
|
* More specific error messages (file remove during upload, open
|
||||||
local sync file)
|
* local sync file)
|
||||||
* Use QSet rather than QHash in SyncEngine (save memory)
|
* Use QSet rather than QHash in SyncEngine (save memory)
|
||||||
* Fix some memory leaks
|
* Fix some memory leaks
|
||||||
* Fix some thread race problems, ie. wait for neon thread to finish
|
* Fix some thread race problems, ie. wait for neon thread to finish
|
||||||
before the propagator is shut down
|
* before the propagator is shut down
|
||||||
* Fix a lot of issues and warnings found by Coverity
|
* Fix a lot of issues and warnings found by Coverity
|
||||||
* Fix Mac some settings dialog problems
|
* Fix Mac some settings dialog problems
|
||||||
|
|
||||||
@@ -650,16 +811,16 @@ version 1.6.0 (release 2014-05-30 )
|
|||||||
* Introduce a general timeout of 300s for network operations
|
* Introduce a general timeout of 300s for network operations
|
||||||
* Improve error handling, blacklisting
|
* Improve error handling, blacklisting
|
||||||
* Job-based change propagation, enables faster parallel up/downloads
|
* Job-based change propagation, enables faster parallel up/downloads
|
||||||
(right now only if no bandwidth limit is set and no proxy is used)
|
* (right now only if no bandwidth limit is set and no proxy is used)
|
||||||
* Significantly reduced CPU load when checking for local and remote changes
|
* Significantly reduced CPU load when checking for local and remote changes
|
||||||
* Speed up file stat code on Windows
|
* Speed up file stat code on Windows
|
||||||
* Enforce Qt5 for Windows and Mac OS X builds
|
* Enforce Qt5 for Windows and Mac OS X builds
|
||||||
* Improved owncloudcmd: SSL support, documentation
|
* Improved owncloudcmd: SSL support, documentation
|
||||||
* Added advanced logging of operations (file .???.log in sync
|
* Added advanced logging of operations (file .???.log in sync
|
||||||
directory)
|
* directory)
|
||||||
* Avoid creating a temporary copy of the sync database (.ctmp)
|
* Avoid creating a temporary copy of the sync database (.ctmp)
|
||||||
* Enable support for TLS 1.2 negotiation on platforms that use
|
* Enable support for TLS 1.2 negotiation on platforms that use
|
||||||
Qt 5.2 or later
|
* Qt 5.2 or later
|
||||||
* Forward server exception messages to client error messages
|
* Forward server exception messages to client error messages
|
||||||
* Mac OS X: Support Notification Center in OS X 10.8+
|
* Mac OS X: Support Notification Center in OS X 10.8+
|
||||||
* Mac OS X: Use native settings dialog
|
* Mac OS X: Use native settings dialog
|
||||||
@@ -668,11 +829,15 @@ version 1.6.0 (release 2014-05-30 )
|
|||||||
* Remove vio abstraction in csync
|
* Remove vio abstraction in csync
|
||||||
* Avoid data loss when a client file system is not case sensitive
|
* Avoid data loss when a client file system is not case sensitive
|
||||||
|
|
||||||
|
|
||||||
|
1.5 Series ChangeLog
|
||||||
|
====================
|
||||||
|
|
||||||
version 1.5.3 (release 2014-03-10 )
|
version 1.5.3 (release 2014-03-10 )
|
||||||
* Fix usage of proxies after first sync run (#1502, #1524, #1459, #1521)
|
* Fix usage of proxies after first sync run (#1502, #1524, #1459, #1521)
|
||||||
* Do not wipe the credentials from config for reconnect (#1499, #1503)
|
* Do not wipe the credentials from config for reconnect (#1499, #1503)
|
||||||
* Do not erase the full account config if an old version of the client stored
|
* Do not erase the full account config if an old version of the client stored
|
||||||
the password (related to above)
|
* the password (related to above)
|
||||||
* Fix layout of the network tab (fixes #1491)
|
* Fix layout of the network tab (fixes #1491)
|
||||||
* Handle authentication requests by a Shibboleth IdP
|
* Handle authentication requests by a Shibboleth IdP
|
||||||
* Shibboleth: If no connection is available, don't open the login window
|
* Shibboleth: If no connection is available, don't open the login window
|
||||||
@@ -701,34 +866,34 @@ version 1.5.2 (release 2014-02-26 )
|
|||||||
|
|
||||||
version 1.5.1 (release 2014-02-13 )
|
version 1.5.1 (release 2014-02-13 )
|
||||||
* Added an auto updater that updates the client if a
|
* Added an auto updater that updates the client if a
|
||||||
more recent version was found automatically (Windows, Mac OS X)
|
* more recent version was found automatically (Windows, Mac OS X)
|
||||||
* Added a button to the account dialog that gives information
|
* Added a button to the account dialog that gives information
|
||||||
about the encryption layer used for communication, plus a
|
* about the encryption layer used for communication, plus a
|
||||||
certificate information widget
|
* certificate information widget
|
||||||
* Preserve the permission settings of local files rather than
|
* Preserve the permission settings of local files rather than
|
||||||
setting them to a default (Bug #820)
|
* setting them to a default (Bug #820)
|
||||||
* Handle windows lnk files correctly (Bug #1307)
|
* Handle windows lnk files correctly (Bug #1307)
|
||||||
* Detect removes and renames in read only shares and
|
* Detect removes and renames in read only shares and
|
||||||
restore the gone away files. (Bug #1386)
|
* restore the gone away files. (Bug #1386)
|
||||||
* Fixes sign in/sign out and password dialog. (Bug #1353)
|
* Fixes sign in/sign out and password dialog. (Bug #1353)
|
||||||
* Fixed error messages (Bug #1394)
|
* Fixed error messages (Bug #1394)
|
||||||
* Lots of fixes for building with Qt5
|
* Lots of fixes for building with Qt5
|
||||||
* Changes to network limits are now also applied during a
|
* Changes to network limits are now also applied during a
|
||||||
sync run
|
* sync run
|
||||||
* Fixed mem leak after via valgrind on Mac
|
* Fixed mem leak after via valgrind on Mac
|
||||||
* Imported the ocsync library into miralls repository.
|
* Imported the ocsync library into miralls repository.
|
||||||
Adopted all build systems and packaging to that.
|
* Adopted all build systems and packaging to that.
|
||||||
* Introduce a new linux packaging scheme following the
|
* Introduce a new linux packaging scheme following the
|
||||||
debian upstream scheme
|
* debian upstream scheme
|
||||||
* Use a refactored Linux file system watcher based on
|
* Use a refactored Linux file system watcher based on
|
||||||
inotify, incl. unit tests
|
* inotify, incl. unit tests
|
||||||
* Wizard: Gracefully fall back to HTTP if HTTPS connection
|
* Wizard: Gracefully fall back to HTTP if HTTPS connection
|
||||||
fails, issuing a warning
|
* fails, issuing a warning
|
||||||
* Fixed translation misses in the propagator
|
* Fixed translation misses in the propagator
|
||||||
* Fixes in proxy configuration
|
* Fixes in proxy configuration
|
||||||
* Fixes in sync journal handling
|
* Fixes in sync journal handling
|
||||||
* Fix the upload progress if the local source is still
|
* Fix the upload progress if the local source is still
|
||||||
changing when the upload begins.
|
* changing when the upload begins.
|
||||||
* Add proxy support to owncloud commandline client
|
* Add proxy support to owncloud commandline client
|
||||||
* NSIS fixes
|
* NSIS fixes
|
||||||
* A lot of other fixes and minor improvements
|
* A lot of other fixes and minor improvements
|
||||||
@@ -765,6 +930,10 @@ version 1.5.0 (release 2013-12-12 ), csync 0.91.4 required
|
|||||||
* Windows: Fix rename of temporary files
|
* Windows: Fix rename of temporary files
|
||||||
* Windows: Fix move file operation
|
* Windows: Fix move file operation
|
||||||
|
|
||||||
|
|
||||||
|
1.4 Series ChangeLog
|
||||||
|
====================
|
||||||
|
|
||||||
version 1.4.2 (release 2013-10-18 ), csync 0.90.4 required
|
version 1.4.2 (release 2013-10-18 ), csync 0.90.4 required
|
||||||
* Do not show the warning icon in the tray (#944)
|
* Do not show the warning icon in the tray (#944)
|
||||||
* Fix manual proxy support when switching (#1016)
|
* Fix manual proxy support when switching (#1016)
|
||||||
@@ -780,12 +949,11 @@ version 1.4.2 (release 2013-10-18 ), csync 0.90.4 required
|
|||||||
* Progress: Show number of deletes.
|
* Progress: Show number of deletes.
|
||||||
|
|
||||||
version 1.4.1 (release 2013-09-24 ), csync 0.90.1 required
|
version 1.4.1 (release 2013-09-24 ), csync 0.90.1 required
|
||||||
|
|
||||||
* Translation and documentation fixes.
|
* Translation and documentation fixes.
|
||||||
* Fixed error display in settings/status dialog, displays multi
|
* Fixed error display in settings/status dialog, displays multi
|
||||||
line error messages now correctly.
|
* line error messages now correctly.
|
||||||
* Wait up to 30 secs before complaining about missing systray
|
* Wait up to 30 secs before complaining about missing systray
|
||||||
Fixes bug #949
|
* Fixes bug #949
|
||||||
* Fixed utf8 issues with basic auth authentication, fixes bug #941
|
* Fixed utf8 issues with basic auth authentication, fixes bug #941
|
||||||
* Fixed remote folder selector, avoid recursive syncing, fixes bug #962
|
* Fixed remote folder selector, avoid recursive syncing, fixes bug #962
|
||||||
* Handle and display network problems at startup correctly.
|
* Handle and display network problems at startup correctly.
|
||||||
@@ -802,7 +970,6 @@ version 1.4.1 (release 2013-09-24 ), csync 0.90.1 required
|
|||||||
* Various minor code fixes
|
* Various minor code fixes
|
||||||
|
|
||||||
version 1.4.0 (release 2013-09-04 ), csync 0.90.0 required
|
version 1.4.0 (release 2013-09-04 ), csync 0.90.0 required
|
||||||
|
|
||||||
* New Scheduler: Only sync when there are actual changes in the server
|
* New Scheduler: Only sync when there are actual changes in the server
|
||||||
* Add a Settings Dialog, move Proxy Settings there
|
* Add a Settings Dialog, move Proxy Settings there
|
||||||
* Transform folder Status Dialog into Account Settings, provide feedback via context menu
|
* Transform folder Status Dialog into Account Settings, provide feedback via context menu
|
||||||
@@ -813,7 +980,7 @@ version 1.4.0 (release 2013-09-04 ), csync 0.90.0 required
|
|||||||
* Move ability to switch to mono icons from a switch to a Settings option
|
* Move ability to switch to mono icons from a switch to a Settings option
|
||||||
* Add "Launch on System Startup" GUI option
|
* Add "Launch on System Startup" GUI option
|
||||||
* Add "Show Desktop Nofications"GUI option (enabled by default)
|
* Add "Show Desktop Nofications"GUI option (enabled by default)
|
||||||
top optionally disable sync notifications
|
* top optionally disable sync notifications
|
||||||
* Add Help item, pointing to online reference
|
* Add Help item, pointing to online reference
|
||||||
* Implement graphical selection of remote folders in FolderWizard
|
* Implement graphical selection of remote folders in FolderWizard
|
||||||
* Allow custom ignore patterns
|
* Allow custom ignore patterns
|
||||||
@@ -832,11 +999,14 @@ version 1.4.0 (release 2013-09-04 ), csync 0.90.0 required
|
|||||||
* Require Qt 4.7
|
* Require Qt 4.7
|
||||||
* Known issue: Under certain conditions, a file will only get uploaded after up to five minutes
|
* Known issue: Under certain conditions, a file will only get uploaded after up to five minutes
|
||||||
|
|
||||||
version 1.3.0 (release 2013-06-25 ), csync 0.80.0 required
|
|
||||||
|
|
||||||
|
1.3 Series ChangeLog
|
||||||
|
====================
|
||||||
|
|
||||||
|
version 1.3.0 (release 2013-06-25 ), csync 0.80.0 required
|
||||||
* Default proxy port to 8080
|
* Default proxy port to 8080
|
||||||
* Don't lose proxy settings when changing passwords
|
* Don't lose proxy settings when changing passwords
|
||||||
* Support SOCKS5 proxy (useful in combination with ssh *D)
|
* Support SOCKS5 proxy (useful in combination with ssh* *D)
|
||||||
* Propagate proxy changes to csync at runtime
|
* Propagate proxy changes to csync at runtime
|
||||||
* Improve proxy wizard
|
* Improve proxy wizard
|
||||||
* Display proxy errors
|
* Display proxy errors
|
||||||
@@ -852,7 +1022,7 @@ version 1.3.0 (release 2013-06-25 ), csync 0.80.0 required
|
|||||||
* Remove journal when reusing a directory that used to have a journal before
|
* Remove journal when reusing a directory that used to have a journal before
|
||||||
* Visual clean up of status dialog items
|
* Visual clean up of status dialog items
|
||||||
* Wizard: When changing the URL or user name, allow the user to push his data
|
* Wizard: When changing the URL or user name, allow the user to push his data
|
||||||
to the new location or wipe the folder and start from scratch
|
* to the new location or wipe the folder and start from scratch
|
||||||
* Wizard: Make setting a custom folder as a sync target work again
|
* Wizard: Make setting a custom folder as a sync target work again
|
||||||
* Fix application icon
|
* Fix application icon
|
||||||
* User-Agent now contains "Mozilla/5.0" and the Platform name (for firewall/proxy compat)
|
* User-Agent now contains "Mozilla/5.0" and the Platform name (for firewall/proxy compat)
|
||||||
@@ -860,6 +1030,10 @@ version 1.3.0 (release 2013-06-25 ), csync 0.80.0 required
|
|||||||
* New setup wizard, defaulting to root syncing (only for new setups)
|
* New setup wizard, defaulting to root syncing (only for new setups)
|
||||||
* Improved thread stop/termination
|
* Improved thread stop/termination
|
||||||
|
|
||||||
|
|
||||||
|
1.2 Series ChangeLog
|
||||||
|
====================
|
||||||
|
|
||||||
version 1.2.5 (release 2013-04-23 ), csync 0.70.7 required
|
version 1.2.5 (release 2013-04-23 ), csync 0.70.7 required
|
||||||
* [Fixes] NSIS installer fixes
|
* [Fixes] NSIS installer fixes
|
||||||
* [Fixes] Fix crash race by making certificateChain() thread safe
|
* [Fixes] Fix crash race by making certificateChain() thread safe
|
||||||
@@ -925,6 +1099,10 @@ version 1.2.0 (release 2013-01-24 ), csync 0.70.2 required
|
|||||||
* [Platform] cmake fixes.
|
* [Platform] cmake fixes.
|
||||||
* [Platform] Improved, more detailed error reporting.
|
* [Platform] Improved, more detailed error reporting.
|
||||||
|
|
||||||
|
|
||||||
|
1.1 Series ChangeLog
|
||||||
|
====================
|
||||||
|
|
||||||
version 1.1.4 (release 2012-12-19 ), csync 0.60.4 required
|
version 1.1.4 (release 2012-12-19 ), csync 0.60.4 required
|
||||||
* No changes to mirall, only csync fixes.
|
* No changes to mirall, only csync fixes.
|
||||||
|
|
||||||
@@ -934,7 +1112,7 @@ version 1.1.3 (release 2012-11-30 ), csync 0.60.3 required
|
|||||||
version 1.1.2 (release 2012-11-26 ), csync 0.60.2 required
|
version 1.1.2 (release 2012-11-26 ), csync 0.60.2 required
|
||||||
* [Fixes] Allow to properly cancel the password dialog.
|
* [Fixes] Allow to properly cancel the password dialog.
|
||||||
* [Fixes] Share folder name correctly percent encoded with old Qt
|
* [Fixes] Share folder name correctly percent encoded with old Qt
|
||||||
4.6 builds ie. Debian.
|
* * * * 4.6 builds ie. Debian.
|
||||||
* [Fixes] If local sync dir is not existing, create it.
|
* [Fixes] If local sync dir is not existing, create it.
|
||||||
* [Fixes] lots of other minor fixes.
|
* [Fixes] lots of other minor fixes.
|
||||||
* [GUI] Display error messages in status dialog.
|
* [GUI] Display error messages in status dialog.
|
||||||
@@ -942,30 +1120,30 @@ version 1.1.2 (release 2012-11-26 ), csync 0.60.2 required
|
|||||||
* [GUI] Show username for connection in statusdialog.
|
* [GUI] Show username for connection in statusdialog.
|
||||||
* [GUI] Show intro wizard on new connection setup.
|
* [GUI] Show intro wizard on new connection setup.
|
||||||
* [APP] Use CredentialStore to better support various credential
|
* [APP] Use CredentialStore to better support various credential
|
||||||
backends.
|
* * * backends.
|
||||||
* [APP] Handle missing local folder more robust: Create it if
|
* [APP] Handle missing local folder more robust: Create it if
|
||||||
missing instead of ignoring.
|
* * * missing instead of ignoring.
|
||||||
* [APP] Simplify treewalk code.
|
* [APP] Simplify treewalk code.
|
||||||
* [Platform] Fix Mac building
|
* [Platform] Fix Mac building
|
||||||
|
|
||||||
version 1.1.1 (release 2012-10-18), csync 0.60.1 required
|
version 1.1.1 (release 2012-10-18), csync 0.60.1 required
|
||||||
* [GUI] Allow changing folder name in single folder mode
|
* [GUI]* Allow changing folder name in single folder mode
|
||||||
* [GUI] Windows: Add license to installer
|
* [GUI]* Windows: Add license to installer
|
||||||
* [GUI] owncloud --logwindow will bring up the log window
|
* [GUI]* owncloud --logwindow will bring up the log window
|
||||||
in an already running instance
|
* * * * in an already running instance
|
||||||
* [Fixes] Make sure SSL errors are always handled
|
* [Fixes] Make sure SSL errors are always handled
|
||||||
* [Fixes] Allow special characters in folder alias
|
* [Fixes] Allow special characters in folder alias
|
||||||
* [Fixes] Proper workaround for Menu bug in Ubuntu
|
* [Fixes] Proper workaround for Menu bug in Ubuntu
|
||||||
* [Fixes] csync: Fix improper memory cleanup which could
|
* [Fixes] csync: Fix improper memory cleanup which could
|
||||||
cause memory leaks and crashes
|
* * * * cause memory leaks and crashes
|
||||||
* [Fixes] csync: Fix memory leak
|
* [Fixes] csync: Fix memory leak
|
||||||
* [Fixes] csync: Allow single quote (') in file names
|
* [Fixes] csync: Allow single quote (') in file names
|
||||||
* [Fixes] csync: Remove stray temporary files
|
* [Fixes] csync: Remove stray temporary files
|
||||||
|
|
||||||
* [GUI] Reworked tray context menu.
|
* [GUI]* Reworked tray context menu.
|
||||||
* [GUI] Users can now sync the server root folder.
|
* [GUI]* Users can now sync the server root folder.
|
||||||
* [Fixes] Proxy support: now supports Proxy Auto-Configuration (PAC)
|
* [Fixes] Proxy support: now supports Proxy Auto-Configuration (PAC)
|
||||||
on Windows, reliability fixes across all OSes.
|
* * * * on Windows, reliability fixes across all OSes.
|
||||||
* [Fixes] Url entry field in setup assistant handles http/https correctly.
|
* [Fixes] Url entry field in setup assistant handles http/https correctly.
|
||||||
* [Fixes] Button enable state in status dialog.
|
* [Fixes] Button enable state in status dialog.
|
||||||
* [Fixes] Crash fixed on ending the client, tray icon related.
|
* [Fixes] Crash fixed on ending the client, tray icon related.
|
||||||
@@ -978,11 +1156,15 @@ version 1.1.1 (release 2012-10-18), csync 0.60.1 required
|
|||||||
* [Platform] Windows: ownCloud gets added to autorun by default.
|
* [Platform] Windows: ownCloud gets added to autorun by default.
|
||||||
* [Platform] insert correct version info from cmake.
|
* [Platform] insert correct version info from cmake.
|
||||||
* [Platform] csync conf file and database were moved to the users app data
|
* [Platform] csync conf file and database were moved to the users app data
|
||||||
directory, away from the .csync dir.
|
* * * * * directory, away from the .csync dir.
|
||||||
* Renamed exclude.lst to sync-exclude.lst and moved it to
|
** * * Renamed exclude.lst to sync-exclude.lst and moved it to
|
||||||
/etc/appName()/ for more clean packaging. From the user path,
|
* * * * /etc/appName()/ for more clean packaging. From the user path,
|
||||||
still exclude.lst is read if sync-exclude.lst is not existing.
|
* * * * still exclude.lst is read if sync-exclude.lst is not existing.
|
||||||
* Placed custom.ini with customization options to /etc/appName()
|
** * * Placed custom.ini with customization options to /etc/appName()
|
||||||
|
|
||||||
|
|
||||||
|
1.0 Series ChangeLog
|
||||||
|
====================
|
||||||
|
|
||||||
version 1.0.5 (release 2012-08-14), csync 0.50.8 required
|
version 1.0.5 (release 2012-08-14), csync 0.50.8 required
|
||||||
* [Fixes] Fixed setup dialog: Really use https if checkbox is activated.
|
* [Fixes] Fixed setup dialog: Really use https if checkbox is activated.
|
||||||
@@ -1000,23 +1182,23 @@ version 1.0.4 (release 2012-08-10), csync 0.50.8 required
|
|||||||
* [GUI] Removed Log Window Button, log available through command line.
|
* [GUI] Removed Log Window Button, log available through command line.
|
||||||
* [GUI] Proxy configuration dialog added.
|
* [GUI] Proxy configuration dialog added.
|
||||||
* [GUI] Added Translations to languages Slovenian, Polish, Catalan,
|
* [GUI] Added Translations to languages Slovenian, Polish, Catalan,
|
||||||
Portuguese (Brazil), German, Greek, Spanish, Czech, Italian, Slovak,
|
* * * Portuguese (Brazil), German, Greek, Spanish, Czech, Italian, Slovak,
|
||||||
French, Russian, Japanese, Swedish, Portuguese (Portugal)
|
* * * French, Russian, Japanese, Swedish, Portuguese (Portugal)
|
||||||
all with translation rate >90%.
|
* * * all with translation rate >90%.
|
||||||
* [Fixes] Loading of self signed certs into Networkmanager (#oc-843)
|
* [Fixes] Loading of self signed certs into Networkmanager (#oc-843)
|
||||||
* [Fixes] Win32: Handle SSL dll loading correctly.
|
* [Fixes] Win32: Handle SSL dll loading correctly.
|
||||||
* [Fixes] Many other small fixes and improvements.
|
* [Fixes] Many other small fixes and improvements.
|
||||||
|
|
||||||
version 1.0.3 (release 2012-06-19), csync 0.50.7 required
|
version 1.0.3 (release 2012-06-19), csync 0.50.7 required
|
||||||
* [GUI] Added a log window which catches the logging if required and
|
* [GUI] Added a log window which catches the logging if required and
|
||||||
allows to save for information.
|
* * * allows to save for information.
|
||||||
* [CMI] Added options --help, --logfile and --logflush
|
* [CMI] Added options --help, --logfile and --logflush
|
||||||
* [APP] Allow to specify sync frequency in the config file.
|
* [APP] Allow to specify sync frequency in the config file.
|
||||||
* [Fixes] Do not use csync database files from a sync before.
|
* [Fixes] Do not use csync database files from a sync before.
|
||||||
* [Fixes] In Connection wizard, write the final config onyl if
|
* [Fixes] In Connection wizard, write the final config onyl if
|
||||||
the user really accepted. Also remove the former database.
|
* * * * the user really accepted. Also remove the former database.
|
||||||
* [Fixes] More user expected behaviour deletion of sync folder local
|
* [Fixes] More user expected behaviour deletion of sync folder local
|
||||||
and remote.
|
* * * * and remote.
|
||||||
* [Fixes] Allow special characters in the sync directory names
|
* [Fixes] Allow special characters in the sync directory names
|
||||||
* [Fixes] Win32: Fixed directory removal with special character dirs.
|
* [Fixes] Win32: Fixed directory removal with special character dirs.
|
||||||
* [Fixes] MacOS: Do not flood the system log any more
|
* [Fixes] MacOS: Do not flood the system log any more
|
||||||
@@ -1035,7 +1217,7 @@ version 1.0.2 (release 2012-05-18), csync 0.50.6 required
|
|||||||
* [Fixes] Dialogs comes to front on click
|
* [Fixes] Dialogs comes to front on click
|
||||||
* [Fixes] Open local sync folder from tray and status for win32
|
* [Fixes] Open local sync folder from tray and status for win32
|
||||||
* [Fixes] Load exclude.lst correctly on MacOSX
|
* [Fixes] Load exclude.lst correctly on MacOSX
|
||||||
+ csync fixes.
|
* + csync fixes.
|
||||||
|
|
||||||
version 1.0.1 (release 2012-04-18), csync 0.50.5 required
|
version 1.0.1 (release 2012-04-18), csync 0.50.5 required
|
||||||
* [Security] Support SSL Connections
|
* [Security] Support SSL Connections
|
||||||
|
|||||||
@@ -3,10 +3,10 @@ set( APPLICATION_SHORTNAME "Nextcloud" )
|
|||||||
set( APPLICATION_EXECUTABLE "nextcloud" )
|
set( APPLICATION_EXECUTABLE "nextcloud" )
|
||||||
set( APPLICATION_DOMAIN "nextcloud.com" )
|
set( APPLICATION_DOMAIN "nextcloud.com" )
|
||||||
set( APPLICATION_VENDOR "Nextcloud GmbH" )
|
set( APPLICATION_VENDOR "Nextcloud GmbH" )
|
||||||
set( APPLICATION_UPDATE_URL "https://updates.nextcloud.org/client/" CACHE string "URL for updater" )
|
set( APPLICATION_UPDATE_URL "https://updates.nextcloud.org/client/" CACHE STRING "URL for updater" )
|
||||||
set( APPLICATION_HELP_URL "" CACHE string "URL for the help menu" )
|
set( APPLICATION_HELP_URL "" CACHE STRING "URL for the help menu" )
|
||||||
set( APPLICATION_ICON_NAME "Nextcloud" )
|
set( APPLICATION_ICON_NAME "Nextcloud" )
|
||||||
set( APPLICATION_SERVER_URL "" CACHE string "URL for the server to use. If entered the server can only connect to this instance" )
|
set( APPLICATION_SERVER_URL "" CACHE STRING "URL for the server to use. If entered the server can only connect to this instance" )
|
||||||
|
|
||||||
set( LINUX_PACKAGE_SHORTNAME "nextcloud" )
|
set( LINUX_PACKAGE_SHORTNAME "nextcloud" )
|
||||||
|
|
||||||
@@ -20,14 +20,14 @@ set( MAC_INSTALLER_BACKGROUND_FILE "${CMAKE_SOURCE_DIR}/admin/osx/installer-back
|
|||||||
# set( APPLICATION_LICENSE "${OEM_THEME_DIR}/license.txt )
|
# set( APPLICATION_LICENSE "${OEM_THEME_DIR}/license.txt )
|
||||||
|
|
||||||
option( WITH_CRASHREPORTER "Build crashreporter" OFF )
|
option( WITH_CRASHREPORTER "Build crashreporter" OFF )
|
||||||
#set( CRASHREPORTER_SUBMIT_URL "https://crash-reports.owncloud.com/submit" CACHE string "URL for crash reporter" )
|
#set( CRASHREPORTER_SUBMIT_URL "https://crash-reports.owncloud.com/submit" CACHE STRING "URL for crash reporter" )
|
||||||
#set( CRASHREPORTER_ICON ":/owncloud-icon.png" )
|
#set( CRASHREPORTER_ICON ":/owncloud-icon.png" )
|
||||||
|
|
||||||
option( WITH_PROVIDERS "Build with providers list" ON )
|
option( WITH_PROVIDERS "Build with providers list" ON )
|
||||||
|
|
||||||
|
|
||||||
## Theming options
|
## Theming options
|
||||||
set( APPLICATION_WIZARD_HEADER_BACKGROUND_COLOR "#0082c9" CACHE string "Hex color of the wizard header background")
|
set( APPLICATION_WIZARD_HEADER_BACKGROUND_COLOR "#0082c9" CACHE STRING "Hex color of the wizard header background")
|
||||||
set( APPLICATION_WIZARD_HEADER_TITLE_COLOR "#ffffff" CACHE string "Hex color of the text in the wizard header")
|
set( APPLICATION_WIZARD_HEADER_TITLE_COLOR "#ffffff" CACHE STRING "Hex color of the text in the wizard header")
|
||||||
option( APPLICATION_WIZARD_USE_CUSTOM_LOGO "Use the logo from ':/client/theme/colored/wizard_logo.png' else the default application icon is used" ON )
|
option( APPLICATION_WIZARD_USE_CUSTOM_LOGO "Use the logo from ':/client/theme/colored/wizard_logo.png' else the default application icon is used" ON )
|
||||||
|
|
||||||
|
|||||||
24
README.md
@@ -24,33 +24,27 @@ $ cd build
|
|||||||
```
|
```
|
||||||
##### Compile and install
|
##### Compile and install
|
||||||
|
|
||||||
For development reasons it is better to install the client on user space
|
:warning: For development reasons it is better to **install the client on user space** instead on the global system. Mixing up libs/dll's of different version can lead to undefined behavior and crashes:
|
||||||
instead on the global system. For example you could use in the next
|
|
||||||
instructions `path-to-install-folder/` as `~/.local/` in a linux system. If
|
|
||||||
you want to install system wide you could use `/usr/local` or `/opt/nextcloud/`.
|
|
||||||
|
|
||||||
##### Linux
|
* You could use the **cmake flag** ```CMAKE_INSTALL_PREFIX``` as ```~/.local/``` in a **Linux** system. If you want to install system wide you could use ```/usr/local``` or ```/opt/nextcloud/```.
|
||||||
|
|
||||||
|
* On **Windows 10** [```$USERPROFILE```](https://docs.microsoft.com/en-us/windows/deployment/usmt/usmt-recognized-environment-variables#a-href-idbkmk-2avariables-that-are-recognized-only-in-the-user-context) refers to ```C:\Users\<USERNAME>```.
|
||||||
|
|
||||||
|
##### Linux & Mac OS
|
||||||
|
|
||||||
```
|
```
|
||||||
$ cmake .. -DCMAKE_INSTALL_PREFIX=path-to-install-folder/ -DCMAKE_BUILD_TYPE=Debug -DNO_SHIBBOLETH=1 -DQTKEYCHAIN_LIBRARY=/path-to-qt5keychain-folder/lib64/libqt5keychain.so -DQTKEYCHAIN_INCLUDE_DIR=/path-to-qt5keychain-folder/include/qt5keychain/ -DOPENSSL_ROOT_DIR=/path-to-openssl-folder/ -DOPENSSL_INCLUDE_DIR=path-to-openssl-folder/include -DOPENSSL_LIBRARIES=path-to-openssl-folder/lib
|
$ cmake .. -DCMAKE_INSTALL_PREFIX=~/nextcloud-desktop-client -DCMAKE_BUILD_TYPE=Debug -DNO_SHIBBOLETH=1
|
||||||
$ make install
|
$ make install
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Windows
|
##### Windows
|
||||||
|
|
||||||
```
|
```
|
||||||
$ cmake -G "Visual Studio 15 2017 Win64" .. -DCMAKE_INSTALL_PREFIX=path-to-install-folder/ -DCMAKE_BUILD_TYPE=Debug -DNO_SHIBBOLETH=1 -DPng2Ico_EXECUTABLE=/path-to-install-png2ico/png2ico.exe -DQTKEYCHAIN_LIBRARY=/path-to-qt5keychain-folder/lib/qt5keychain.lib -DQTKEYCHAIN_INCLUDE_DIR=/path-to-qt5keychain-folder/include/qt5keychain/ -DOPENSSL_ROOT_DIR=/path-to-openssl-folder/ -DOPENSSL_INCLUDE_DIR=path-to-openssl-folder/include -DOPENSSL_LIBRARIES=path-to-openssl-folder/lib
|
$ cmake -G "Visual Studio 15 2017 Win64" .. -DCMAKE_INSTALL_PREFIX=$USERPROFILE\nextcloud-desktop-client -DCMAKE_BUILD_TYPE=Debug -DNO_SHIBBOLETH=1
|
||||||
$ cmake --build . --config Debug --target install
|
$ cmake --build . --config Debug --target install
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Mac OS
|
:information_source: More detailed instructions can be found at the [Desktop Client Wiki](https://github.com/nextcloud/desktop/wiki).
|
||||||
|
|
||||||
```
|
|
||||||
$ cmake .. -DCMAKE_INSTALL_PREFIX=path-to-install-folder/ -DCMAKE_BUILD_TYPE=Debug -DNO_SHIBBOLETH=1 -DQTKEYCHAIN_LIBRARY=/path-to-qt5keychain-folder/lib/libqt5keychain.dylib -DQTKEYCHAIN_INCLUDE_DIR=/path-to-qt5keychain-folder/include/qt5keychain/ -DOPENSSL_ROOT_DIR=/path-to-openssl-folder/ -DOPENSSL_INCLUDE_DIR=path-to-openssl-folder/include -DOPENSSL_LIBRARIES=path-to-openssl-folder/lib
|
|
||||||
$ make install
|
|
||||||
```
|
|
||||||
|
|
||||||
More detailed instructions can be found at the [Desktop Client Wiki](https://github.com/nextcloud/desktop/wiki).
|
|
||||||
|
|
||||||
### :inbox_tray: Where to find binaries to download
|
### :inbox_tray: Where to find binaries to download
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
set( MIRALL_VERSION_MAJOR 2 )
|
set( MIRALL_VERSION_MAJOR 2 )
|
||||||
set( MIRALL_VERSION_MINOR 5 )
|
set( MIRALL_VERSION_MINOR 6 )
|
||||||
set( MIRALL_VERSION_PATCH 2 )
|
set( MIRALL_VERSION_PATCH 2 )
|
||||||
set( MIRALL_VERSION_YEAR 2019 )
|
set( MIRALL_VERSION_YEAR 2019 )
|
||||||
set( MIRALL_SOVERSION 0 )
|
set( MIRALL_SOVERSION 0 )
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ RUN apt-get update -q && DEBIAN_FRONTEND=noninteractive apt-get install -q -y --
|
|||||||
libsqlite3-dev \
|
libsqlite3-dev \
|
||||||
libssl-dev \
|
libssl-dev \
|
||||||
libcmocka-dev \
|
libcmocka-dev \
|
||||||
|
libcloudproviders-dev \
|
||||||
qt5-default \
|
qt5-default \
|
||||||
qttools5-dev-tools \
|
qttools5-dev-tools \
|
||||||
libqt5webkit5-dev \
|
libqt5webkit5-dev \
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ set -xe
|
|||||||
mkdir /app
|
mkdir /app
|
||||||
mkdir /build
|
mkdir /build
|
||||||
|
|
||||||
#Set Qt-5.11
|
#Set Qt-5.12
|
||||||
export QT_BASE_DIR=/opt/qt511
|
export QT_BASE_DIR=/opt/qt5.12.5
|
||||||
export QTDIR=$QT_BASE_DIR
|
export QTDIR=$QT_BASE_DIR
|
||||||
export PATH=$QT_BASE_DIR/bin:$PATH
|
export PATH=$QT_BASE_DIR/bin:$PATH
|
||||||
export LD_LIBRARY_PATH=$QT_BASE_DIR/lib/x86_64-linux-gnu:$QT_BASE_DIR/lib:$LD_LIBRARY_PATH
|
export LD_LIBRARY_PATH=$QT_BASE_DIR/lib/x86_64-linux-gnu:$QT_BASE_DIR/lib:$LD_LIBRARY_PATH
|
||||||
@@ -66,7 +66,8 @@ rm -rf ./usr/share/nemo-python/
|
|||||||
mv ./etc/Nextcloud/sync-exclude.lst ./usr/bin/
|
mv ./etc/Nextcloud/sync-exclude.lst ./usr/bin/
|
||||||
rm -rf ./etc
|
rm -rf ./etc
|
||||||
|
|
||||||
sed -i -e 's|Icon=nextcloud|Icon=Nextcloud|g' usr/share/applications/nextcloud.desktop # Bug in desktop file?
|
DESKTOP_FILE=/app/usr/share/applications/${LINUX_APPLICATION_ID}.desktop
|
||||||
|
sed -i -e 's|Icon=nextcloud|Icon=Nextcloud|g' ${DESKTOP_FILE} # Bug in desktop file?
|
||||||
cp ./usr/share/icons/hicolor/512x512/apps/Nextcloud.png . # Workaround for linuxeployqt bug, FIXME
|
cp ./usr/share/icons/hicolor/512x512/apps/Nextcloud.png . # Workaround for linuxeployqt bug, FIXME
|
||||||
|
|
||||||
|
|
||||||
@@ -87,17 +88,12 @@ chmod a+x linuxdeployqt*.AppImage
|
|||||||
rm ./linuxdeployqt-continuous-x86_64.AppImage
|
rm ./linuxdeployqt-continuous-x86_64.AppImage
|
||||||
unset QTDIR; unset QT_PLUGIN_PATH ; unset LD_LIBRARY_PATH
|
unset QTDIR; unset QT_PLUGIN_PATH ; unset LD_LIBRARY_PATH
|
||||||
export LD_LIBRARY_PATH=/app/usr/lib/
|
export LD_LIBRARY_PATH=/app/usr/lib/
|
||||||
./squashfs-root/AppRun /app/usr/share/applications/nextcloud.desktop -bundle-non-qt-libs
|
./squashfs-root/AppRun ${DESKTOP_FILE} -bundle-non-qt-libs
|
||||||
|
|
||||||
# Set origin
|
# Set origin
|
||||||
./squashfs-root/usr/bin/patchelf --set-rpath '$ORIGIN/' /app/usr/lib/libnextcloudsync.so.0
|
./squashfs-root/usr/bin/patchelf --set-rpath '$ORIGIN/' /app/usr/lib/libnextcloudsync.so.0
|
||||||
|
|
||||||
# Build AppImage
|
# Build AppImage
|
||||||
./squashfs-root/AppRun /app/usr/share/applications/nextcloud.desktop -appimage
|
./squashfs-root/AppRun ${DESKTOP_FILE} -appimage
|
||||||
|
|
||||||
mv Nextcloud*.AppImage Nextcloud-${SUFFIX}-${DRONE_COMMIT}-x86_64.AppImage
|
mv Nextcloud*.AppImage Nextcloud-${SUFFIX}-${DRONE_COMMIT}-x86_64.AppImage
|
||||||
|
|
||||||
curl --upload-file $(readlink -f ./Nextcloud*.AppImage) https://transfer.sh/Nextcloud-${SUFFIX}-${DRONE_COMMIT}-x86_64.AppImage
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo "Get the AppImage at the link above!"
|
|
||||||
|
|||||||
@@ -1,22 +1,22 @@
|
|||||||
nextcloud-client (2.3.3-1.0~cosmic1) cosmic; urgency=medium
|
nextcloud-client (2.3.3-1.0~eoan1) eoan; urgency=medium
|
||||||
|
|
||||||
* Debian build support for the forked client.
|
* Debian build support for the forked client.
|
||||||
|
|
||||||
-- István Váradi <ivaradi@varadiistvan.hu> Mon, 6 Nov 2017 20:20:04 +0100
|
-- István Váradi <ivaradi@varadiistvan.hu> Mon, 6 Nov 2017 20:20:04 +0100
|
||||||
|
|
||||||
nextcloud-client (2.3.1-1.0~cosmic1) cosmic; urgency=medium
|
nextcloud-client (2.3.1-1.0~eoan1) eoan; urgency=medium
|
||||||
|
|
||||||
* New upstream version
|
* New upstream version
|
||||||
|
|
||||||
-- István Váradi <ivaradi@varadiistvan.hu> Thu, 23 Mar 2017 19:07:36 +0100
|
-- István Váradi <ivaradi@varadiistvan.hu> Thu, 23 Mar 2017 19:07:36 +0100
|
||||||
|
|
||||||
nextcloud-client (2.3.0-1.0~cosmic1) cosmic; urgency=medium
|
nextcloud-client (2.3.0-1.0~eoan1) eoan; urgency=medium
|
||||||
|
|
||||||
* New upstream version
|
* New upstream version
|
||||||
|
|
||||||
-- István Váradi <ivaradi@varadiistvan.hu> Tue, 21 Mar 2017 19:34:13 +0100
|
-- István Váradi <ivaradi@varadiistvan.hu> Tue, 21 Mar 2017 19:34:13 +0100
|
||||||
|
|
||||||
nextcloud-client (2.2.4-1.4~cosmic1) cosmic; urgency=medium
|
nextcloud-client (2.2.4-1.4~eoan1) eoan; urgency=medium
|
||||||
|
|
||||||
* The locale-specific icon names are correct too
|
* The locale-specific icon names are correct too
|
||||||
|
|
||||||
90
admin/linux/debian/debian.eoan/control
Normal file
@@ -0,0 +1,90 @@
|
|||||||
|
Source: nextcloud-client
|
||||||
|
Section: contrib/devel
|
||||||
|
Priority: optional
|
||||||
|
Maintainer: István Váradi <ivaradi@varadiistvan.hu>
|
||||||
|
Build-Depends: cmake,
|
||||||
|
debhelper,
|
||||||
|
cdbs,
|
||||||
|
dh-python,
|
||||||
|
extra-cmake-modules (>= 5.16),
|
||||||
|
libkf5kio-dev,
|
||||||
|
libcmocka-dev,
|
||||||
|
libcloudproviders-dev,
|
||||||
|
libdbus-1-dev,
|
||||||
|
libhttp-dav-perl,
|
||||||
|
libinotify-dev [kfreebsd-any],
|
||||||
|
libqt5svg5-dev,
|
||||||
|
libqt5webkit5-dev,
|
||||||
|
libsqlite3-dev,
|
||||||
|
libssl-dev (>= 1.1.0),
|
||||||
|
zlib1g-dev,
|
||||||
|
optipng,
|
||||||
|
pkg-kde-tools,
|
||||||
|
python-sphinx | python3-sphinx,
|
||||||
|
python3-all,
|
||||||
|
qt5keychain-dev,
|
||||||
|
qtwebengine5-dev,
|
||||||
|
qtdeclarative5-dev,
|
||||||
|
qttools5-dev,
|
||||||
|
qttools5-dev-tools,
|
||||||
|
xvfb
|
||||||
|
Standards-Version: 3.9.8
|
||||||
|
Homepage: https://github.com/nextcloud/client_theming
|
||||||
|
#Vcs-Git: git://anonscm.debian.org/collab-maint/nextcloud-client.git
|
||||||
|
#Vcs-Browser: https://anonscm.debian.org/cgit/collab-maint/nextcloud-client.git
|
||||||
|
|
||||||
|
Package: nextcloud-client
|
||||||
|
Architecture: any
|
||||||
|
Depends: libnextcloudsync0 (=${binary:Version}), ${shlibs:Depends}, ${misc:Depends}, nextcloud-client-l10n
|
||||||
|
Description: Nextcloud desktop sync client
|
||||||
|
Use the desktop client to keep your files synchronized
|
||||||
|
between your Nextcloud server and your desktop. Select
|
||||||
|
one or more directories on your local machine and always
|
||||||
|
have access to your latest files wherever you are.
|
||||||
|
|
||||||
|
Package: libnextcloudsync0
|
||||||
|
Architecture: any
|
||||||
|
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||||
|
Description: Nextcloud sync library
|
||||||
|
Used by the Nextcloud desktop client as the synchronization engine.
|
||||||
|
|
||||||
|
Package: libnextcloudsync-dev
|
||||||
|
Architecture: any
|
||||||
|
Section: contrib/libdevel
|
||||||
|
Depends: libnextcloudsync0 (=${binary:Version}), ${misc:Depends}
|
||||||
|
Description: Nextcloud sync library development files
|
||||||
|
The headers and development library for the Nextcloud sync library.
|
||||||
|
|
||||||
|
Package: nextcloud-client-l10n
|
||||||
|
Architecture: all
|
||||||
|
Depends: ${misc:Depends}
|
||||||
|
Description: Nextcloud client internatialization files
|
||||||
|
The translation files.
|
||||||
|
|
||||||
|
Package: nextcloud-client-nautilus
|
||||||
|
Architecture: all
|
||||||
|
Depends: nextcloud-client (>=${binary:Version}), libnextcloudsync0, python-nautilus, nautilus, ${misc:Depends}
|
||||||
|
Description: Nautilus plugin for Nextcloud
|
||||||
|
This package contains a Nautilus plugin to display
|
||||||
|
synchronization status icons for Nextcloud files.
|
||||||
|
|
||||||
|
Package: nextcloud-client-nemo
|
||||||
|
Architecture: all
|
||||||
|
Depends: nextcloud-client (>=${binary:Version}), libnextcloudsync0, python-nemo | nemo-python, nemo, ${misc:Depends}
|
||||||
|
Description: Nemo plugin for Nextcloud
|
||||||
|
This package contains a Nemo plugin to display
|
||||||
|
synchronization status icons for Nextcloud files.
|
||||||
|
|
||||||
|
Package: nextcloud-client-caja
|
||||||
|
Architecture: all
|
||||||
|
Depends: nextcloud-client (>=${binary:Version}), libnextcloudsync0, python-caja, caja, ${misc:Depends}
|
||||||
|
Description: Caja plugin for Nextcloud
|
||||||
|
This package contains a Caja plugin to display
|
||||||
|
synchronization status icons for Nextcloud files.
|
||||||
|
|
||||||
|
Package: nextcloud-client-dolphin
|
||||||
|
Architecture: any
|
||||||
|
Depends: dolphin (>= 4:15.12.1), libnextcloudsync0 (= ${binary:Version}), nextcloud-client, ${misc:Depends}, ${shlibs:Depends}
|
||||||
|
Description: Dolphin plugin for Nextcloud
|
||||||
|
This package contains a Dolphin plugin to display
|
||||||
|
synchronization status icons for Nextcloud files.
|
||||||
48
admin/linux/debian/debian.oldstable/changelog
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
nextcloud-client (2.3.3-1.0~oldstable1) oldstable; urgency=medium
|
||||||
|
|
||||||
|
* Debian build support for the forked client.
|
||||||
|
|
||||||
|
-- István Váradi <ivaradi@varadiistvan.hu> Mon, 6 Nov 2017 20:20:04 +0100
|
||||||
|
|
||||||
|
nextcloud-client (2.3.1-1.0) oldstable; urgency=medium
|
||||||
|
|
||||||
|
* New upstream version
|
||||||
|
|
||||||
|
-- István Váradi <ivaradi@varadiistvan.hu> Thu, 23 Mar 2017 19:07:36 +0100
|
||||||
|
|
||||||
|
nextcloud-client (2.3.0-1.0) oldstable; urgency=medium
|
||||||
|
|
||||||
|
* New upstream version
|
||||||
|
|
||||||
|
-- István Váradi <ivaradi@varadiistvan.hu> Tue, 21 Mar 2017 19:34:13 +0100
|
||||||
|
|
||||||
|
nextcloud-client (2.2.4-1.4) oldstable; urgency=medium
|
||||||
|
|
||||||
|
* The locale-specific icon names are correct too
|
||||||
|
|
||||||
|
-- István Váradi <ivaradi@varadiistvan.hu> Tue, 7 Feb 2017 19:55:40 +0100
|
||||||
|
|
||||||
|
nextcloud-client (2.2.4-1.3) oldstable; urgency=medium
|
||||||
|
|
||||||
|
* Caja syncstate plugin is built.
|
||||||
|
* The syncstate plugin has application-specific name
|
||||||
|
|
||||||
|
-- István Váradi <ivaradi@varadiistvan.hu> Fri, 27 Jan 2017 19:34:18 +0100
|
||||||
|
|
||||||
|
nextcloud-client (2.2.4-1.2) oldstable; urgency=medium
|
||||||
|
|
||||||
|
* Fixed appname in the Nemo syncstate extension.
|
||||||
|
|
||||||
|
-- István Váradi <ivaradi@varadiistvan.hu> Thu, 19 Jan 2017 16:46:50 +0100
|
||||||
|
|
||||||
|
nextcloud-client (2.2.4-1.1) oldstable; urgency=medium
|
||||||
|
|
||||||
|
* Added Nautilus and Nemo syncstate extensions.
|
||||||
|
|
||||||
|
-- István Váradi <ivaradi@varadiistvan.hu> Tue, 17 Jan 2017 19:55:32 +0100
|
||||||
|
|
||||||
|
nextcloud-client (2.2.4-1.0) oldstable; urgency=medium
|
||||||
|
|
||||||
|
* Initial release.
|
||||||
|
|
||||||
|
-- István Váradi <ivaradi@varadiistvan.hu> Wed, 14 Dec 2016 20:07:46 +0100
|
||||||
84
admin/linux/debian/debian.oldstable/control
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
Source: nextcloud-client
|
||||||
|
Section: contrib/devel
|
||||||
|
Priority: optional
|
||||||
|
Maintainer: István Váradi <ivaradi@varadiistvan.hu>
|
||||||
|
Build-Depends: cmake,
|
||||||
|
debhelper,
|
||||||
|
cdbs,
|
||||||
|
dh-python,
|
||||||
|
extra-cmake-modules (>= 5.16),
|
||||||
|
kdelibs5-dev,
|
||||||
|
kio-dev,
|
||||||
|
libcmocka-dev,
|
||||||
|
libdbus-1-dev,
|
||||||
|
libhttp-dav-perl,
|
||||||
|
libinotify-dev [kfreebsd-any],
|
||||||
|
libqt5webkit5-dev,
|
||||||
|
libqt5svg5-dev,
|
||||||
|
libsqlite3-dev,
|
||||||
|
libssl-dev (>= 1.1.0),
|
||||||
|
zlib1g-dev,
|
||||||
|
optipng,
|
||||||
|
pkg-kde-tools,
|
||||||
|
python-sphinx | python3-sphinx,
|
||||||
|
python3-all,
|
||||||
|
qt5keychain-dev,
|
||||||
|
qtwebengine5-dev,
|
||||||
|
qtdeclarative5-dev,
|
||||||
|
qttools5-dev,
|
||||||
|
qttools5-dev-tools,
|
||||||
|
xvfb
|
||||||
|
Standards-Version: 3.9.8
|
||||||
|
Homepage: https://github.com/nextcloud/client_theming
|
||||||
|
#Vcs-Git: git://anonscm.debian.org/collab-maint/nextcloud-client.git
|
||||||
|
#Vcs-Browser: https://anonscm.debian.org/cgit/collab-maint/nextcloud-client.git
|
||||||
|
|
||||||
|
Package: nextcloud-client
|
||||||
|
Architecture: any
|
||||||
|
Depends: libnextcloudsync0 (=${binary:Version}), ${shlibs:Depends}, ${misc:Depends}, nextcloud-client-l10n
|
||||||
|
Recommends: libgnome-keyring0
|
||||||
|
Description: Nextcloud desktop sync client
|
||||||
|
Use the desktop client to keep your files synchronized
|
||||||
|
between your Nextcloud server and your desktop. Select
|
||||||
|
one or more directories on your local machine and always
|
||||||
|
have access to your latest files wherever you are.
|
||||||
|
|
||||||
|
Package: libnextcloudsync0
|
||||||
|
Architecture: any
|
||||||
|
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||||
|
Description: Nextcloud sync library
|
||||||
|
Used by the Nextcloud desktop client as the synchronization engine.
|
||||||
|
|
||||||
|
Package: libnextcloudsync-dev
|
||||||
|
Architecture: any
|
||||||
|
Section: contrib/libdevel
|
||||||
|
Depends: libnextcloudsync0 (=${binary:Version}), ${misc:Depends}
|
||||||
|
Description: Nextcloud sync library development files
|
||||||
|
The headers and development library for the Nextcloud sync library.
|
||||||
|
|
||||||
|
Package: nextcloud-client-l10n
|
||||||
|
Architecture: all
|
||||||
|
Depends: ${misc:Depends}
|
||||||
|
Description: Nextcloud client internatialization files
|
||||||
|
The translation files.
|
||||||
|
|
||||||
|
Package: nextcloud-client-nautilus
|
||||||
|
Architecture: all
|
||||||
|
Depends: nextcloud-client (>=${binary:Version}), libnextcloudsync0, python-nautilus, nautilus, ${misc:Depends}
|
||||||
|
Description: Nautilus plugin for Nextcloud
|
||||||
|
This package contains a Nautilus plugin to display
|
||||||
|
synchronization status icons for Nextcloud files.
|
||||||
|
|
||||||
|
Package: nextcloud-client-nemo
|
||||||
|
Architecture: all
|
||||||
|
Depends: nextcloud-client (>=${binary:Version}), libnextcloudsync0, python-nemo, nemo, ${misc:Depends}
|
||||||
|
Description: Nemo plugin for Nextcloud
|
||||||
|
This package contains a Nemo plugin to display
|
||||||
|
synchronization status icons for Nextcloud files.
|
||||||
|
|
||||||
|
Package: nextcloud-client-caja
|
||||||
|
Architecture: all
|
||||||
|
Depends: nextcloud-client (>=${binary:Version}), libnextcloudsync0, python-caja, caja, ${misc:Depends}
|
||||||
|
Description: Caja plugin for Nextcloud
|
||||||
|
This package contains a Caja plugin to display
|
||||||
|
synchronization status icons for Nextcloud files.
|
||||||
@@ -9,7 +9,10 @@ Build-Depends: cmake,
|
|||||||
extra-cmake-modules (>= 5.16),
|
extra-cmake-modules (>= 5.16),
|
||||||
kdelibs5-dev,
|
kdelibs5-dev,
|
||||||
kio-dev,
|
kio-dev,
|
||||||
|
libavcodec58,
|
||||||
libcmocka-dev,
|
libcmocka-dev,
|
||||||
|
libcloudproviders-dev,
|
||||||
|
libdbus-1-dev,
|
||||||
libhttp-dav-perl,
|
libhttp-dav-perl,
|
||||||
libinotify-dev [kfreebsd-any],
|
libinotify-dev [kfreebsd-any],
|
||||||
libqt5webkit5-dev,
|
libqt5webkit5-dev,
|
||||||
|
|||||||
@@ -1,40 +1,12 @@
|
|||||||
--- nextcloud-client-2.4.0.orig/src/gui/wizard/owncloudoauthcredspage.cpp
|
--- nextcloud-client-2.5.3.orig/src/3rdparty/kmessagewidget/kmessagewidget.cpp 2019-07-26 18:40:34.949349387 +0000
|
||||||
+++ nextcloud-client-2.4.0/src/gui/wizard/owncloudoauthcredspage.cpp
|
+++ nextcloud-client-2.5.3/src/3rdparty/kmessagewidget/kmessagewidget.cpp 2019-07-26 18:41:39.866478051 +0000
|
||||||
@@ -53,10 +53,8 @@ OwncloudOAuthCredsPage::OwncloudOAuthCredsPage()
|
@@ -105,6 +105,9 @@
|
||||||
_ui.openLinkButton->setContextMenuPolicy(Qt::CustomContextMenu);
|
q->setMessageType(KMessageWidget::Information);
|
||||||
QObject::connect(_ui.openLinkButton, &QWidget::customContextMenuRequested, [this](const QPoint &pos) {
|
|
||||||
auto menu = new QMenu(_ui.openLinkButton);
|
|
||||||
- menu->addAction(tr("Copy link to clipboard"), this, [this] {
|
|
||||||
- if (_asyncAuth)
|
|
||||||
- QApplication::clipboard()->setText(_asyncAuth->authorisationLink().toString(QUrl::FullyEncoded));
|
|
||||||
- });
|
|
||||||
+ auto action = menu->addAction(tr("Copy link to clipboard"));
|
|
||||||
+ connect(action, &QAction::triggered, this, &OwncloudOAuthCredsPage::copyLinkToClipboard);
|
|
||||||
menu->setAttribute(Qt::WA_DeleteOnClose);
|
|
||||||
menu->popup(_ui.openLinkButton->mapToGlobal(pos));
|
|
||||||
});
|
|
||||||
@@ -131,4 +129,11 @@ bool OwncloudOAuthCredsPage::isComplete() const
|
|
||||||
return false; /* We can never go forward manually */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
+void OwncloudOAuthCredsPage::copyLinkToClipboard()
|
+template <typename T>
|
||||||
+{
|
+constexpr typename std::add_const<T>::type &qAsConst(T &t) noexcept { return t; }
|
||||||
+ if (_asyncAuth)
|
|
||||||
+ QApplication::clipboard()->setText(_asyncAuth->authorisationLink().toString(QUrl::FullyEncoded));
|
|
||||||
+}
|
|
||||||
+
|
+
|
||||||
+
|
void KMessageWidgetPrivate::createLayout()
|
||||||
} // namespace OCC
|
{
|
||||||
--- nextcloud-client-2.4.0.orig/src/gui/wizard/owncloudoauthcredspage.h
|
delete content->layout();
|
||||||
+++ nextcloud-client-2.4.0/src/gui/wizard/owncloudoauthcredspage.h
|
|
||||||
@@ -57,6 +57,10 @@ public:
|
|
||||||
QString _refreshToken;
|
|
||||||
QScopedPointer<OAuth> _asyncAuth;
|
|
||||||
Ui_OwncloudOAuthCredsPage _ui;
|
|
||||||
+
|
|
||||||
+protected slots:
|
|
||||||
+ void copyLinkToClipboard();
|
|
||||||
+
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace OCC
|
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ Build-Depends: cmake,
|
|||||||
kdelibs5-dev,
|
kdelibs5-dev,
|
||||||
libkf5kio-dev,
|
libkf5kio-dev,
|
||||||
libcmocka-dev,
|
libcmocka-dev,
|
||||||
|
libcloudproviders-dev,
|
||||||
|
libdbus-1-dev,
|
||||||
libhttp-dav-perl,
|
libhttp-dav-perl,
|
||||||
libinotify-dev [kfreebsd-any],
|
libinotify-dev [kfreebsd-any],
|
||||||
libqt5svg5-dev,
|
libqt5svg5-dev,
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ if ! wget http://ppa.launchpad.net/${repo}/ubuntu/pool/main/n/nextcloud-client/n
|
|||||||
origsourceopt="-sa"
|
origsourceopt="-sa"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for distribution in xenial bionic cosmic disco stable; do
|
for distribution in xenial bionic disco eoan stable oldstable; do
|
||||||
rm -rf nextcloud-client_${basever}
|
rm -rf nextcloud-client_${basever}
|
||||||
cp -a ${DRONE_WORKSPACE} nextcloud-client_${basever}
|
cp -a ${DRONE_WORKSPACE} nextcloud-client_${basever}
|
||||||
|
|
||||||
@@ -98,26 +98,46 @@ if test "${pull_request}" = "master"; then
|
|||||||
PPA=$PPA_BETA
|
PPA=$PPA_BETA
|
||||||
OBS_PROJECT=$OBS_PROJECT_BETA
|
OBS_PROJECT=$OBS_PROJECT_BETA
|
||||||
fi
|
fi
|
||||||
OBS_SUBDIR="${OBS_PROJECT}/${OBS_PACKAGE}"
|
|
||||||
|
|
||||||
if test -f ~/.has_ppa_keys; then
|
if test -f ~/.has_ppa_keys; then
|
||||||
for changes in nextcloud-client_*~+([a-z])1_source.changes; do
|
for changes in nextcloud-client_*~+([a-z])1_source.changes; do
|
||||||
dput $PPA $changes > /dev/null
|
case "${changes}" in
|
||||||
|
*oldstable1*)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
dput $PPA $changes > /dev/null
|
||||||
|
;;
|
||||||
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
mkdir osc
|
for distribution in stable oldstable; do
|
||||||
cd osc
|
if test "${distribution}" = "oldstable"; then
|
||||||
osc co ${OBS_PROJECT} ${OBS_PACKAGE}
|
pkgsuffix=".${distribution}"
|
||||||
if test "$(ls ${OBS_SUBDIR})"; then
|
pkgvertag="~${distribution}1"
|
||||||
osc delete ${OBS_SUBDIR}/*
|
else
|
||||||
fi
|
pkgsuffix=""
|
||||||
cp ../nextcloud-client*.orig.tar.* ${OBS_SUBDIR}/
|
pkgvertag=""
|
||||||
cp ../nextcloud-client_*[0-9.][0-9].dsc ${OBS_SUBDIR}/
|
fi
|
||||||
cp ../nextcloud-client_*[0-9.][0-9].debian.tar* ${OBS_SUBDIR}/
|
|
||||||
cp ../nextcloud-client_*[0-9.][0-9]_source.changes ${OBS_SUBDIR}/
|
|
||||||
osc add ${OBS_SUBDIR}/*
|
|
||||||
|
|
||||||
cd ${OBS_SUBDIR}
|
package="${OBS_PACKAGE}${pkgsuffix}"
|
||||||
osc commit -m "Travis update"
|
OBS_SUBDIR="${OBS_PROJECT}/${package}"
|
||||||
|
|
||||||
|
mkdir -p osc
|
||||||
|
pushd osc
|
||||||
|
osc co ${OBS_PROJECT} ${package}
|
||||||
|
if test "$(ls ${OBS_SUBDIR})"; then
|
||||||
|
osc delete ${OBS_SUBDIR}/*
|
||||||
|
fi
|
||||||
|
|
||||||
|
cp ../nextcloud-client*.orig.tar.* ${OBS_SUBDIR}/
|
||||||
|
cp ../nextcloud-client_*[0-9.][0-9]${pkgvertag}.dsc ${OBS_SUBDIR}/
|
||||||
|
cp ../nextcloud-client_*[0-9.][0-9]${pkgvertag}.debian.tar* ${OBS_SUBDIR}/
|
||||||
|
cp ../nextcloud-client_*[0-9.][0-9]${pkgvertag}_source.changes ${OBS_SUBDIR}/
|
||||||
|
osc add ${OBS_SUBDIR}/*
|
||||||
|
|
||||||
|
cd ${OBS_SUBDIR}
|
||||||
|
osc commit -m "Travis update"
|
||||||
|
popd
|
||||||
|
done
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -70,7 +70,9 @@ def collectEntries(baseCommit, baseVersion, kind):
|
|||||||
lastVersionTag = None
|
lastVersionTag = None
|
||||||
lastCMAKEVersion = None
|
lastCMAKEVersion = None
|
||||||
for line in output.splitlines():
|
for line in output.splitlines():
|
||||||
(commit, name, email, date, revdate, subject) = line.split("\t")
|
words = line.split("\t")
|
||||||
|
(commit, name, email, date, revdate) = words[0:5]
|
||||||
|
subject = "\t".join(words[5:])
|
||||||
revdate = datetime.datetime.utcfromtimestamp(long(revdate)).strftime("%Y%m%d.%H%M%S")
|
revdate = datetime.datetime.utcfromtimestamp(long(revdate)).strftime("%Y%m%d.%H%M%S")
|
||||||
|
|
||||||
kind = "beta"
|
kind = "beta"
|
||||||
|
|||||||
21
admin/linux/upload-appimage.sh
Executable file
@@ -0,0 +1,21 @@
|
|||||||
|
#! /bin/bash
|
||||||
|
|
||||||
|
set -xe
|
||||||
|
|
||||||
|
cd /build
|
||||||
|
|
||||||
|
# Upload AppImage
|
||||||
|
APPIMAGE=$(readlink -f ./Nextcloud*.AppImage)
|
||||||
|
BASENAME=$(basename ${APPIMAGE})
|
||||||
|
|
||||||
|
if curl --max-time 900 --upload-file ${APPIMAGE} https://transfer.sh/${BASENAME}
|
||||||
|
then
|
||||||
|
echo
|
||||||
|
echo "Get the AppImage at the link above!"
|
||||||
|
else
|
||||||
|
echo
|
||||||
|
echo "Upload failed, however this is an optional step."
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Don't let the Drone build fail
|
||||||
|
exit 0
|
||||||
@@ -49,7 +49,7 @@ fi
|
|||||||
if [ ! -z "$identity" ]; then
|
if [ ! -z "$identity" ]; then
|
||||||
echo "Will try to sign the installer"
|
echo "Will try to sign the installer"
|
||||||
pushd $install_path
|
pushd $install_path
|
||||||
productsign --sign "$identity" "$installer_file" "$installer_file.new"
|
productsign --timestamp --sign "$identity" "$installer_file" "$installer_file.new"
|
||||||
mv "$installer_file".new "$installer_file"
|
mv "$installer_file".new "$installer_file"
|
||||||
popd
|
popd
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -32,11 +32,12 @@ FRAMEWORK_SEARCH_PATH=[
|
|||||||
os.path.join(os.environ['HOME'], 'Library/Frameworks')
|
os.path.join(os.environ['HOME'], 'Library/Frameworks')
|
||||||
]
|
]
|
||||||
|
|
||||||
LIBRARY_SEARCH_PATH=['/usr/local/lib', '/usr/local/Qt-5.6.2/lib', '.']
|
LIBRARY_SEARCH_PATH=['/usr/local/lib', '/usr/local/Qt-5.12.5/lib', '.']
|
||||||
|
|
||||||
QT_PLUGINS = [
|
QT_PLUGINS = [
|
||||||
'sqldrivers/libqsqlite.dylib',
|
'sqldrivers/libqsqlite.dylib',
|
||||||
'platforms/libqcocoa.dylib',
|
'platforms/libqcocoa.dylib',
|
||||||
|
'styles/libqmacstyle.dylib',
|
||||||
'imageformats/libqgif.dylib',
|
'imageformats/libqgif.dylib',
|
||||||
'imageformats/libqico.dylib',
|
'imageformats/libqico.dylib',
|
||||||
'imageformats/libqjpeg.dylib',
|
'imageformats/libqjpeg.dylib',
|
||||||
@@ -46,7 +47,7 @@ QT_PLUGINS = [
|
|||||||
QT_PLUGINS_SEARCH_PATH=[
|
QT_PLUGINS_SEARCH_PATH=[
|
||||||
# os.path.join(os.environ['QTDIR'], 'plugins'),
|
# os.path.join(os.environ['QTDIR'], 'plugins'),
|
||||||
# '/usr/local/Cellar/qt/5.2.1/plugins',
|
# '/usr/local/Cellar/qt/5.2.1/plugins',
|
||||||
'/usr/local/Qt-5.6.2/plugins',
|
'/usr/local/Qt-5.12.5/plugins',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 254 KiB |
|
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 151 KiB After Width: | Height: | Size: 151 KiB |
2
binary
@@ -37,6 +37,8 @@
|
|||||||
<file>resources/confirm.svg</file>
|
<file>resources/confirm.svg</file>
|
||||||
<file>resources/copy.svg</file>
|
<file>resources/copy.svg</file>
|
||||||
<file>resources/state-sync.svg</file>
|
<file>resources/state-sync.svg</file>
|
||||||
|
<file>resources/add.png</file>
|
||||||
|
<file>resources/state-info.svg</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
<qresource prefix="/"/>
|
<qresource prefix="/"/>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|||||||
@@ -47,7 +47,13 @@ macro (KDE4_ADD_APP_ICON appsources pattern)
|
|||||||
endif (fn MATCHES ".*128.*")
|
endif (fn MATCHES ".*128.*")
|
||||||
if (fn MATCHES ".*256.*" )
|
if (fn MATCHES ".*256.*" )
|
||||||
list (APPEND _icons ${it})
|
list (APPEND _icons ${it})
|
||||||
endif (fn MATCHES ".*256.*")
|
endif (fn MATCHES ".*256.*")
|
||||||
|
if (fn MATCHES ".*512.*" )
|
||||||
|
list (APPEND _icons ${it})
|
||||||
|
endif (fn MATCHES ".*512.*")
|
||||||
|
if (fn MATCHES ".*1024.*" )
|
||||||
|
list (APPEND _icons ${it})
|
||||||
|
endif (fn MATCHES ".*1024.*")
|
||||||
endforeach (it)
|
endforeach (it)
|
||||||
if (_icons)
|
if (_icons)
|
||||||
add_custom_command(OUTPUT ${_outfilename}.ico ${_outfilename}.rc
|
add_custom_command(OUTPUT ${_outfilename}.ico ${_outfilename}.rc
|
||||||
@@ -104,14 +110,14 @@ macro (KDE4_ADD_APP_ICON appsources pattern)
|
|||||||
foreach (it ${files})
|
foreach (it ${files})
|
||||||
if (it MATCHES ".*sidebar-16.*")
|
if (it MATCHES ".*sidebar-16.*")
|
||||||
configure_file(${it} ${appsources}.iconset/sidebar_16x16.png COPYONLY)
|
configure_file(${it} ${appsources}.iconset/sidebar_16x16.png COPYONLY)
|
||||||
elseif (it MATCHES ".*sidebar-18.*")
|
|
||||||
configure_file(${it} ${appsources}.iconset/sidebar_18x18.png COPYONLY)
|
|
||||||
elseif (it MATCHES ".*sidebar-32.*")
|
elseif (it MATCHES ".*sidebar-32.*")
|
||||||
|
configure_file(${it} ${appsources}.iconset/sidebar_18x18.png COPYONLY)
|
||||||
configure_file(${it} ${appsources}.iconset/sidebar_16x16@2x.png COPYONLY)
|
configure_file(${it} ${appsources}.iconset/sidebar_16x16@2x.png COPYONLY)
|
||||||
configure_file(${it} ${appsources}.iconset/sidebar_32x32.png COPYONLY)
|
|
||||||
elseif (it MATCHES ".*sidebar-36.*")
|
|
||||||
configure_file(${it} ${appsources}.iconset/sidebar_18x18@2x.png COPYONLY)
|
|
||||||
elseif (it MATCHES ".*sidebar-64.*")
|
elseif (it MATCHES ".*sidebar-64.*")
|
||||||
|
configure_file(${it} ${appsources}.iconset/sidebar_18x18@2x.png COPYONLY)
|
||||||
|
elseif (it MATCHES ".*sidebar-128.*")
|
||||||
|
configure_file(${it} ${appsources}.iconset/sidebar_32x32.png COPYONLY)
|
||||||
|
elseif (it MATCHES ".*sidebar-256.*")
|
||||||
configure_file(${it} ${appsources}.iconset/sidebar_32x32@2x.png COPYONLY)
|
configure_file(${it} ${appsources}.iconset/sidebar_32x32@2x.png COPYONLY)
|
||||||
endif()
|
endif()
|
||||||
endforeach (it)
|
endforeach (it)
|
||||||
|
|||||||
@@ -8,8 +8,8 @@
|
|||||||
#
|
#
|
||||||
# ecm_add_app_icon(<sources_var>
|
# ecm_add_app_icon(<sources_var>
|
||||||
# ICONS <icon> [<icon> [...]]
|
# ICONS <icon> [<icon> [...]]
|
||||||
# [SIDEBAR_ICONS <icon> [<icon> [...]] # Since 5.4x
|
# [SIDEBAR_ICONS <icon> [<icon> [...]] # Since 5.49
|
||||||
# [OUTFILE_BASE <name>]) # Since 5.4x
|
# [OUTFILE_BASENAME <name>]) # Since 5.49
|
||||||
# )
|
# )
|
||||||
#
|
#
|
||||||
# The given icons, whose names must match the pattern::
|
# The given icons, whose names must match the pattern::
|
||||||
@@ -27,20 +27,21 @@
|
|||||||
#
|
#
|
||||||
# ``SIDEBAR_ICONS`` can be used to add Mac OS X sidebar
|
# ``SIDEBAR_ICONS`` can be used to add Mac OS X sidebar
|
||||||
# icons to the generated iconset. They are used when a folder monitored by the
|
# icons to the generated iconset. They are used when a folder monitored by the
|
||||||
# application is dragged into Finder's sidebar. Since 5.4x.
|
# application is dragged into Finder's sidebar. Since 5.49.
|
||||||
#
|
#
|
||||||
# ``OUTFILE_BASE`` will be used as the basename for the icon file. If
|
# ``OUTFILE_BASENAME`` will be used as the basename for the icon file. If
|
||||||
# you specify it, the icon file will be called ``<OUTFILE_BASE>.icns`` on Mac OS X
|
# you specify it, the icon file will be called ``<OUTFILE_BASENAME>.icns`` on Mac OS X
|
||||||
# and ``<OUTFILE_BASE>.ico`` on Windows. If you don't specify it, it defaults
|
# and ``<OUTFILE_BASENAME>.ico`` on Windows. If you don't specify it, it defaults
|
||||||
# to ``<sources_var>.<ext>``. Since 5.4x.
|
# to ``<sources_var>.<ext>``. Since 5.49.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# Windows notes
|
# Windows notes
|
||||||
# * Icons are compiled into the executable using a resource file.
|
# * Icons are compiled into the executable using a resource file.
|
||||||
# * Icons may not show up in Windows Explorer if the executable
|
# * Icons may not show up in Windows Explorer if the executable
|
||||||
# target does not have the ``WIN32_EXECUTABLE`` property set.
|
# target does not have the ``WIN32_EXECUTABLE`` property set.
|
||||||
# * The tool png2ico is required. See :find-module:`FindPng2Ico`.
|
# * One of the tools png2ico (See :find-module:`FindPng2Ico`) or
|
||||||
# * Supported sizes: 16, 32, 48, 64, 128.
|
# icotool (see :find-module:`FindIcoTool`) is required.
|
||||||
|
# * Supported sizes: 16, 24, 32, 48, 64, 128, 256, 512 and 1024.
|
||||||
#
|
#
|
||||||
# Mac OS X notes
|
# Mac OS X notes
|
||||||
# * The executable target must have the ``MACOSX_BUNDLE`` property set.
|
# * The executable target must have the ``MACOSX_BUNDLE`` property set.
|
||||||
@@ -101,7 +102,7 @@ include(CMakeParseArguments)
|
|||||||
|
|
||||||
function(ecm_add_app_icon appsources)
|
function(ecm_add_app_icon appsources)
|
||||||
set(options)
|
set(options)
|
||||||
set(oneValueArgs OUTFILE_BASE)
|
set(oneValueArgs OUTFILE_BASENAME)
|
||||||
set(multiValueArgs ICONS SIDEBAR_ICONS)
|
set(multiValueArgs ICONS SIDEBAR_ICONS)
|
||||||
cmake_parse_arguments(ARG "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
cmake_parse_arguments(ARG "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
||||||
|
|
||||||
@@ -138,9 +139,9 @@ function(ecm_add_app_icon appsources)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
_ecm_add_app_icon_categorize_icons("${ARG_ICONS}" "icons" "16;32;48;64;128;256;512;1024")
|
_ecm_add_app_icon_categorize_icons("${ARG_ICONS}" "icons" "16;24;32;48;64;128;256;512;1024")
|
||||||
if(ARG_SIDEBAR_ICONS)
|
if(ARG_SIDEBAR_ICONS)
|
||||||
_ecm_add_app_icon_categorize_icons("${ARG_SIDEBAR_ICONS}" "sidebar_icons" "16;18;32;36;64")
|
_ecm_add_app_icon_categorize_icons("${ARG_SIDEBAR_ICONS}" "sidebar_icons" "16;32;64;128;256")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(mac_icons
|
set(mac_icons
|
||||||
@@ -151,31 +152,37 @@ function(ecm_add_app_icon appsources)
|
|||||||
${icons_at_128px}
|
${icons_at_128px}
|
||||||
${icons_at_256px}
|
${icons_at_256px}
|
||||||
${icons_at_512px}
|
${icons_at_512px}
|
||||||
${icons_at_1024px}
|
${icons_at_1024px})
|
||||||
|
|
||||||
|
set(mac_sidebar_icons
|
||||||
# Sidebar Icons: https://developer.apple.com/library/content/documentation/General/Conceptual/ExtensibilityPG/Finder.html#//apple_ref/doc/uid/TP40014214-CH15-SW15
|
# Sidebar Icons: https://developer.apple.com/library/content/documentation/General/Conceptual/ExtensibilityPG/Finder.html#//apple_ref/doc/uid/TP40014214-CH15-SW15
|
||||||
${sidebar_icons_at_16px}
|
${sidebar_icons_at_16px}
|
||||||
${sidebar_icons_at_18px}
|
|
||||||
${sidebar_icons_at_32px}
|
${sidebar_icons_at_32px}
|
||||||
${sidebar_icons_at_36px}
|
${sidebar_icons_at_64px}
|
||||||
${sidebar_icons_at_64px})
|
${sidebar_icons_at_128px}
|
||||||
if (NOT icons_at_128px)
|
${sidebar_icons_at_256px})
|
||||||
message(AUTHOR_WARNING "No 128px icon provided; this will not work on Mac OS X")
|
|
||||||
|
if (NOT (mac_icons OR mac_sidebar_icons))
|
||||||
|
message(AUTHOR_WARNING "No icons suitable for use on macOS provided")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
set(windows_icons ${icons_at_16px}
|
set(windows_icons ${icons_at_16px}
|
||||||
${icons_at_32px}
|
${icons_at_24px}
|
||||||
${icons_at_48px}
|
${icons_at_32px}
|
||||||
${icons_at_64px}
|
${icons_at_48px}
|
||||||
${icons_at_128px}
|
${icons_at_64px}
|
||||||
${icons_at_256px})
|
${icons_at_128px}
|
||||||
if (NOT windows_icons)
|
${icons_at_256px}
|
||||||
|
${icons_at_512px}
|
||||||
|
${icons_at_1024px})
|
||||||
|
|
||||||
|
if (NOT (windows_icons))
|
||||||
message(AUTHOR_WARNING "No icons suitable for use on Windows provided")
|
message(AUTHOR_WARNING "No icons suitable for use on Windows provided")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (ARG_OUTFILE_BASE)
|
if (ARG_OUTFILE_BASENAME)
|
||||||
set (_outfilebasename "${ARG_OUTFILE_BASE}")
|
set (_outfilebasename "${ARG_OUTFILE_BASENAME}")
|
||||||
else()
|
else()
|
||||||
set (_outfilebasename "${appsources}")
|
set (_outfilebasename "${appsources}")
|
||||||
endif()
|
endif()
|
||||||
@@ -185,26 +192,15 @@ function(ecm_add_app_icon appsources)
|
|||||||
set(saved_CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}")
|
set(saved_CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}")
|
||||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_FIND_MODULE_DIR})
|
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_FIND_MODULE_DIR})
|
||||||
find_package(Png2Ico)
|
find_package(Png2Ico)
|
||||||
|
find_package(IcoTool)
|
||||||
set(CMAKE_MODULE_PATH "${saved_CMAKE_MODULE_PATH}")
|
set(CMAKE_MODULE_PATH "${saved_CMAKE_MODULE_PATH}")
|
||||||
|
|
||||||
if (Png2Ico_FOUND)
|
function(create_windows_icon_and_rc command args deps)
|
||||||
if (Png2Ico_HAS_RCFILE_ARGUMENT)
|
|
||||||
add_custom_command(
|
|
||||||
OUTPUT "${_outfilename}.rc" "${_outfilename}.ico"
|
|
||||||
COMMAND Png2Ico::Png2Ico
|
|
||||||
ARGS
|
|
||||||
--rcfile "${_outfilename}.rc"
|
|
||||||
"${_outfilename}.ico"
|
|
||||||
${windows_icons}
|
|
||||||
DEPENDS ${windows_icons}
|
|
||||||
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
|
||||||
)
|
|
||||||
else()
|
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
OUTPUT "${_outfilename}.ico"
|
OUTPUT "${_outfilename}.ico"
|
||||||
COMMAND Png2Ico::Png2Ico
|
COMMAND ${command}
|
||||||
ARGS "${_outfilename}.ico" ${windows_icons}
|
ARGS ${args}
|
||||||
DEPENDS ${windows_icons}
|
DEPENDS ${deps}
|
||||||
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||||
)
|
)
|
||||||
# this bit's a little hacky to make the dependency stuff work
|
# this bit's a little hacky to make the dependency stuff work
|
||||||
@@ -216,12 +212,72 @@ function(ecm_add_app_icon appsources)
|
|||||||
DEPENDS "${_outfilename}.ico"
|
DEPENDS "${_outfilename}.ico"
|
||||||
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
|
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
|
||||||
)
|
)
|
||||||
endif()
|
endfunction()
|
||||||
|
|
||||||
|
if (IcoTool_FOUND)
|
||||||
|
list(APPEND icotool_args "-c" "-o" "${_outfilename}.ico")
|
||||||
|
|
||||||
|
# According to https://stackoverflow.com/a/40851713/2886832
|
||||||
|
# Windows always chooses the first icon above 255px, all other ones will be ignored
|
||||||
|
set(maxSize 0)
|
||||||
|
foreach(size 256 512 1024)
|
||||||
|
if(icons_at_${size}px)
|
||||||
|
set(maxSize "${size}")
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
foreach(size 16 24 32 48 64 128 ${maxSize})
|
||||||
|
if(NOT icons_at_${size}px)
|
||||||
|
continue()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(icotool_icon_arg "")
|
||||||
|
if(size STREQUAL "${maxSize}")
|
||||||
|
# maxSize icon needs to be included as raw png
|
||||||
|
list(APPEND icotool_args "-r")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
foreach(icon ${icons_at_${size}px})
|
||||||
|
list(APPEND icotool_args "${icons_at_${size}px}")
|
||||||
|
endforeach()
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
create_windows_icon_and_rc(IcoTool::IcoTool "${icotool_args}" "${windows_icons_modern}")
|
||||||
set(${appsources} "${${appsources}};${_outfilename}.rc" PARENT_SCOPE)
|
set(${appsources} "${${appsources}};${_outfilename}.rc" PARENT_SCOPE)
|
||||||
|
|
||||||
|
# standard png2ico has no rcfile argument
|
||||||
|
# NOTE: We generally use https://github.com/hiiamok/png2ImageMagickICO
|
||||||
|
# or similar on windows, which is why we provide resolutions >= 256px here.
|
||||||
|
# Standard png2ico will fail with this.
|
||||||
|
elseif(Png2Ico_FOUND AND NOT Png2Ico_HAS_RCFILE_ARGUMENT AND windows_icons)
|
||||||
|
set(png2ico_args)
|
||||||
|
list(APPEND png2ico_args "${_outfilename}.ico")
|
||||||
|
list(APPEND png2ico_args "${windows_icons}")
|
||||||
|
create_windows_icon_and_rc(Png2Ico::Png2Ico "${png2ico_args}" "${windows_icons}")
|
||||||
|
|
||||||
|
set(${appsources} "${${appsources}};${_outfilename}.rc" PARENT_SCOPE)
|
||||||
|
|
||||||
|
# png2ico from kdewin provides rcfile argument
|
||||||
|
elseif(Png2Ico_FOUND AND windows_icons)
|
||||||
|
add_custom_command(
|
||||||
|
OUTPUT "${_outfilename}.rc" "${_outfilename}.ico"
|
||||||
|
COMMAND Png2Ico::Png2Ico
|
||||||
|
ARGS
|
||||||
|
--rcfile "${_outfilename}.rc"
|
||||||
|
"${_outfilename}.ico"
|
||||||
|
${windows_icons}
|
||||||
|
DEPENDS ${windows_icons}
|
||||||
|
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||||
|
)
|
||||||
|
|
||||||
|
set(${appsources} "${${appsources}};${_outfilename}.rc" PARENT_SCOPE)
|
||||||
|
|
||||||
|
# else none of the supported tools was found
|
||||||
else()
|
else()
|
||||||
message(WARNING "Unable to find the png2ico utility - application will not have an application icon!")
|
message(WARNING "Unable to find the png2ico or icotool utilities or icons in matching sizes - application will not have an application icon!")
|
||||||
endif()
|
endif()
|
||||||
elseif (APPLE AND mac_icons)
|
|
||||||
|
elseif (APPLE AND (mac_icons OR mac_sidebar_icons))
|
||||||
# first generate .iconset directory structure, then convert to .icns format using the Mac OS X "iconutil" utility,
|
# first generate .iconset directory structure, then convert to .icns format using the Mac OS X "iconutil" utility,
|
||||||
# to create retina compatible icon, you need png source files in pixel resolution 16x16, 32x32, 64x64, 128x128,
|
# to create retina compatible icon, you need png source files in pixel resolution 16x16, 32x32, 64x64, 128x128,
|
||||||
# 256x256, 512x512, 1024x1024
|
# 256x256, 512x512, 1024x1024
|
||||||
@@ -246,8 +302,11 @@ function(ecm_add_app_icon appsources)
|
|||||||
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||||
)
|
)
|
||||||
list(APPEND iconset_icons
|
list(APPEND iconset_icons
|
||||||
"${_outfilename}.iconset/${type}_${sizename}.png")
|
"${_outfilename}.iconset/${type}_${sizename}.png")
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
|
# List of supported sizes and filenames taken from:
|
||||||
|
# https://developer.apple.com/library/content/documentation/GraphicsAnimation/Conceptual/HighResolutionOSX/Optimizing/Optimizing.html#//apple_ref/doc/uid/TP40012302-CH7-SW4
|
||||||
foreach(size 16 32 128 256 512)
|
foreach(size 16 32 128 256 512)
|
||||||
math(EXPR double_size "2 * ${size}")
|
math(EXPR double_size "2 * ${size}")
|
||||||
foreach(file ${icons_at_${size}px})
|
foreach(file ${icons_at_${size}px})
|
||||||
@@ -258,14 +317,25 @@ function(ecm_add_app_icon appsources)
|
|||||||
endforeach()
|
endforeach()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
foreach(size 16 18 32)
|
# List of supported sizes and filenames taken from:
|
||||||
math(EXPR double_size "2 * ${size}")
|
# https://developer.apple.com/library/content/documentation/General/Conceptual/ExtensibilityPG/Finder.html#//apple_ref/doc/uid/TP40014214-CH15-SW15
|
||||||
foreach(file ${sidebar_icons_at_${size}px})
|
foreach(file ${sidebar_icons_at_16px})
|
||||||
copy_icon("${file}" "${size}x${size}" "sidebar")
|
copy_icon("${file}" "16x16" "sidebar")
|
||||||
endforeach()
|
endforeach()
|
||||||
foreach(file ${sidebar_icons_at_${double_size}px})
|
foreach(file ${sidebar_icons_at_32px})
|
||||||
copy_icon("${file}" "${size}x${size}@2x" "sidebar")
|
copy_icon("${file}" "16x16@2x" "sidebar")
|
||||||
endforeach()
|
endforeach()
|
||||||
|
foreach(file ${sidebar_icons_at_32px})
|
||||||
|
copy_icon("${file}" "18x18" "sidebar")
|
||||||
|
endforeach()
|
||||||
|
foreach(file ${sidebar_icons_at_64px})
|
||||||
|
copy_icon("${file}" "18x18@2x" "sidebar")
|
||||||
|
endforeach()
|
||||||
|
foreach(file ${sidebar_icons_at_128px})
|
||||||
|
copy_icon("${file}" "32x32" "sidebar")
|
||||||
|
endforeach()
|
||||||
|
foreach(file ${sidebar_icons_at_256px})
|
||||||
|
copy_icon("${file}" "32x32@2x" "sidebar")
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
# generate .icns icon file
|
# generate .icns icon file
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>@MIRALL_VERSION_STRING@</string>
|
<string>@MIRALL_VERSION_STRING@</string>
|
||||||
<key>NSHumanReadableCopyright</key>
|
<key>NSHumanReadableCopyright</key>
|
||||||
<string>(C) 2014-2018 @APPLICATION_VENDOR@</string>
|
<string>(C) 2014-2019 @APPLICATION_VENDOR@</string>
|
||||||
<key>NSSupportsAutomaticGraphicsSwitching</key>
|
<key>NSSupportsAutomaticGraphicsSwitching</key>
|
||||||
<true/>
|
<true/>
|
||||||
<key>SUShowReleaseNotes</key>
|
<key>SUShowReleaseNotes</key>
|
||||||
|
|||||||
@@ -3,7 +3,11 @@
|
|||||||
# For details see the accompanying COPYING* file.
|
# For details see the accompanying COPYING* file.
|
||||||
|
|
||||||
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
|
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic -Wno-long-long -Wno-gnu-zero-variadic-macro-arguments")
|
|
||||||
|
# Use this only for Clang
|
||||||
|
if (CMAKE_CXX_COMPILER MATCHES "Clang")
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic -Wno-long-long -Wno-gnu-zero-variadic-macro-arguments")
|
||||||
|
endif()
|
||||||
|
|
||||||
# Fix sqlite compilation on macOS
|
# Fix sqlite compilation on macOS
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-incompatible-pointer-types-discards-qualifiers")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-incompatible-pointer-types-discards-qualifiers")
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ Activity
|
|||||||
.. index:: activity, recent changes, sync activity
|
.. index:: activity, recent changes, sync activity
|
||||||
|
|
||||||
The Activity window, which can be invoked either from the main menu (``Recent
|
The Activity window, which can be invoked either from the main menu (``Recent
|
||||||
Changes -> Details…``) or the Activity tab on the left side of the settings
|
Changes -> View more activity…``) or the Activity tab on the left side of the settings
|
||||||
window, provides an in-depth account of the recent sync activity. It will show
|
window, provides an in-depth account of the recent sync activity. It will show
|
||||||
files that have not been synced because they are on the ignored files list, or
|
files that have not been synced because they are on the ignored files list, or
|
||||||
because they cannot be synced in a cross-platform manner due to containing
|
because they cannot be synced in a cross-platform manner due to containing
|
||||||
|
|||||||
BIN
resources/add.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
1
resources/state-info.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4.2333 4.2333" version="1.1" height="16" width="16"><g id="g3830" transform="matrix(.87498 0 0 .87498 .26458 -255.9)"><circle id="circle3818" stroke-width=".25066" fill="#2268ab" r="2.1167" cy="294.88" cx="2.1167" /><g id="g3828" stroke-linejoin="round" stroke-linecap="round" fill="none" /></g><path style="fill:#ffffff;stroke-width:0.17859235" d="m 1.6076619,2.1122981 c 0.027682,0.068222 0.058043,0.1232286 0.115014,0.043934 0.072686,-0.047862 0.314322,-0.2548509 0.29682,-0.061078 C 1.953774,2.4553739 1.8705497,2.8125586 1.8105428,3.1738508 1.7403561,3.3728027 1.9237704,3.5430012 2.1028984,3.4078068 2.295421,3.3181535 2.4582973,3.1779584 2.6256382,3.0488362 2.599921,2.9911507 2.5809903,2.9077482 2.5191973,2.9868644 2.4356161,3.0297263 2.2566665,3.2222491 2.2163047,3.07116 2.2725613,2.681829 2.3904322,2.3041062 2.4600833,1.9170966 2.5309844,1.7376113 2.3950755,1.5200858 2.210054,1.6736753 1.985742,1.7836882 1.8010774,1.9562083 1.6076619,2.1122981 Z M 2.4041839,0.77839186 C 2.1702279,0.77446305 2.0636081,1.1609366 2.2889917,1.2561264 2.4716917,1.3236342 2.659928,1.1286114 2.6086721,0.94358974 2.5911701,0.8467927 2.5018738,0.77035521 2.4038266,0.77749894 Z" /></svg>
|
||||||
|
After Width: | Height: | Size: 1.2 KiB |
@@ -467,6 +467,7 @@
|
|||||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||||
CODE_SIGN_ENTITLEMENTS = FinderSyncExt/FinderSyncExt.entitlements;
|
CODE_SIGN_ENTITLEMENTS = FinderSyncExt/FinderSyncExt.entitlements;
|
||||||
CODE_SIGN_IDENTITY = "-";
|
CODE_SIGN_IDENTITY = "-";
|
||||||
|
CODE_SIGN_INJECT_BASE_ENTITLEMENTS = NO;
|
||||||
COMBINE_HIDPI_IMAGES = YES;
|
COMBINE_HIDPI_IMAGES = YES;
|
||||||
COPY_PHASE_STRIP = NO;
|
COPY_PHASE_STRIP = NO;
|
||||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||||
|
|||||||
@@ -35,11 +35,11 @@ public:
|
|||||||
|
|
||||||
QString contextMenuTitle() const
|
QString contextMenuTitle() const
|
||||||
{
|
{
|
||||||
return _strings.value("CONTEXT_MENU_TITLE", "ownCloud");
|
return _strings.value("CONTEXT_MENU_TITLE", "Nextcloud");
|
||||||
}
|
}
|
||||||
QString shareActionTitle() const
|
QString shareActionTitle() const
|
||||||
{
|
{
|
||||||
return _strings.value("SHARE_MENU_TITLE", "Share...");
|
return _strings.value("SHARE_MENU_TITLE", "Share …");
|
||||||
}
|
}
|
||||||
|
|
||||||
QString copyPrivateLinkTitle() const { return _strings["COPY_PRIVATE_LINK_MENU_TITLE"]; }
|
QString copyPrivateLinkTitle() const { return _strings["COPY_PRIVATE_LINK_MENU_TITLE"]; }
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ macro(libcloudproviders_add_config _sources)
|
|||||||
endmacro(libcloudproviders_add_config _sources)
|
endmacro(libcloudproviders_add_config _sources)
|
||||||
|
|
||||||
|
|
||||||
|
find_package(Qt5 5.6 COMPONENTS DBus)
|
||||||
IF (UNIX AND Qt5DBus_FOUND AND LIBCLOUDPROVIDERS_FOUND)
|
IF (UNIX AND Qt5DBus_FOUND AND LIBCLOUDPROVIDERS_FOUND)
|
||||||
STRING(TOLOWER "${APPLICATION_VENDOR}" DBUS_VENDOR)
|
STRING(TOLOWER "${APPLICATION_VENDOR}" DBUS_VENDOR)
|
||||||
STRING(REGEX REPLACE "[^A-z0-9]" "" DBUS_VENDOR "${DBUS_VENDOR}")
|
STRING(REGEX REPLACE "[^A-z0-9]" "" DBUS_VENDOR "${DBUS_VENDOR}")
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ IFACEMETHODIMP OCContextMenu::Initialize(
|
|||||||
HDROP hDrop = static_cast<HDROP>(GlobalLock(stm.hGlobal));
|
HDROP hDrop = static_cast<HDROP>(GlobalLock(stm.hGlobal));
|
||||||
if (hDrop) {
|
if (hDrop) {
|
||||||
UINT nFiles = DragQueryFile(hDrop, 0xFFFFFFFF, NULL, 0);
|
UINT nFiles = DragQueryFile(hDrop, 0xFFFFFFFF, NULL, 0);
|
||||||
for (int i = 0; i < nFiles; ++i) {
|
for (UINT i = 0; i < nFiles; ++i) {
|
||||||
// Get the path of the file.
|
// Get the path of the file.
|
||||||
wchar_t buffer[MAX_PATH];
|
wchar_t buffer[MAX_PATH];
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,8 @@
|
|||||||
// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and
|
// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and
|
||||||
// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h.
|
// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h.
|
||||||
|
|
||||||
#define WINVER 0x0501
|
// Note: Here was a #define for windows target version
|
||||||
#define _WIN32_WINNT 0x0501
|
// e.g. WINVER / _WIN32_WINNT, see https://devblogs.microsoft.com/oldnewthing/20070411-00/?p=27283
|
||||||
|
// Unnecessary because we define both in desktop/CMakeLists.txt
|
||||||
|
|
||||||
#include <SDKDDKVer.h>
|
#include <SDKDDKVer.h>
|
||||||
|
|||||||
@@ -13,8 +13,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
#define WINVER 0x0501
|
|
||||||
#define _WIN32_WINNT 0x0501
|
// Note: Here was a #define for windows target version
|
||||||
|
// e.g. WINVER / _WIN32_WINNT, see https://devblogs.microsoft.com/oldnewthing/20070411-00/?p=27283
|
||||||
|
// Unnecessary because we define both in desktop/CMakeLists.txt
|
||||||
|
|
||||||
#include "CommunicationSocket.h"
|
#include "CommunicationSocket.h"
|
||||||
#include "RegistryUtil.h"
|
#include "RegistryUtil.h"
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
#define WINVER 0x0501
|
|
||||||
#define _WIN32_WINNT 0x0501
|
// Note: Here was a #define for windows target version
|
||||||
|
// e.g. WINVER / _WIN32_WINNT, see https://devblogs.microsoft.com/oldnewthing/20070411-00/?p=27283
|
||||||
|
// Unnecessary because we define both in desktop/CMakeLists.txt
|
||||||
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|||||||
512
src/3rdparty/kmessagewidget/kmessagewidget.cpp
vendored
Normal file
@@ -0,0 +1,512 @@
|
|||||||
|
/* This file is part of the KDE libraries
|
||||||
|
*
|
||||||
|
* Copyright (c) 2011 Aurélien Gâteau <agateau@kde.org>
|
||||||
|
* Copyright (c) 2014 Dominik Haumann <dhaumann@kde.org>
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library 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
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
|
* 02110-1301 USA
|
||||||
|
*/
|
||||||
|
#include "kmessagewidget.h"
|
||||||
|
|
||||||
|
#include <QAction>
|
||||||
|
#include <QApplication>
|
||||||
|
#include <QEvent>
|
||||||
|
#include <QGridLayout>
|
||||||
|
#include <QHBoxLayout>
|
||||||
|
#include <QLabel>
|
||||||
|
#include <QPainter>
|
||||||
|
#include <QShowEvent>
|
||||||
|
#include <QTimeLine>
|
||||||
|
#include <QToolButton>
|
||||||
|
#include <QStyle>
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------
|
||||||
|
// KMessageWidgetPrivate
|
||||||
|
//---------------------------------------------------------------------
|
||||||
|
class KMessageWidgetPrivate
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
void init(KMessageWidget *);
|
||||||
|
|
||||||
|
KMessageWidget *q;
|
||||||
|
QFrame *content = nullptr;
|
||||||
|
QLabel *iconLabel = nullptr;
|
||||||
|
QLabel *textLabel = nullptr;
|
||||||
|
QToolButton *closeButton = nullptr;
|
||||||
|
QTimeLine *timeLine = nullptr;
|
||||||
|
QIcon icon;
|
||||||
|
bool ignoreShowEventDoingAnimatedShow = false;
|
||||||
|
|
||||||
|
KMessageWidget::MessageType messageType;
|
||||||
|
bool wordWrap;
|
||||||
|
QList<QToolButton *> buttons;
|
||||||
|
QPixmap contentSnapShot;
|
||||||
|
|
||||||
|
void createLayout();
|
||||||
|
void applyStyleSheet();
|
||||||
|
void updateSnapShot();
|
||||||
|
void updateLayout();
|
||||||
|
void slotTimeLineChanged(qreal);
|
||||||
|
void slotTimeLineFinished();
|
||||||
|
|
||||||
|
int bestContentHeight() const;
|
||||||
|
};
|
||||||
|
|
||||||
|
void KMessageWidgetPrivate::init(KMessageWidget *q_ptr)
|
||||||
|
{
|
||||||
|
q = q_ptr;
|
||||||
|
|
||||||
|
q->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
|
||||||
|
|
||||||
|
// Note: when changing the value 500, also update KMessageWidgetTest
|
||||||
|
timeLine = new QTimeLine(500, q);
|
||||||
|
QObject::connect(timeLine, SIGNAL(valueChanged(qreal)), q, SLOT(slotTimeLineChanged(qreal)));
|
||||||
|
QObject::connect(timeLine, SIGNAL(finished()), q, SLOT(slotTimeLineFinished()));
|
||||||
|
|
||||||
|
content = new QFrame(q);
|
||||||
|
content->setObjectName(QStringLiteral("contentWidget"));
|
||||||
|
content->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
|
||||||
|
|
||||||
|
wordWrap = false;
|
||||||
|
|
||||||
|
iconLabel = new QLabel(content);
|
||||||
|
iconLabel->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
|
||||||
|
iconLabel->hide();
|
||||||
|
|
||||||
|
textLabel = new QLabel(content);
|
||||||
|
textLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
|
||||||
|
textLabel->setTextInteractionFlags(Qt::TextBrowserInteraction);
|
||||||
|
QObject::connect(textLabel, &QLabel::linkActivated, q, &KMessageWidget::linkActivated);
|
||||||
|
QObject::connect(textLabel, &QLabel::linkHovered, q, &KMessageWidget::linkHovered);
|
||||||
|
|
||||||
|
QAction *closeAction = new QAction(q);
|
||||||
|
closeAction->setText(KMessageWidget::tr("&Close"));
|
||||||
|
closeAction->setToolTip(KMessageWidget::tr("Close message"));
|
||||||
|
closeAction->setIcon(QIcon(":/client/resources/close.svg")); // ivan: NC customization
|
||||||
|
|
||||||
|
QObject::connect(closeAction, &QAction::triggered, q, &KMessageWidget::animatedHide);
|
||||||
|
|
||||||
|
closeButton = new QToolButton(content);
|
||||||
|
closeButton->setAutoRaise(true);
|
||||||
|
closeButton->setDefaultAction(closeAction);
|
||||||
|
|
||||||
|
q->setMessageType(KMessageWidget::Information);
|
||||||
|
}
|
||||||
|
|
||||||
|
void KMessageWidgetPrivate::createLayout()
|
||||||
|
{
|
||||||
|
delete content->layout();
|
||||||
|
|
||||||
|
content->resize(q->size());
|
||||||
|
|
||||||
|
qDeleteAll(buttons);
|
||||||
|
buttons.clear();
|
||||||
|
|
||||||
|
Q_FOREACH (QAction *action, q->actions()) {
|
||||||
|
QToolButton *button = new QToolButton(content);
|
||||||
|
button->setDefaultAction(action);
|
||||||
|
button->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
|
||||||
|
buttons.append(button);
|
||||||
|
}
|
||||||
|
|
||||||
|
// AutoRaise reduces visual clutter, but we don't want to turn it on if
|
||||||
|
// there are other buttons, otherwise the close button will look different
|
||||||
|
// from the others.
|
||||||
|
closeButton->setAutoRaise(buttons.isEmpty());
|
||||||
|
|
||||||
|
if (wordWrap) {
|
||||||
|
QGridLayout *layout = new QGridLayout(content);
|
||||||
|
// Set alignment to make sure icon does not move down if text wraps
|
||||||
|
layout->addWidget(iconLabel, 0, 0, 1, 1, Qt::AlignHCenter | Qt::AlignTop);
|
||||||
|
layout->addWidget(textLabel, 0, 1);
|
||||||
|
|
||||||
|
if (buttons.isEmpty()) {
|
||||||
|
// Use top-vertical alignment like the icon does.
|
||||||
|
layout->addWidget(closeButton, 0, 2, 1, 1, Qt::AlignHCenter | Qt::AlignTop);
|
||||||
|
} else {
|
||||||
|
// Use an additional layout in row 1 for the buttons.
|
||||||
|
QHBoxLayout *buttonLayout = new QHBoxLayout;
|
||||||
|
buttonLayout->addStretch();
|
||||||
|
Q_FOREACH (QToolButton *button, buttons) {
|
||||||
|
// For some reason, calling show() is necessary if wordwrap is true,
|
||||||
|
// otherwise the buttons do not show up. It is not needed if
|
||||||
|
// wordwrap is false.
|
||||||
|
button->show();
|
||||||
|
buttonLayout->addWidget(button);
|
||||||
|
}
|
||||||
|
buttonLayout->addWidget(closeButton);
|
||||||
|
layout->addItem(buttonLayout, 1, 0, 1, 2);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
QHBoxLayout *layout = new QHBoxLayout(content);
|
||||||
|
layout->addWidget(iconLabel);
|
||||||
|
layout->addWidget(textLabel);
|
||||||
|
|
||||||
|
for (QToolButton *button : qAsConst(buttons)) {
|
||||||
|
layout->addWidget(button);
|
||||||
|
}
|
||||||
|
|
||||||
|
layout->addWidget(closeButton);
|
||||||
|
};
|
||||||
|
|
||||||
|
if (q->isVisible()) {
|
||||||
|
q->setFixedHeight(content->sizeHint().height());
|
||||||
|
}
|
||||||
|
q->updateGeometry();
|
||||||
|
}
|
||||||
|
|
||||||
|
void KMessageWidgetPrivate::applyStyleSheet()
|
||||||
|
{
|
||||||
|
QColor bgBaseColor;
|
||||||
|
|
||||||
|
// We have to hardcode colors here because KWidgetsAddons is a tier 1 framework
|
||||||
|
// and therefore can't depend on any other KDE Frameworks
|
||||||
|
// The following RGB color values come from the "default" scheme in kcolorscheme.cpp
|
||||||
|
switch (messageType) {
|
||||||
|
case KMessageWidget::Positive:
|
||||||
|
bgBaseColor.setRgb(39, 174, 96); // Window: ForegroundPositive
|
||||||
|
break;
|
||||||
|
case KMessageWidget::Information:
|
||||||
|
bgBaseColor.setRgb(61, 174, 233); // Window: ForegroundActive
|
||||||
|
break;
|
||||||
|
case KMessageWidget::Warning:
|
||||||
|
bgBaseColor.setRgb(246, 116, 0); // Window: ForegroundNeutral
|
||||||
|
break;
|
||||||
|
case KMessageWidget::Error:
|
||||||
|
bgBaseColor.setRgb(218, 68, 83); // Window: ForegroundNegative
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
const qreal bgBaseColorAlpha = 0.2;
|
||||||
|
bgBaseColor.setAlphaF(bgBaseColorAlpha);
|
||||||
|
|
||||||
|
const QPalette palette = QGuiApplication::palette();
|
||||||
|
const QColor windowColor = palette.window().color();
|
||||||
|
const QColor textColor = palette.text().color();
|
||||||
|
const QColor border = bgBaseColor;
|
||||||
|
|
||||||
|
// Generate a final background color from overlaying bgBaseColor over windowColor
|
||||||
|
const int newRed = (bgBaseColor.red() * bgBaseColorAlpha) + (windowColor.red() * (1 - bgBaseColorAlpha));
|
||||||
|
const int newGreen = (bgBaseColor.green() * bgBaseColorAlpha) + (windowColor.green() * (1 - bgBaseColorAlpha));
|
||||||
|
const int newBlue = (bgBaseColor.blue() * bgBaseColorAlpha) + (windowColor.blue() * (1 - bgBaseColorAlpha));
|
||||||
|
|
||||||
|
const QColor bgFinalColor = QColor(newRed, newGreen, newBlue);
|
||||||
|
|
||||||
|
content->setStyleSheet(
|
||||||
|
QString::fromLatin1(".QFrame {"
|
||||||
|
"background-color: %1;"
|
||||||
|
"border-radius: 4px;"
|
||||||
|
"border: 2px solid %2;"
|
||||||
|
"margin: %3px;"
|
||||||
|
"}"
|
||||||
|
".QLabel { color: %4; }"
|
||||||
|
)
|
||||||
|
.arg(bgFinalColor.name())
|
||||||
|
.arg(border.name())
|
||||||
|
// DefaultFrameWidth returns the size of the external margin + border width. We know our border is 1px, so we subtract this from the frame normal QStyle FrameWidth to get our margin
|
||||||
|
.arg(q->style()->pixelMetric(QStyle::PM_DefaultFrameWidth, nullptr, q) - 1)
|
||||||
|
.arg(textColor.name())
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
void KMessageWidgetPrivate::updateLayout()
|
||||||
|
{
|
||||||
|
if (content->layout()) {
|
||||||
|
createLayout();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void KMessageWidgetPrivate::updateSnapShot()
|
||||||
|
{
|
||||||
|
// Attention: updateSnapShot calls QWidget::render(), which causes the whole
|
||||||
|
// window layouts to be activated. Calling this method from resizeEvent()
|
||||||
|
// can lead to infinite recursion, see:
|
||||||
|
// https://bugs.kde.org/show_bug.cgi?id=311336
|
||||||
|
contentSnapShot = QPixmap(content->size() * q->devicePixelRatio());
|
||||||
|
contentSnapShot.setDevicePixelRatio(q->devicePixelRatio());
|
||||||
|
contentSnapShot.fill(Qt::transparent);
|
||||||
|
content->render(&contentSnapShot, QPoint(), QRegion(), QWidget::DrawChildren);
|
||||||
|
}
|
||||||
|
|
||||||
|
void KMessageWidgetPrivate::slotTimeLineChanged(qreal value)
|
||||||
|
{
|
||||||
|
q->setFixedHeight(qMin(value * 2, qreal(1.0)) * content->height());
|
||||||
|
q->update();
|
||||||
|
}
|
||||||
|
|
||||||
|
void KMessageWidgetPrivate::slotTimeLineFinished()
|
||||||
|
{
|
||||||
|
if (timeLine->direction() == QTimeLine::Forward) {
|
||||||
|
// Show
|
||||||
|
// We set the whole geometry here, because it may be wrong if a
|
||||||
|
// KMessageWidget is shown right when the toplevel window is created.
|
||||||
|
content->setGeometry(0, 0, q->width(), bestContentHeight());
|
||||||
|
|
||||||
|
// notify about finished animation
|
||||||
|
emit q->showAnimationFinished();
|
||||||
|
} else {
|
||||||
|
// hide and notify about finished animation
|
||||||
|
q->hide();
|
||||||
|
emit q->hideAnimationFinished();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int KMessageWidgetPrivate::bestContentHeight() const
|
||||||
|
{
|
||||||
|
int height = content->heightForWidth(q->width());
|
||||||
|
if (height == -1) {
|
||||||
|
height = content->sizeHint().height();
|
||||||
|
}
|
||||||
|
return height;
|
||||||
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------
|
||||||
|
// KMessageWidget
|
||||||
|
//---------------------------------------------------------------------
|
||||||
|
KMessageWidget::KMessageWidget(QWidget *parent)
|
||||||
|
: QFrame(parent)
|
||||||
|
, d(new KMessageWidgetPrivate)
|
||||||
|
{
|
||||||
|
d->init(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
KMessageWidget::KMessageWidget(const QString &text, QWidget *parent)
|
||||||
|
: QFrame(parent)
|
||||||
|
, d(new KMessageWidgetPrivate)
|
||||||
|
{
|
||||||
|
d->init(this);
|
||||||
|
setText(text);
|
||||||
|
}
|
||||||
|
|
||||||
|
KMessageWidget::~KMessageWidget()
|
||||||
|
{
|
||||||
|
delete d;
|
||||||
|
}
|
||||||
|
|
||||||
|
QString KMessageWidget::text() const
|
||||||
|
{
|
||||||
|
return d->textLabel->text();
|
||||||
|
}
|
||||||
|
|
||||||
|
void KMessageWidget::setText(const QString &text)
|
||||||
|
{
|
||||||
|
d->textLabel->setText(text);
|
||||||
|
updateGeometry();
|
||||||
|
}
|
||||||
|
|
||||||
|
KMessageWidget::MessageType KMessageWidget::messageType() const
|
||||||
|
{
|
||||||
|
return d->messageType;
|
||||||
|
}
|
||||||
|
|
||||||
|
void KMessageWidget::setMessageType(KMessageWidget::MessageType type)
|
||||||
|
{
|
||||||
|
d->messageType = type;
|
||||||
|
d->applyStyleSheet();
|
||||||
|
}
|
||||||
|
|
||||||
|
QSize KMessageWidget::sizeHint() const
|
||||||
|
{
|
||||||
|
ensurePolished();
|
||||||
|
return d->content->sizeHint();
|
||||||
|
}
|
||||||
|
|
||||||
|
QSize KMessageWidget::minimumSizeHint() const
|
||||||
|
{
|
||||||
|
ensurePolished();
|
||||||
|
return d->content->minimumSizeHint();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool KMessageWidget::event(QEvent *event)
|
||||||
|
{
|
||||||
|
if (event->type() == QEvent::Polish && !d->content->layout()) {
|
||||||
|
d->createLayout();
|
||||||
|
} else if (event->type() == QEvent::PaletteChange) {
|
||||||
|
d->applyStyleSheet();
|
||||||
|
} else if (event->type() == QEvent::Show && !d->ignoreShowEventDoingAnimatedShow) {
|
||||||
|
if ((height() != d->content->height()) || (d->content->pos().y() != 0)) {
|
||||||
|
d->content->move(0, 0);
|
||||||
|
setFixedHeight(d->content->height());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return QFrame::event(event);
|
||||||
|
}
|
||||||
|
|
||||||
|
void KMessageWidget::resizeEvent(QResizeEvent *event)
|
||||||
|
{
|
||||||
|
QFrame::resizeEvent(event);
|
||||||
|
|
||||||
|
if (d->timeLine->state() == QTimeLine::NotRunning) {
|
||||||
|
d->content->resize(width(), d->bestContentHeight());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int KMessageWidget::heightForWidth(int width) const
|
||||||
|
{
|
||||||
|
ensurePolished();
|
||||||
|
return d->content->heightForWidth(width);
|
||||||
|
}
|
||||||
|
|
||||||
|
void KMessageWidget::paintEvent(QPaintEvent *event)
|
||||||
|
{
|
||||||
|
QFrame::paintEvent(event);
|
||||||
|
if (d->timeLine->state() == QTimeLine::Running) {
|
||||||
|
QPainter painter(this);
|
||||||
|
painter.setOpacity(d->timeLine->currentValue() * d->timeLine->currentValue());
|
||||||
|
painter.drawPixmap(0, 0, d->contentSnapShot);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool KMessageWidget::wordWrap() const
|
||||||
|
{
|
||||||
|
return d->wordWrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
void KMessageWidget::setWordWrap(bool wordWrap)
|
||||||
|
{
|
||||||
|
d->wordWrap = wordWrap;
|
||||||
|
d->textLabel->setWordWrap(wordWrap);
|
||||||
|
QSizePolicy policy = sizePolicy();
|
||||||
|
policy.setHeightForWidth(wordWrap);
|
||||||
|
setSizePolicy(policy);
|
||||||
|
d->updateLayout();
|
||||||
|
// Without this, when user does wordWrap -> !wordWrap -> wordWrap, a minimum
|
||||||
|
// height is set, causing the widget to be too high.
|
||||||
|
// Mostly visible in test programs.
|
||||||
|
if (wordWrap) {
|
||||||
|
setMinimumHeight(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool KMessageWidget::isCloseButtonVisible() const
|
||||||
|
{
|
||||||
|
return d->closeButton->isVisible();
|
||||||
|
}
|
||||||
|
|
||||||
|
void KMessageWidget::setCloseButtonVisible(bool show)
|
||||||
|
{
|
||||||
|
d->closeButton->setVisible(show);
|
||||||
|
updateGeometry();
|
||||||
|
}
|
||||||
|
|
||||||
|
void KMessageWidget::addAction(QAction *action)
|
||||||
|
{
|
||||||
|
QFrame::addAction(action);
|
||||||
|
d->updateLayout();
|
||||||
|
}
|
||||||
|
|
||||||
|
void KMessageWidget::removeAction(QAction *action)
|
||||||
|
{
|
||||||
|
QFrame::removeAction(action);
|
||||||
|
d->updateLayout();
|
||||||
|
}
|
||||||
|
|
||||||
|
void KMessageWidget::animatedShow()
|
||||||
|
{
|
||||||
|
// Test before styleHint, as there might have been a style change while animation was running
|
||||||
|
if (isHideAnimationRunning()) {
|
||||||
|
d->timeLine->stop();
|
||||||
|
emit hideAnimationFinished();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!style()->styleHint(QStyle::SH_Widget_Animate, nullptr, this)
|
||||||
|
|| (parentWidget() && !parentWidget()->isVisible())) {
|
||||||
|
show();
|
||||||
|
emit showAnimationFinished();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isVisible() && (d->timeLine->state() == QTimeLine::NotRunning) && (height() == d->bestContentHeight()) && (d->content->pos().y() == 0)) {
|
||||||
|
emit showAnimationFinished();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
d->ignoreShowEventDoingAnimatedShow = true;
|
||||||
|
show();
|
||||||
|
d->ignoreShowEventDoingAnimatedShow = false;
|
||||||
|
setFixedHeight(0);
|
||||||
|
int wantedHeight = d->bestContentHeight();
|
||||||
|
d->content->setGeometry(0, -wantedHeight, width(), wantedHeight);
|
||||||
|
|
||||||
|
d->updateSnapShot();
|
||||||
|
|
||||||
|
d->timeLine->setDirection(QTimeLine::Forward);
|
||||||
|
if (d->timeLine->state() == QTimeLine::NotRunning) {
|
||||||
|
d->timeLine->start();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void KMessageWidget::animatedHide()
|
||||||
|
{
|
||||||
|
// test this before isVisible, as animatedShow might have been called directly before,
|
||||||
|
// so the first timeline event is not yet done and the widget is still hidden
|
||||||
|
// And before styleHint, as there might have been a style change while animation was running
|
||||||
|
if (isShowAnimationRunning()) {
|
||||||
|
d->timeLine->stop();
|
||||||
|
emit showAnimationFinished();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!style()->styleHint(QStyle::SH_Widget_Animate, nullptr, this)) {
|
||||||
|
hide();
|
||||||
|
emit hideAnimationFinished();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!isVisible()) {
|
||||||
|
// explicitly hide it, so it stays hidden in case it is only not visible due to the parents
|
||||||
|
hide();
|
||||||
|
emit hideAnimationFinished();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
d->content->move(0, -d->content->height());
|
||||||
|
d->updateSnapShot();
|
||||||
|
|
||||||
|
d->timeLine->setDirection(QTimeLine::Backward);
|
||||||
|
if (d->timeLine->state() == QTimeLine::NotRunning) {
|
||||||
|
d->timeLine->start();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool KMessageWidget::isHideAnimationRunning() const
|
||||||
|
{
|
||||||
|
return (d->timeLine->direction() == QTimeLine::Backward)
|
||||||
|
&& (d->timeLine->state() == QTimeLine::Running);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool KMessageWidget::isShowAnimationRunning() const
|
||||||
|
{
|
||||||
|
return (d->timeLine->direction() == QTimeLine::Forward)
|
||||||
|
&& (d->timeLine->state() == QTimeLine::Running);
|
||||||
|
}
|
||||||
|
|
||||||
|
QIcon KMessageWidget::icon() const
|
||||||
|
{
|
||||||
|
return d->icon;
|
||||||
|
}
|
||||||
|
|
||||||
|
void KMessageWidget::setIcon(const QIcon &icon)
|
||||||
|
{
|
||||||
|
d->icon = icon;
|
||||||
|
if (d->icon.isNull()) {
|
||||||
|
d->iconLabel->hide();
|
||||||
|
} else {
|
||||||
|
const int size = style()->pixelMetric(QStyle::PM_ToolBarIconSize);
|
||||||
|
d->iconLabel->setPixmap(d->icon.pixmap(size));
|
||||||
|
d->iconLabel->show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#include "moc_kmessagewidget.cpp"
|
||||||
|
|
||||||
346
src/3rdparty/kmessagewidget/kmessagewidget.h
vendored
Normal file
@@ -0,0 +1,346 @@
|
|||||||
|
/* This file is part of the KDE libraries
|
||||||
|
*
|
||||||
|
* Copyright (c) 2011 Aurélien Gâteau <agateau@kde.org>
|
||||||
|
* Copyright (c) 2014 Dominik Haumann <dhaumann@kde.org>
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library 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
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
|
* 02110-1301 USA
|
||||||
|
*/
|
||||||
|
#ifndef KMESSAGEWIDGET_H
|
||||||
|
#define KMESSAGEWIDGET_H
|
||||||
|
|
||||||
|
#include <QFrame>
|
||||||
|
|
||||||
|
class KMessageWidgetPrivate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @class KMessageWidget kmessagewidget.h KMessageWidget
|
||||||
|
*
|
||||||
|
* @short A widget to provide feedback or propose opportunistic interactions.
|
||||||
|
*
|
||||||
|
* KMessageWidget can be used to provide inline positive or negative
|
||||||
|
* feedback, or to implement opportunistic interactions.
|
||||||
|
*
|
||||||
|
* As a feedback widget, KMessageWidget provides a less intrusive alternative
|
||||||
|
* to "OK Only" message boxes. If you want to avoid a modal KMessageBox,
|
||||||
|
* consider using KMessageWidget instead.
|
||||||
|
*
|
||||||
|
* Examples of KMessageWidget look as follows, all of them having an icon set
|
||||||
|
* with setIcon(), and the first three show a close button:
|
||||||
|
*
|
||||||
|
* \image html kmessagewidget.png "KMessageWidget with different message types"
|
||||||
|
*
|
||||||
|
* <b>Negative feedback</b>
|
||||||
|
*
|
||||||
|
* The KMessageWidget can be used as a secondary indicator of failure: the
|
||||||
|
* first indicator is usually the fact the action the user expected to happen
|
||||||
|
* did not happen.
|
||||||
|
*
|
||||||
|
* Example: User fills a form, clicks "Submit".
|
||||||
|
*
|
||||||
|
* @li Expected feedback: form closes
|
||||||
|
* @li First indicator of failure: form stays there
|
||||||
|
* @li Second indicator of failure: a KMessageWidget appears on top of the
|
||||||
|
* form, explaining the error condition
|
||||||
|
*
|
||||||
|
* When used to provide negative feedback, KMessageWidget should be placed
|
||||||
|
* close to its context. In the case of a form, it should appear on top of the
|
||||||
|
* form entries.
|
||||||
|
*
|
||||||
|
* KMessageWidget should get inserted in the existing layout. Space should not
|
||||||
|
* be reserved for it, otherwise it becomes "dead space", ignored by the user.
|
||||||
|
* KMessageWidget should also not appear as an overlay to prevent blocking
|
||||||
|
* access to elements the user needs to interact with to fix the failure.
|
||||||
|
*
|
||||||
|
* <b>Positive feedback</b>
|
||||||
|
*
|
||||||
|
* KMessageWidget can be used for positive feedback but it shouldn't be
|
||||||
|
* overused. It is often enough to provide feedback by simply showing the
|
||||||
|
* results of an action.
|
||||||
|
*
|
||||||
|
* Examples of acceptable uses:
|
||||||
|
*
|
||||||
|
* @li Confirm success of "critical" transactions
|
||||||
|
* @li Indicate completion of background tasks
|
||||||
|
*
|
||||||
|
* Example of unadapted uses:
|
||||||
|
*
|
||||||
|
* @li Indicate successful saving of a file
|
||||||
|
* @li Indicate a file has been successfully removed
|
||||||
|
*
|
||||||
|
* <b>Opportunistic interaction</b>
|
||||||
|
*
|
||||||
|
* Opportunistic interaction is the situation where the application suggests to
|
||||||
|
* the user an action he could be interested in perform, either based on an
|
||||||
|
* action the user just triggered or an event which the application noticed.
|
||||||
|
*
|
||||||
|
* Example of acceptable uses:
|
||||||
|
*
|
||||||
|
* @li A browser can propose remembering a recently entered password
|
||||||
|
* @li A music collection can propose ripping a CD which just got inserted
|
||||||
|
* @li A chat application may notify the user a "special friend" just connected
|
||||||
|
*
|
||||||
|
* @author Aurélien Gâteau <agateau@kde.org>
|
||||||
|
* @since 4.7
|
||||||
|
*/
|
||||||
|
class KMessageWidget : public QFrame
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
Q_PROPERTY(QString text READ text WRITE setText)
|
||||||
|
Q_PROPERTY(bool wordWrap READ wordWrap WRITE setWordWrap)
|
||||||
|
Q_PROPERTY(bool closeButtonVisible READ isCloseButtonVisible WRITE setCloseButtonVisible)
|
||||||
|
Q_PROPERTY(MessageType messageType READ messageType WRITE setMessageType)
|
||||||
|
Q_PROPERTY(QIcon icon READ icon WRITE setIcon)
|
||||||
|
public:
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Available message types.
|
||||||
|
* The background colors are chosen depending on the message type.
|
||||||
|
*/
|
||||||
|
enum MessageType {
|
||||||
|
Positive,
|
||||||
|
Information,
|
||||||
|
Warning,
|
||||||
|
Error
|
||||||
|
};
|
||||||
|
Q_ENUM(MessageType)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructs a KMessageWidget with the specified @p parent.
|
||||||
|
*/
|
||||||
|
explicit KMessageWidget(QWidget *parent = nullptr);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructs a KMessageWidget with the specified @p parent and
|
||||||
|
* contents @p text.
|
||||||
|
*/
|
||||||
|
explicit KMessageWidget(const QString &text, QWidget *parent = nullptr);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Destructor.
|
||||||
|
*/
|
||||||
|
~KMessageWidget() override;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the text of this message widget.
|
||||||
|
* @see setText()
|
||||||
|
*/
|
||||||
|
QString text() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check whether word wrap is enabled.
|
||||||
|
*
|
||||||
|
* If word wrap is enabled, the message widget wraps the displayed text
|
||||||
|
* as required to the available width of the widget. This is useful to
|
||||||
|
* avoid breaking widget layouts.
|
||||||
|
*
|
||||||
|
* @see setWordWrap()
|
||||||
|
*/
|
||||||
|
bool wordWrap() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check whether the close button is visible.
|
||||||
|
*
|
||||||
|
* @see setCloseButtonVisible()
|
||||||
|
*/
|
||||||
|
bool isCloseButtonVisible() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the type of this message.
|
||||||
|
* By default, the type is set to KMessageWidget::Information.
|
||||||
|
*
|
||||||
|
* @see KMessageWidget::MessageType, setMessageType()
|
||||||
|
*/
|
||||||
|
MessageType messageType() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add @p action to the message widget.
|
||||||
|
* For each action a button is added to the message widget in the
|
||||||
|
* order the actions were added.
|
||||||
|
*
|
||||||
|
* @param action the action to add
|
||||||
|
* @see removeAction(), QWidget::actions()
|
||||||
|
*/
|
||||||
|
void addAction(QAction *action);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove @p action from the message widget.
|
||||||
|
*
|
||||||
|
* @param action the action to remove
|
||||||
|
* @see KMessageWidget::MessageType, addAction(), setMessageType()
|
||||||
|
*/
|
||||||
|
void removeAction(QAction *action);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the preferred size of the message widget.
|
||||||
|
*/
|
||||||
|
QSize sizeHint() const override;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the minimum size of the message widget.
|
||||||
|
*/
|
||||||
|
QSize minimumSizeHint() const override;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the required height for @p width.
|
||||||
|
* @param width the width in pixels
|
||||||
|
*/
|
||||||
|
int heightForWidth(int width) const override;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The icon shown on the left of the text. By default, no icon is shown.
|
||||||
|
* @since 4.11
|
||||||
|
*/
|
||||||
|
QIcon icon() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check whether the hide animation started by calling animatedHide()
|
||||||
|
* is still running. If animations are disabled, this function always
|
||||||
|
* returns @e false.
|
||||||
|
*
|
||||||
|
* @see animatedHide(), hideAnimationFinished()
|
||||||
|
* @since 5.0
|
||||||
|
*/
|
||||||
|
bool isHideAnimationRunning() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check whether the show animation started by calling animatedShow()
|
||||||
|
* is still running. If animations are disabled, this function always
|
||||||
|
* returns @e false.
|
||||||
|
*
|
||||||
|
* @see animatedShow(), showAnimationFinished()
|
||||||
|
* @since 5.0
|
||||||
|
*/
|
||||||
|
bool isShowAnimationRunning() const;
|
||||||
|
|
||||||
|
public Q_SLOTS:
|
||||||
|
/**
|
||||||
|
* Set the text of the message widget to @p text.
|
||||||
|
* If the message widget is already visible, the text changes on the fly.
|
||||||
|
*
|
||||||
|
* @param text the text to display, rich text is allowed
|
||||||
|
* @see text()
|
||||||
|
*/
|
||||||
|
void setText(const QString &text);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set word wrap to @p wordWrap. If word wrap is enabled, the text()
|
||||||
|
* of the message widget is wrapped to fit the available width.
|
||||||
|
* If word wrap is disabled, the message widget's minimum size is
|
||||||
|
* such that the entire text fits.
|
||||||
|
*
|
||||||
|
* @param wordWrap disable/enable word wrap
|
||||||
|
* @see wordWrap()
|
||||||
|
*/
|
||||||
|
void setWordWrap(bool wordWrap);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the visibility of the close button. If @p visible is @e true,
|
||||||
|
* a close button is shown that calls animatedHide() if clicked.
|
||||||
|
*
|
||||||
|
* @see closeButtonVisible(), animatedHide()
|
||||||
|
*/
|
||||||
|
void setCloseButtonVisible(bool visible);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the message type to @p type.
|
||||||
|
* By default, the message type is set to KMessageWidget::Information.
|
||||||
|
* Appropriate colors are chosen to mimic the appearance of Kirigami's
|
||||||
|
* InlineMessage.
|
||||||
|
*
|
||||||
|
* @see messageType(), KMessageWidget::MessageType
|
||||||
|
*/
|
||||||
|
void setMessageType(KMessageWidget::MessageType type);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the widget using an animation.
|
||||||
|
*/
|
||||||
|
void animatedShow();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Hide the widget using an animation.
|
||||||
|
*/
|
||||||
|
void animatedHide();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Define an icon to be shown on the left of the text
|
||||||
|
* @since 4.11
|
||||||
|
*/
|
||||||
|
void setIcon(const QIcon &icon);
|
||||||
|
|
||||||
|
Q_SIGNALS:
|
||||||
|
/**
|
||||||
|
* This signal is emitted when the user clicks a link in the text label.
|
||||||
|
* The URL referred to by the href anchor is passed in contents.
|
||||||
|
* @param contents text of the href anchor
|
||||||
|
* @see QLabel::linkActivated()
|
||||||
|
* @since 4.10
|
||||||
|
*/
|
||||||
|
void linkActivated(const QString &contents);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This signal is emitted when the user hovers over a link in the text label.
|
||||||
|
* The URL referred to by the href anchor is passed in contents.
|
||||||
|
* @param contents text of the href anchor
|
||||||
|
* @see QLabel::linkHovered()
|
||||||
|
* @since 4.11
|
||||||
|
*/
|
||||||
|
void linkHovered(const QString &contents);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This signal is emitted when the hide animation is finished, started by
|
||||||
|
* calling animatedHide(). If animations are disabled, this signal is
|
||||||
|
* emitted immediately after the message widget got hidden.
|
||||||
|
*
|
||||||
|
* @note This signal is @e not emitted if the widget was hidden by
|
||||||
|
* calling hide(), so this signal is only useful in conjunction
|
||||||
|
* with animatedHide().
|
||||||
|
*
|
||||||
|
* @see animatedHide()
|
||||||
|
* @since 5.0
|
||||||
|
*/
|
||||||
|
void hideAnimationFinished();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This signal is emitted when the show animation is finished, started by
|
||||||
|
* calling animatedShow(). If animations are disabled, this signal is
|
||||||
|
* emitted immediately after the message widget got shown.
|
||||||
|
*
|
||||||
|
* @note This signal is @e not emitted if the widget was shown by
|
||||||
|
* calling show(), so this signal is only useful in conjunction
|
||||||
|
* with animatedShow().
|
||||||
|
*
|
||||||
|
* @see animatedShow()
|
||||||
|
* @since 5.0
|
||||||
|
*/
|
||||||
|
void showAnimationFinished();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void paintEvent(QPaintEvent *event) override;
|
||||||
|
|
||||||
|
bool event(QEvent *event) override;
|
||||||
|
|
||||||
|
void resizeEvent(QResizeEvent *event) override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
KMessageWidgetPrivate *const d;
|
||||||
|
friend class KMessageWidgetPrivate;
|
||||||
|
|
||||||
|
Q_PRIVATE_SLOT(d, void slotTimeLineChanged(qreal))
|
||||||
|
Q_PRIVATE_SLOT(d, void slotTimeLineFinished())
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /* KMESSAGEWIDGET_H */
|
||||||
2
src/3rdparty/libcrashreporter-qt
vendored
1
src/3rdparty/qtmacgoodies
vendored
@@ -29,12 +29,17 @@ if(NOT MSVC)
|
|||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_FORTIFY_SOURCE=2")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_FORTIFY_SOURCE=2")
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_FORTIFY_SOURCE=2")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_FORTIFY_SOURCE=2")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# Calling Qt's qCWarning(category, ...) with no params for "..." is a GNU
|
||||||
|
# extension (C++11 §16.3/4 forbids them). Silence clang's warnings.
|
||||||
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-gnu-zero-variadic-macro-arguments")
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-gnu-zero-variadic-macro-arguments")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
# Enable DEP & ASLR
|
# Enable DEP & ASLR
|
||||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--nxcompat -Wl,--dynamicbase")
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /nxcompat /dynamicbase")
|
||||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--nxcompat -Wl,--dynamicbase")
|
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /nxcompat /dynamicbase")
|
||||||
elseif(UNIX AND NOT APPLE)
|
elseif(UNIX AND NOT APPLE)
|
||||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-z,relro -Wl,-z,now")
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-z,relro -Wl,-z,now")
|
||||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,relro -Wl,-z,now")
|
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,relro -Wl,-z,now")
|
||||||
|
|||||||
@@ -11,43 +11,50 @@
|
|||||||
|
|
||||||
// For overloading macros by argument count
|
// For overloading macros by argument count
|
||||||
// See stackoverflow.com/questions/16683146/can-macros-be-overloaded-by-number-of-arguments
|
// See stackoverflow.com/questions/16683146/can-macros-be-overloaded-by-number-of-arguments
|
||||||
#define OC_ASSERT_CAT(A, B) A##B
|
// Bugfix 08/09/2019: Broken arg expansion led to always collapsing to 1 arg (XXXX_1 overload result)
|
||||||
#define OC_ASSERT_SELECT(NAME, NUM) OC_ASSERT_CAT(NAME##_, NUM)
|
// See also: https://stackoverflow.com/questions/9183993/msvc-variadic-macro-expansion
|
||||||
#define OC_ASSERT_GET_COUNT(_1, _2, _3, COUNT, ...) COUNT
|
#define OC_ASSERT_GLUE(x, y) x y
|
||||||
#define OC_ASSERT_VA_SIZE(...) OC_ASSERT_GET_COUNT(__VA_ARGS__, 3, 2, 1, 0)
|
|
||||||
|
|
||||||
#define OC_ASSERT_OVERLOAD(NAME, ...) OC_ASSERT_SELECT(NAME, OC_ASSERT_VA_SIZE(__VA_ARGS__)) \
|
#define OC_ASSERT_GET_COUNT(_1, _2, _3, COUNT, ...) COUNT
|
||||||
(__VA_ARGS__)
|
#define OC_ASSERT_EXPAND_ARGS(args) OC_ASSERT_GET_COUNT args
|
||||||
|
#define OC_ASSERT_VA_SIZE(...) OC_ASSERT_EXPAND_ARGS((__VA_ARGS__, 3, 2, 1, 0))
|
||||||
|
|
||||||
|
#define OC_ASSERT_SELECT2(NAME, COUNT) NAME##COUNT
|
||||||
|
#define OC_ASSERT_SELECT1(NAME, COUNT) OC_ASSERT_SELECT2(NAME, COUNT)
|
||||||
|
#define OC_ASSERT_SELECT(NAME, COUNT) OC_ASSERT_SELECT1(NAME, COUNT)
|
||||||
|
|
||||||
|
#define OC_ASSERT_OVERLOAD(NAME, ...) OC_ASSERT_GLUE(OC_ASSERT_SELECT(NAME, OC_ASSERT_VA_SIZE(__VA_ARGS__)), \
|
||||||
|
(__VA_ARGS__))
|
||||||
|
|
||||||
// Default assert: If the condition is false in debug builds, terminate.
|
// Default assert: If the condition is false in debug builds, terminate.
|
||||||
//
|
//
|
||||||
// Prints a message on failure, even in release builds.
|
// Prints a message on failure, even in release builds.
|
||||||
#define ASSERT(...) OC_ASSERT_OVERLOAD(ASSERT, __VA_ARGS__)
|
#define ASSERT1(cond) \
|
||||||
#define ASSERT_1(cond) \
|
|
||||||
if (!(cond)) { \
|
if (!(cond)) { \
|
||||||
OC_ASSERT_MSG("ASSERT: \"%s\" in file %s, line %d", #cond, __FILE__, __LINE__); \
|
OC_ASSERT_MSG("ASSERT: \"%s\" in file %s, line %d", #cond, __FILE__, __LINE__); \
|
||||||
} else { \
|
} else { \
|
||||||
}
|
}
|
||||||
#define ASSERT_2(cond, message) \
|
#define ASSERT2(cond, message) \
|
||||||
if (!(cond)) { \
|
if (!(cond)) { \
|
||||||
OC_ASSERT_MSG("ASSERT: \"%s\" in file %s, line %d with message: %s", #cond, __FILE__, __LINE__, message); \
|
OC_ASSERT_MSG("ASSERT: \"%s\" in file %s, line %d with message: %s", #cond, __FILE__, __LINE__, message); \
|
||||||
} else { \
|
} else { \
|
||||||
}
|
}
|
||||||
|
#define ASSERT(...) OC_ASSERT_OVERLOAD(ASSERT, __VA_ARGS__)
|
||||||
|
|
||||||
// Enforce condition to be true, even in release builds.
|
// Enforce condition to be true, even in release builds.
|
||||||
//
|
//
|
||||||
// Prints 'message' and aborts execution if 'cond' is false.
|
// Prints 'message' and aborts execution if 'cond' is false.
|
||||||
#define ENFORCE(...) OC_ASSERT_OVERLOAD(ENFORCE, __VA_ARGS__)
|
#define ENFORCE1(cond) \
|
||||||
#define ENFORCE_1(cond) \
|
|
||||||
if (!(cond)) { \
|
if (!(cond)) { \
|
||||||
qFatal("ENFORCE: \"%s\" in file %s, line %d", #cond, __FILE__, __LINE__); \
|
qFatal("ENFORCE: \"%s\" in file %s, line %d", #cond, __FILE__, __LINE__); \
|
||||||
} else { \
|
} else { \
|
||||||
}
|
}
|
||||||
#define ENFORCE_2(cond, message) \
|
#define ENFORCE2(cond, message) \
|
||||||
if (!(cond)) { \
|
if (!(cond)) { \
|
||||||
qFatal("ENFORCE: \"%s\" in file %s, line %d with message: %s", #cond, __FILE__, __LINE__, message); \
|
qFatal("ENFORCE: \"%s\" in file %s, line %d with message: %s", #cond, __FILE__, __LINE__, message); \
|
||||||
} else { \
|
} else { \
|
||||||
}
|
}
|
||||||
|
#define ENFORCE(...) OC_ASSERT_OVERLOAD(ENFORCE, __VA_ARGS__)
|
||||||
|
|
||||||
// An assert that is only present in debug builds: typically used for
|
// An assert that is only present in debug builds: typically used for
|
||||||
// asserts that are too expensive for release mode.
|
// asserts that are too expensive for release mode.
|
||||||
|
|||||||
@@ -207,7 +207,10 @@ static inline uint64_t c_jhash64(const uint8_t *k, uint64_t length, uint64_t int
|
|||||||
/* handle the last 23 bytes */
|
/* handle the last 23 bytes */
|
||||||
c += length;
|
c += length;
|
||||||
switch(len) {
|
switch(len) {
|
||||||
|
// pragma only for GCC (and clang continues to pretend to be it by defining __GNUC__)
|
||||||
|
#if defined(__GNUC__) && !defined(__clang__)
|
||||||
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
|
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
|
||||||
|
#endif
|
||||||
case 23: c+=((uint64_t)k[22]<<56);
|
case 23: c+=((uint64_t)k[22]<<56);
|
||||||
case 22: c+=((uint64_t)k[21]<<48);
|
case 22: c+=((uint64_t)k[21]<<48);
|
||||||
case 21: c+=((uint64_t)k[20]<<40);
|
case 21: c+=((uint64_t)k[20]<<40);
|
||||||
|
|||||||
@@ -281,8 +281,8 @@ int SqlQuery::prepare(const QByteArray &sql, bool allow_failure)
|
|||||||
*/
|
*/
|
||||||
static bool startsWithInsensitive(const QByteArray &a, const char *b)
|
static bool startsWithInsensitive(const QByteArray &a, const char *b)
|
||||||
{
|
{
|
||||||
int len = strlen(b);
|
size_t len = strlen(b);
|
||||||
return a.size() >= len && qstrnicmp(a.constData(), b, len) == 0;
|
return a.size() >= len && qstrnicmp(a.constData(), b, Utility::convertSizeToUint(len)) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SqlQuery::isSelect()
|
bool SqlQuery::isSelect()
|
||||||
|
|||||||
@@ -103,6 +103,7 @@ public:
|
|||||||
: _chunk(0)
|
: _chunk(0)
|
||||||
, _transferid(0)
|
, _transferid(0)
|
||||||
, _size(0)
|
, _size(0)
|
||||||
|
, _modtime(0)
|
||||||
, _errorCount(0)
|
, _errorCount(0)
|
||||||
, _valid(false)
|
, _valid(false)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -396,6 +396,26 @@ void Utility::crash()
|
|||||||
*a = 1;
|
*a = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Use this functions to retrieve uint/int (often required by Qt and WIN32) from size_t
|
||||||
|
// without compiler warnings about possible truncation
|
||||||
|
uint Utility::convertSizeToUint(size_t &convertVar)
|
||||||
|
{
|
||||||
|
if( convertVar > UINT_MAX ) {
|
||||||
|
//throw std::bad_cast();
|
||||||
|
convertVar = UINT_MAX; // intentionally default to wrong value here to not crash: exception handling TBD
|
||||||
|
}
|
||||||
|
return static_cast<uint>(convertVar);
|
||||||
|
}
|
||||||
|
|
||||||
|
uint Utility::convertSizeToInt(size_t &convertVar)
|
||||||
|
{
|
||||||
|
if( convertVar > INT_MAX ) {
|
||||||
|
//throw std::bad_cast();
|
||||||
|
convertVar = INT_MAX; // intentionally default to wrong value here to not crash: exception handling TBD
|
||||||
|
}
|
||||||
|
return static_cast<int>(convertVar);
|
||||||
|
}
|
||||||
|
|
||||||
// read the output of the owncloud --version command from the owncloud
|
// read the output of the owncloud --version command from the owncloud
|
||||||
// version that is on disk. This works for most versions of the client,
|
// version that is on disk. This works for most versions of the client,
|
||||||
// because clients that do not yet know the --version flag return the
|
// because clients that do not yet know the --version flag return the
|
||||||
|
|||||||
@@ -55,6 +55,12 @@ namespace Utility {
|
|||||||
OCSYNC_EXPORT QByteArray userAgentString();
|
OCSYNC_EXPORT QByteArray userAgentString();
|
||||||
OCSYNC_EXPORT bool hasLaunchOnStartup(const QString &appName);
|
OCSYNC_EXPORT bool hasLaunchOnStartup(const QString &appName);
|
||||||
OCSYNC_EXPORT void setLaunchOnStartup(const QString &appName, const QString &guiName, bool launch);
|
OCSYNC_EXPORT void setLaunchOnStartup(const QString &appName, const QString &guiName, bool launch);
|
||||||
|
OCSYNC_EXPORT uint convertSizeToUint(size_t &convertVar);
|
||||||
|
OCSYNC_EXPORT uint convertSizeToInt(size_t &convertVar);
|
||||||
|
|
||||||
|
#ifdef Q_OS_WIN
|
||||||
|
OCSYNC_EXPORT DWORD convertSizeToDWORD(size_t &convertVar);
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the amount of free space available.
|
* Return the amount of free space available.
|
||||||
|
|||||||
@@ -87,9 +87,17 @@ void setLaunchOnStartup_private(const QString &appName, const QString &guiName,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Right now only detection on toggle/startup, not when windows theme is switched while nextcloud is running
|
||||||
static inline bool hasDarkSystray_private()
|
static inline bool hasDarkSystray_private()
|
||||||
{
|
{
|
||||||
return true;
|
if(Utility::registryGetKeyValue( HKEY_CURRENT_USER,
|
||||||
|
"Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize",
|
||||||
|
"SystemUsesLightTheme" ) == 1) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QVariant Utility::registryGetKeyValue(HKEY hRootKey, const QString &subKey, const QString &valueName)
|
QVariant Utility::registryGetKeyValue(HKEY hRootKey, const QString &subKey, const QString &valueName)
|
||||||
@@ -256,4 +264,13 @@ bool Utility::registryWalkSubKeys(HKEY hRootKey, const QString &subKey, const st
|
|||||||
return retCode != ERROR_NO_MORE_ITEMS;
|
return retCode != ERROR_NO_MORE_ITEMS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DWORD Utility::convertSizeToDWORD(size_t &convertVar)
|
||||||
|
{
|
||||||
|
if( convertVar > UINT_MAX ) {
|
||||||
|
//throw std::bad_cast();
|
||||||
|
convertVar = UINT_MAX; // intentionally default to wrong value here to not crash: exception handling TBD
|
||||||
|
}
|
||||||
|
return static_cast<DWORD>(convertVar);
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace OCC
|
} // namespace OCC
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ static void csync_exclude_expand_escapes(QByteArray &input)
|
|||||||
line[o++] = line[i];
|
line[o++] = line[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
input.resize(o);
|
input.resize(OCC::Utility::convertSizeToUint(o));
|
||||||
}
|
}
|
||||||
|
|
||||||
// See http://support.microsoft.com/kb/74496 and
|
// See http://support.microsoft.com/kb/74496 and
|
||||||
@@ -236,13 +236,29 @@ static CSYNC_EXCLUDE_TYPE _csync_excluded_common(const char *path, bool excludeC
|
|||||||
return match;
|
return match;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static QByteArray leftIncludeLast(const QByteArray & arr, char c)
|
||||||
|
{
|
||||||
|
// left up to and including `c`
|
||||||
|
return arr.left(arr.lastIndexOf(c, arr.size() - 2) + 1);
|
||||||
|
}
|
||||||
|
|
||||||
using namespace OCC;
|
using namespace OCC;
|
||||||
|
|
||||||
ExcludedFiles::ExcludedFiles()
|
ExcludedFiles::ExcludedFiles(QString localPath)
|
||||||
|
: _localPath(std::move(localPath))
|
||||||
{
|
{
|
||||||
|
Q_ASSERT(_localPath.endsWith("/"));
|
||||||
// Windows used to use PathMatchSpec which allows *foo to match abc/deffoo.
|
// Windows used to use PathMatchSpec which allows *foo to match abc/deffoo.
|
||||||
_wildcardsMatchSlash = Utility::isWindows();
|
_wildcardsMatchSlash = Utility::isWindows();
|
||||||
|
|
||||||
|
// We're in a detached exclude probably coming from a partial sync or test
|
||||||
|
if (_localPath.isEmpty())
|
||||||
|
return;
|
||||||
|
|
||||||
|
// Load exclude file from base dir
|
||||||
|
QFileInfo fi(_localPath + ".sync-exclude.lst");
|
||||||
|
if (fi.isReadable())
|
||||||
|
addInTreeExcludeFilePath(fi.absoluteFilePath());
|
||||||
}
|
}
|
||||||
|
|
||||||
ExcludedFiles::~ExcludedFiles()
|
ExcludedFiles::~ExcludedFiles()
|
||||||
@@ -251,7 +267,13 @@ ExcludedFiles::~ExcludedFiles()
|
|||||||
|
|
||||||
void ExcludedFiles::addExcludeFilePath(const QString &path)
|
void ExcludedFiles::addExcludeFilePath(const QString &path)
|
||||||
{
|
{
|
||||||
_excludeFiles.insert(path);
|
_excludeFiles[_localPath.toUtf8()].append(path);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ExcludedFiles::addInTreeExcludeFilePath(const QString &path)
|
||||||
|
{
|
||||||
|
BasePathByteArray basePath = leftIncludeLast(path.toUtf8(), '/');
|
||||||
|
_excludeFiles[basePath].append(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ExcludedFiles::setExcludeConflictFiles(bool onoff)
|
void ExcludedFiles::setExcludeConflictFiles(bool onoff)
|
||||||
@@ -261,9 +283,22 @@ void ExcludedFiles::setExcludeConflictFiles(bool onoff)
|
|||||||
|
|
||||||
void ExcludedFiles::addManualExclude(const QByteArray &expr)
|
void ExcludedFiles::addManualExclude(const QByteArray &expr)
|
||||||
{
|
{
|
||||||
_manualExcludes.append(expr);
|
addManualExclude(expr, _localPath.toUtf8());
|
||||||
_allExcludes.append(expr);
|
}
|
||||||
prepare();
|
|
||||||
|
void ExcludedFiles::addManualExclude(const QByteArray &expr, const QByteArray &basePath)
|
||||||
|
{
|
||||||
|
#if defined(Q_OS_WIN)
|
||||||
|
Q_ASSERT(basePath.size() >= 2 && basePath.at(1) == ':');
|
||||||
|
#else
|
||||||
|
Q_ASSERT(basePath.startsWith('/'));
|
||||||
|
#endif
|
||||||
|
Q_ASSERT(basePath.endsWith('/'));
|
||||||
|
|
||||||
|
auto key = basePath;
|
||||||
|
_manualExcludes[key].append(expr);
|
||||||
|
_allExcludes[key].append(expr);
|
||||||
|
prepare(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ExcludedFiles::clearManualExcludes()
|
void ExcludedFiles::clearManualExcludes()
|
||||||
@@ -278,26 +313,51 @@ void ExcludedFiles::setWildcardsMatchSlash(bool onoff)
|
|||||||
prepare();
|
prepare();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool ExcludedFiles::loadExcludeFile(const QByteArray & basePath, const QString & file)
|
||||||
|
{
|
||||||
|
QFile f(file);
|
||||||
|
if (!f.open(QIODevice::ReadOnly))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
while (!f.atEnd()) {
|
||||||
|
QByteArray line = f.readLine().trimmed();
|
||||||
|
if (line.isEmpty() || line.startsWith('#'))
|
||||||
|
continue;
|
||||||
|
csync_exclude_expand_escapes(line);
|
||||||
|
_allExcludes[basePath].append(line);
|
||||||
|
}
|
||||||
|
|
||||||
|
// nothing to prepare if the user decided to not exclude anything
|
||||||
|
if(_allExcludes.size())
|
||||||
|
prepare(basePath);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
bool ExcludedFiles::reloadExcludeFiles()
|
bool ExcludedFiles::reloadExcludeFiles()
|
||||||
{
|
{
|
||||||
_allExcludes.clear();
|
_allExcludes.clear();
|
||||||
|
// clear all regex
|
||||||
|
_bnameTraversalRegexFile.clear();
|
||||||
|
_bnameTraversalRegexDir.clear();
|
||||||
|
_fullTraversalRegexFile.clear();
|
||||||
|
_fullTraversalRegexDir.clear();
|
||||||
|
_fullRegexFile.clear();
|
||||||
|
_fullRegexDir.clear();
|
||||||
|
|
||||||
bool success = true;
|
bool success = true;
|
||||||
foreach (const QString &file, _excludeFiles) {
|
for (const auto& basePath : _excludeFiles.keys()) {
|
||||||
QFile f(file);
|
for (const auto& file : _excludeFiles.value(basePath)) {
|
||||||
if (!f.open(QIODevice::ReadOnly)) {
|
success = loadExcludeFile(basePath, file);
|
||||||
success = false;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
while (!f.atEnd()) {
|
|
||||||
QByteArray line = f.readLine().trimmed();
|
|
||||||
if (line.isEmpty() || line.startsWith('#'))
|
|
||||||
continue;
|
|
||||||
csync_exclude_expand_escapes(line);
|
|
||||||
_allExcludes.append(line);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_allExcludes.append(_manualExcludes);
|
|
||||||
prepare();
|
auto endManual = _manualExcludes.cend();
|
||||||
|
for (auto kv = _manualExcludes.cbegin(); kv != endManual; ++kv) {
|
||||||
|
_allExcludes[kv.key()].append(kv.value());
|
||||||
|
prepare(kv.key());
|
||||||
|
}
|
||||||
|
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -311,13 +371,15 @@ bool ExcludedFiles::isExcluded(
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//TODO this seems a waste, hidden files are ignored before hitting this function it seems
|
||||||
if (excludeHidden) {
|
if (excludeHidden) {
|
||||||
QString path = filePath;
|
QString path = filePath;
|
||||||
// Check all path subcomponents, but to *not* check the base path:
|
// Check all path subcomponents, but to *not* check the base path:
|
||||||
// We do want to be able to sync with a hidden folder as the target.
|
// We do want to be able to sync with a hidden folder as the target.
|
||||||
while (path.size() > basePath.size()) {
|
while (path.size() > basePath.size()) {
|
||||||
QFileInfo fi(path);
|
QFileInfo fi(path);
|
||||||
if (fi.isHidden() || fi.fileName().startsWith(QLatin1Char('.'))) {
|
if (fi.fileName() != ".sync-exclude.lst"
|
||||||
|
&& (fi.isHidden() || fi.fileName().startsWith(QLatin1Char('.')))) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -340,7 +402,7 @@ bool ExcludedFiles::isExcluded(
|
|||||||
return fullPatternMatch(relativePath.toUtf8(), type) != CSYNC_NOT_EXCLUDED;
|
return fullPatternMatch(relativePath.toUtf8(), type) != CSYNC_NOT_EXCLUDED;
|
||||||
}
|
}
|
||||||
|
|
||||||
CSYNC_EXCLUDE_TYPE ExcludedFiles::traversalPatternMatch(const char *path, ItemType filetype) const
|
CSYNC_EXCLUDE_TYPE ExcludedFiles::traversalPatternMatch(const char *path, ItemType filetype)
|
||||||
{
|
{
|
||||||
auto match = _csync_excluded_common(path, _excludeConflictFiles);
|
auto match = _csync_excluded_common(path, _excludeConflictFiles);
|
||||||
if (match != CSYNC_NOT_EXCLUDED)
|
if (match != CSYNC_NOT_EXCLUDED)
|
||||||
@@ -348,6 +410,15 @@ CSYNC_EXCLUDE_TYPE ExcludedFiles::traversalPatternMatch(const char *path, ItemTy
|
|||||||
if (_allExcludes.isEmpty())
|
if (_allExcludes.isEmpty())
|
||||||
return CSYNC_NOT_EXCLUDED;
|
return CSYNC_NOT_EXCLUDED;
|
||||||
|
|
||||||
|
// Directories are guaranteed to be visited before their files
|
||||||
|
if (filetype == ItemTypeDirectory) {
|
||||||
|
QFileInfo fi = QFileInfo(_localPath + path + "/.sync-exclude.lst");
|
||||||
|
if (fi.isReadable()) {
|
||||||
|
addInTreeExcludeFilePath(fi.absoluteFilePath());
|
||||||
|
loadExcludeFile(fi.absolutePath().toUtf8(), fi.absoluteFilePath());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Check the bname part of the path to see whether the full
|
// Check the bname part of the path to see whether the full
|
||||||
// regex should be run.
|
// regex should be run.
|
||||||
|
|
||||||
@@ -359,35 +430,53 @@ CSYNC_EXCLUDE_TYPE ExcludedFiles::traversalPatternMatch(const char *path, ItemTy
|
|||||||
}
|
}
|
||||||
QString bnameStr = QString::fromUtf8(bname);
|
QString bnameStr = QString::fromUtf8(bname);
|
||||||
|
|
||||||
QRegularExpressionMatch m;
|
QByteArray basePath(_localPath.toUtf8() + path);
|
||||||
if (filetype == ItemTypeDirectory) {
|
while (basePath.size() > _localPath.size()) {
|
||||||
m = _bnameTraversalRegexDir.match(bnameStr);
|
basePath = leftIncludeLast(basePath, '/');
|
||||||
} else {
|
QRegularExpressionMatch m;
|
||||||
m = _bnameTraversalRegexFile.match(bnameStr);
|
if (filetype == ItemTypeDirectory
|
||||||
}
|
&& _bnameTraversalRegexDir.contains(basePath)) {
|
||||||
if (!m.hasMatch())
|
m = _bnameTraversalRegexDir[basePath].match(bnameStr);
|
||||||
return CSYNC_NOT_EXCLUDED;
|
} else if (filetype == ItemTypeFile
|
||||||
if (m.capturedStart(QStringLiteral("exclude")) != -1) {
|
&& _bnameTraversalRegexFile.contains(basePath)) {
|
||||||
return CSYNC_FILE_EXCLUDE_LIST;
|
m = _bnameTraversalRegexFile[basePath].match(bnameStr);
|
||||||
} else if (m.capturedStart(QStringLiteral("excluderemove")) != -1) {
|
} else {
|
||||||
return CSYNC_FILE_EXCLUDE_AND_REMOVE;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// third capture: full path matching is triggered
|
if (!m.hasMatch())
|
||||||
QString pathStr = QString::fromUtf8(path);
|
return CSYNC_NOT_EXCLUDED;
|
||||||
|
|
||||||
if (filetype == ItemTypeDirectory) {
|
|
||||||
m = _fullTraversalRegexDir.match(pathStr);
|
|
||||||
} else {
|
|
||||||
m = _fullTraversalRegexFile.match(pathStr);
|
|
||||||
}
|
|
||||||
if (m.hasMatch()) {
|
|
||||||
if (m.capturedStart(QStringLiteral("exclude")) != -1) {
|
if (m.capturedStart(QStringLiteral("exclude")) != -1) {
|
||||||
return CSYNC_FILE_EXCLUDE_LIST;
|
return CSYNC_FILE_EXCLUDE_LIST;
|
||||||
} else if (m.capturedStart(QStringLiteral("excluderemove")) != -1) {
|
} else if (m.capturedStart(QStringLiteral("excluderemove")) != -1) {
|
||||||
return CSYNC_FILE_EXCLUDE_AND_REMOVE;
|
return CSYNC_FILE_EXCLUDE_AND_REMOVE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// third capture: full path matching is triggered
|
||||||
|
QString pathStr = QString::fromUtf8(path);
|
||||||
|
basePath = _localPath.toUtf8() + path;
|
||||||
|
while (basePath.size() > _localPath.size()) {
|
||||||
|
basePath = leftIncludeLast(basePath, '/');
|
||||||
|
QRegularExpressionMatch m;
|
||||||
|
if (filetype == ItemTypeDirectory
|
||||||
|
&& _fullTraversalRegexDir.contains(basePath)) {
|
||||||
|
m = _fullTraversalRegexDir[basePath].match(pathStr);
|
||||||
|
} else if (filetype == ItemTypeFile
|
||||||
|
&& _fullTraversalRegexFile.contains(basePath)) {
|
||||||
|
m = _fullTraversalRegexFile[basePath].match(pathStr);
|
||||||
|
} else {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m.hasMatch()) {
|
||||||
|
if (m.capturedStart(QStringLiteral("exclude")) != -1) {
|
||||||
|
return CSYNC_FILE_EXCLUDE_LIST;
|
||||||
|
} else if (m.capturedStart(QStringLiteral("excluderemove")) != -1) {
|
||||||
|
return CSYNC_FILE_EXCLUDE_AND_REMOVE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
return CSYNC_NOT_EXCLUDED;
|
return CSYNC_NOT_EXCLUDED;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -400,23 +489,38 @@ CSYNC_EXCLUDE_TYPE ExcludedFiles::fullPatternMatch(const char *path, ItemType fi
|
|||||||
return CSYNC_NOT_EXCLUDED;
|
return CSYNC_NOT_EXCLUDED;
|
||||||
|
|
||||||
QString p = QString::fromUtf8(path);
|
QString p = QString::fromUtf8(path);
|
||||||
QRegularExpressionMatch m;
|
// `path` seems to always be relative to `_localPath`, the tests however have not been
|
||||||
if (filetype == ItemTypeDirectory) {
|
// written that way... this makes the tests happy for now. TODO Fix the tests at some point
|
||||||
m = _fullRegexDir.match(p);
|
if (path[0] == '/')
|
||||||
} else {
|
++path;
|
||||||
m = _fullRegexFile.match(p);
|
|
||||||
}
|
QByteArray basePath(_localPath.toUtf8() + path);
|
||||||
if (m.hasMatch()) {
|
while (basePath.size() > _localPath.size()) {
|
||||||
if (m.capturedStart(QStringLiteral("exclude")) != -1) {
|
basePath = leftIncludeLast(basePath, '/');
|
||||||
return CSYNC_FILE_EXCLUDE_LIST;
|
QRegularExpressionMatch m;
|
||||||
} else if (m.capturedStart(QStringLiteral("excluderemove")) != -1) {
|
if (filetype == ItemTypeDirectory
|
||||||
return CSYNC_FILE_EXCLUDE_AND_REMOVE;
|
&& _fullRegexDir.contains(basePath)) {
|
||||||
|
m = _fullRegexDir[basePath].match(p);
|
||||||
|
} else if (filetype == ItemTypeFile
|
||||||
|
&& _fullRegexFile.contains(basePath)) {
|
||||||
|
m = _fullRegexFile[basePath].match(p);
|
||||||
|
} else {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m.hasMatch()) {
|
||||||
|
if (m.capturedStart(QStringLiteral("exclude")) != -1) {
|
||||||
|
return CSYNC_FILE_EXCLUDE_LIST;
|
||||||
|
} else if (m.capturedStart(QStringLiteral("excluderemove")) != -1) {
|
||||||
|
return CSYNC_FILE_EXCLUDE_AND_REMOVE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return CSYNC_NOT_EXCLUDED;
|
return CSYNC_NOT_EXCLUDED;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto ExcludedFiles::csyncTraversalMatchFun() const
|
auto ExcludedFiles::csyncTraversalMatchFun()
|
||||||
-> std::function<CSYNC_EXCLUDE_TYPE(const char *path, ItemType filetype)>
|
-> std::function<CSYNC_EXCLUDE_TYPE(const char *path, ItemType filetype)>
|
||||||
{
|
{
|
||||||
return [this](const char *path, ItemType filetype) { return this->traversalPatternMatch(path, filetype); };
|
return [this](const char *path, ItemType filetype) { return this->traversalPatternMatch(path, filetype); };
|
||||||
@@ -555,6 +659,22 @@ static QString extractBnameTrigger(const QString &exclude, bool wildcardsMatchSl
|
|||||||
|
|
||||||
void ExcludedFiles::prepare()
|
void ExcludedFiles::prepare()
|
||||||
{
|
{
|
||||||
|
// clear all regex
|
||||||
|
_bnameTraversalRegexFile.clear();
|
||||||
|
_bnameTraversalRegexDir.clear();
|
||||||
|
_fullTraversalRegexFile.clear();
|
||||||
|
_fullTraversalRegexDir.clear();
|
||||||
|
_fullRegexFile.clear();
|
||||||
|
_fullRegexDir.clear();
|
||||||
|
|
||||||
|
for (auto const & basePath : _allExcludes.keys())
|
||||||
|
prepare(basePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ExcludedFiles::prepare(const BasePathByteArray & basePath)
|
||||||
|
{
|
||||||
|
Q_ASSERT(_allExcludes.contains(basePath));
|
||||||
|
|
||||||
// Build regular expressions for the different cases.
|
// Build regular expressions for the different cases.
|
||||||
//
|
//
|
||||||
// To compose the _bnameTraversalRegex, _fullTraversalRegex and _fullRegex
|
// To compose the _bnameTraversalRegex, _fullTraversalRegex and _fullRegex
|
||||||
@@ -596,7 +716,7 @@ void ExcludedFiles::prepare()
|
|||||||
pattern.append(appendMe);
|
pattern.append(appendMe);
|
||||||
};
|
};
|
||||||
|
|
||||||
for (auto exclude : _allExcludes) {
|
for (auto exclude : _allExcludes.value(basePath)) {
|
||||||
if (exclude[0] == '\n')
|
if (exclude[0] == '\n')
|
||||||
continue; // empty line
|
continue; // empty line
|
||||||
if (exclude[0] == '\r')
|
if (exclude[0] == '\r')
|
||||||
@@ -618,6 +738,15 @@ void ExcludedFiles::prepare()
|
|||||||
auto &fullFileDir = removeExcluded ? fullFileDirRemove : fullFileDirKeep;
|
auto &fullFileDir = removeExcluded ? fullFileDirRemove : fullFileDirKeep;
|
||||||
auto &fullDir = removeExcluded ? fullDirRemove : fullDirKeep;
|
auto &fullDir = removeExcluded ? fullDirRemove : fullDirKeep;
|
||||||
|
|
||||||
|
if (fullPath) {
|
||||||
|
// The full pattern is matched against a path relative to _localPath, however exclude is
|
||||||
|
// relative to basePath at this point.
|
||||||
|
// We know for sure that both _localPath and basePath are absolute and that basePath is
|
||||||
|
// contained in _localPath. So we can simply remove it from the begining.
|
||||||
|
auto relPath = basePath.mid(_localPath.size());
|
||||||
|
// Make exclude relative to _localPath
|
||||||
|
exclude.prepend(relPath);
|
||||||
|
}
|
||||||
auto regexExclude = convertToRegexpSyntax(QString::fromUtf8(exclude), _wildcardsMatchSlash);
|
auto regexExclude = convertToRegexpSyntax(QString::fromUtf8(exclude), _wildcardsMatchSlash);
|
||||||
if (!fullPath) {
|
if (!fullPath) {
|
||||||
regexAppend(bnameFileDir, bnameDir, regexExclude, matchDirOnly);
|
regexAppend(bnameFileDir, bnameDir, regexExclude, matchDirOnly);
|
||||||
@@ -654,11 +783,11 @@ void ExcludedFiles::prepare()
|
|||||||
// (exclude)|(excluderemove)|(bname triggers).
|
// (exclude)|(excluderemove)|(bname triggers).
|
||||||
// If the third group matches, the fullActivatedRegex needs to be applied
|
// If the third group matches, the fullActivatedRegex needs to be applied
|
||||||
// to the full path.
|
// to the full path.
|
||||||
_bnameTraversalRegexFile.setPattern(
|
_bnameTraversalRegexFile[basePath].setPattern(
|
||||||
"^(?P<exclude>" + bnameFileDirKeep + ")$|"
|
"^(?P<exclude>" + bnameFileDirKeep + ")$|"
|
||||||
+ "^(?P<excluderemove>" + bnameFileDirRemove + ")$|"
|
+ "^(?P<excluderemove>" + bnameFileDirRemove + ")$|"
|
||||||
+ "^(?P<trigger>" + bnameTriggerFileDir + ")$");
|
+ "^(?P<trigger>" + bnameTriggerFileDir + ")$");
|
||||||
_bnameTraversalRegexDir.setPattern(
|
_bnameTraversalRegexDir[basePath].setPattern(
|
||||||
"^(?P<exclude>" + bnameFileDirKeep + "|" + bnameDirKeep + ")$|"
|
"^(?P<exclude>" + bnameFileDirKeep + "|" + bnameDirKeep + ")$|"
|
||||||
+ "^(?P<excluderemove>" + bnameFileDirRemove + "|" + bnameDirRemove + ")$|"
|
+ "^(?P<excluderemove>" + bnameFileDirRemove + "|" + bnameDirRemove + ")$|"
|
||||||
+ "^(?P<trigger>" + bnameTriggerFileDir + "|" + bnameTriggerDir + ")$");
|
+ "^(?P<trigger>" + bnameTriggerFileDir + "|" + bnameTriggerDir + ")$");
|
||||||
@@ -667,13 +796,13 @@ void ExcludedFiles::prepare()
|
|||||||
// the bname regex matches. Its basic form is (exclude)|(excluderemove)".
|
// the bname regex matches. Its basic form is (exclude)|(excluderemove)".
|
||||||
// This pattern can be much simpler than fullRegex since we can assume a traversal
|
// This pattern can be much simpler than fullRegex since we can assume a traversal
|
||||||
// situation and doesn't need to look for bname patterns in parent paths.
|
// situation and doesn't need to look for bname patterns in parent paths.
|
||||||
_fullTraversalRegexFile.setPattern(
|
_fullTraversalRegexFile[basePath].setPattern(
|
||||||
QLatin1String("")
|
QLatin1String("")
|
||||||
// Full patterns are anchored to the beginning
|
// Full patterns are anchored to the beginning
|
||||||
+ "^(?P<exclude>" + fullFileDirKeep + ")(?:$|/)"
|
+ "^(?P<exclude>" + fullFileDirKeep + ")(?:$|/)"
|
||||||
+ "|"
|
+ "|"
|
||||||
+ "^(?P<excluderemove>" + fullFileDirRemove + ")(?:$|/)");
|
+ "^(?P<excluderemove>" + fullFileDirRemove + ")(?:$|/)");
|
||||||
_fullTraversalRegexDir.setPattern(
|
_fullTraversalRegexDir[basePath].setPattern(
|
||||||
QLatin1String("")
|
QLatin1String("")
|
||||||
+ "^(?P<exclude>" + fullFileDirKeep + "|" + fullDirKeep + ")(?:$|/)"
|
+ "^(?P<exclude>" + fullFileDirKeep + "|" + fullDirKeep + ")(?:$|/)"
|
||||||
+ "|"
|
+ "|"
|
||||||
@@ -681,7 +810,7 @@ void ExcludedFiles::prepare()
|
|||||||
|
|
||||||
// The full regex is applied to the full path and incorporates both bname and
|
// The full regex is applied to the full path and incorporates both bname and
|
||||||
// full-path patterns. It has the form "(exclude)|(excluderemove)".
|
// full-path patterns. It has the form "(exclude)|(excluderemove)".
|
||||||
_fullRegexFile.setPattern(
|
_fullRegexFile[basePath].setPattern(
|
||||||
QLatin1String("(?P<exclude>")
|
QLatin1String("(?P<exclude>")
|
||||||
// Full patterns are anchored to the beginning
|
// Full patterns are anchored to the beginning
|
||||||
+ "^(?:" + fullFileDirKeep + ")(?:$|/)" + "|"
|
+ "^(?:" + fullFileDirKeep + ")(?:$|/)" + "|"
|
||||||
@@ -697,7 +826,7 @@ void ExcludedFiles::prepare()
|
|||||||
+ "(?:^|/)(?:" + bnameFileDirRemove + ")(?:$|/)" + "|"
|
+ "(?:^|/)(?:" + bnameFileDirRemove + ")(?:$|/)" + "|"
|
||||||
+ "(?:^|/)(?:" + bnameDirRemove + ")/"
|
+ "(?:^|/)(?:" + bnameDirRemove + ")/"
|
||||||
+ ")");
|
+ ")");
|
||||||
_fullRegexDir.setPattern(
|
_fullRegexDir[basePath].setPattern(
|
||||||
QLatin1String("(?P<exclude>")
|
QLatin1String("(?P<exclude>")
|
||||||
+ "^(?:" + fullFileDirKeep + "|" + fullDirKeep + ")(?:$|/)" + "|"
|
+ "^(?:" + fullFileDirKeep + "|" + fullDirKeep + ")(?:$|/)" + "|"
|
||||||
+ "(?:^|/)(?:" + bnameFileDirKeep + "|" + bnameDirKeep + ")(?:$|/)"
|
+ "(?:^|/)(?:" + bnameFileDirKeep + "|" + bnameDirKeep + ")(?:$|/)"
|
||||||
@@ -711,16 +840,16 @@ void ExcludedFiles::prepare()
|
|||||||
QRegularExpression::PatternOptions patternOptions = QRegularExpression::NoPatternOption;
|
QRegularExpression::PatternOptions patternOptions = QRegularExpression::NoPatternOption;
|
||||||
if (OCC::Utility::fsCasePreserving())
|
if (OCC::Utility::fsCasePreserving())
|
||||||
patternOptions |= QRegularExpression::CaseInsensitiveOption;
|
patternOptions |= QRegularExpression::CaseInsensitiveOption;
|
||||||
_bnameTraversalRegexFile.setPatternOptions(patternOptions);
|
_bnameTraversalRegexFile[basePath].setPatternOptions(patternOptions);
|
||||||
_bnameTraversalRegexFile.optimize();
|
_bnameTraversalRegexFile[basePath].optimize();
|
||||||
_bnameTraversalRegexDir.setPatternOptions(patternOptions);
|
_bnameTraversalRegexDir[basePath].setPatternOptions(patternOptions);
|
||||||
_bnameTraversalRegexDir.optimize();
|
_bnameTraversalRegexDir[basePath].optimize();
|
||||||
_fullTraversalRegexFile.setPatternOptions(patternOptions);
|
_fullTraversalRegexFile[basePath].setPatternOptions(patternOptions);
|
||||||
_fullTraversalRegexFile.optimize();
|
_fullTraversalRegexFile[basePath].optimize();
|
||||||
_fullTraversalRegexDir.setPatternOptions(patternOptions);
|
_fullTraversalRegexDir[basePath].setPatternOptions(patternOptions);
|
||||||
_fullTraversalRegexDir.optimize();
|
_fullTraversalRegexDir[basePath].optimize();
|
||||||
_fullRegexFile.setPatternOptions(patternOptions);
|
_fullRegexFile[basePath].setPatternOptions(patternOptions);
|
||||||
_fullRegexFile.optimize();
|
_fullRegexFile[basePath].optimize();
|
||||||
_fullRegexDir.setPatternOptions(patternOptions);
|
_fullRegexDir[basePath].setPatternOptions(patternOptions);
|
||||||
_fullRegexDir.optimize();
|
_fullRegexDir[basePath].optimize();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ class OCSYNC_EXPORT ExcludedFiles : public QObject
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
ExcludedFiles();
|
ExcludedFiles(QString localPath = "/");
|
||||||
~ExcludedFiles();
|
~ExcludedFiles();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -75,6 +75,7 @@ public:
|
|||||||
* Does not load the file. Use reloadExcludeFiles() afterwards.
|
* Does not load the file. Use reloadExcludeFiles() afterwards.
|
||||||
*/
|
*/
|
||||||
void addExcludeFilePath(const QString &path);
|
void addExcludeFilePath(const QString &path);
|
||||||
|
void addInTreeExcludeFilePath(const QString &path);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether conflict files shall be excluded.
|
* Whether conflict files shall be excluded.
|
||||||
@@ -95,12 +96,13 @@ public:
|
|||||||
bool excludeHidden) const;
|
bool excludeHidden) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds an exclude pattern.
|
* Adds an exclude pattern anchored to base path
|
||||||
*
|
*
|
||||||
* Primarily used in tests. Patterns added this way are preserved when
|
* Primarily used in tests. Patterns added this way are preserved when
|
||||||
* reloadExcludeFiles() is called.
|
* reloadExcludeFiles() is called.
|
||||||
*/
|
*/
|
||||||
void addManualExclude(const QByteArray &expr);
|
void addManualExclude(const QByteArray &expr);
|
||||||
|
void addManualExclude(const QByteArray &expr, const QByteArray &basePath);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Removes all manually added exclude patterns.
|
* Removes all manually added exclude patterns.
|
||||||
@@ -121,7 +123,7 @@ public:
|
|||||||
* Careful: The function will only be valid for as long as this
|
* Careful: The function will only be valid for as long as this
|
||||||
* ExcludedFiles instance stays alive.
|
* ExcludedFiles instance stays alive.
|
||||||
*/
|
*/
|
||||||
auto csyncTraversalMatchFun() const
|
auto csyncTraversalMatchFun()
|
||||||
-> std::function<CSYNC_EXCLUDE_TYPE(const char *path, ItemType filetype)>;
|
-> std::function<CSYNC_EXCLUDE_TYPE(const char *path, ItemType filetype)>;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
@@ -129,6 +131,10 @@ public slots:
|
|||||||
* Reloads the exclude patterns from the registered paths.
|
* Reloads the exclude patterns from the registered paths.
|
||||||
*/
|
*/
|
||||||
bool reloadExcludeFiles();
|
bool reloadExcludeFiles();
|
||||||
|
/**
|
||||||
|
* Loads the exclude patterns from file the registered base paths.
|
||||||
|
*/
|
||||||
|
bool loadExcludeFile(const QByteArray & basePath, const QString & file);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/**
|
/**
|
||||||
@@ -156,10 +162,32 @@ private:
|
|||||||
* Note that this only matches patterns. It does not check whether the file
|
* Note that this only matches patterns. It does not check whether the file
|
||||||
* or directory pointed to is hidden (or whether it even exists).
|
* or directory pointed to is hidden (or whether it even exists).
|
||||||
*/
|
*/
|
||||||
CSYNC_EXCLUDE_TYPE traversalPatternMatch(const char *path, ItemType filetype) const;
|
CSYNC_EXCLUDE_TYPE traversalPatternMatch(const char *path, ItemType filetype);
|
||||||
|
|
||||||
|
// Our BasePath need to end with '/'
|
||||||
|
class BasePathByteArray : public QByteArray
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
BasePathByteArray(QByteArray && other)
|
||||||
|
: QByteArray(std::move(other))
|
||||||
|
{
|
||||||
|
Q_ASSERT(this->endsWith('/'));
|
||||||
|
}
|
||||||
|
|
||||||
|
BasePathByteArray(const QByteArray & other)
|
||||||
|
: QByteArray(other)
|
||||||
|
{
|
||||||
|
Q_ASSERT(this->endsWith('/'));
|
||||||
|
}
|
||||||
|
|
||||||
|
BasePathByteArray(const char * data, int size = -1)
|
||||||
|
: BasePathByteArray(QByteArray(data, size))
|
||||||
|
{
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate optimized regular expressions for the exclude patterns.
|
* Generate optimized regular expressions for the exclude patterns anchored to basePath.
|
||||||
*
|
*
|
||||||
* The optimization works in two steps: First, all supported patterns are put
|
* The optimization works in two steps: First, all supported patterns are put
|
||||||
* into _fullRegexFile/_fullRegexDir. These regexes can be applied to the full
|
* into _fullRegexFile/_fullRegexDir. These regexes can be applied to the full
|
||||||
@@ -187,24 +215,28 @@ private:
|
|||||||
* full matcher would exclude. Example: "b" is excluded. traversal("b/c")
|
* full matcher would exclude. Example: "b" is excluded. traversal("b/c")
|
||||||
* returns not-excluded because "c" isn't a bname activation pattern.
|
* returns not-excluded because "c" isn't a bname activation pattern.
|
||||||
*/
|
*/
|
||||||
|
void prepare(const BasePathByteArray & basePath);
|
||||||
|
|
||||||
void prepare();
|
void prepare();
|
||||||
|
|
||||||
|
|
||||||
|
QString _localPath;
|
||||||
/// Files to load excludes from
|
/// Files to load excludes from
|
||||||
QSet<QString> _excludeFiles;
|
QMap<BasePathByteArray, QList<QString>> _excludeFiles;
|
||||||
|
|
||||||
/// Exclude patterns added with addManualExclude()
|
/// Exclude patterns added with addManualExclude()
|
||||||
QList<QByteArray> _manualExcludes;
|
QMap<BasePathByteArray, QList<QByteArray>> _manualExcludes;
|
||||||
|
|
||||||
/// List of all active exclude patterns
|
/// List of all active exclude patterns
|
||||||
QList<QByteArray> _allExcludes;
|
QMap<BasePathByteArray, QList<QByteArray>> _allExcludes;
|
||||||
|
|
||||||
/// see prepare()
|
/// see prepare()
|
||||||
QRegularExpression _bnameTraversalRegexFile;
|
QMap<BasePathByteArray, QRegularExpression> _bnameTraversalRegexFile;
|
||||||
QRegularExpression _bnameTraversalRegexDir;
|
QMap<BasePathByteArray, QRegularExpression> _bnameTraversalRegexDir;
|
||||||
QRegularExpression _fullTraversalRegexFile;
|
QMap<BasePathByteArray, QRegularExpression> _fullTraversalRegexFile;
|
||||||
QRegularExpression _fullTraversalRegexDir;
|
QMap<BasePathByteArray, QRegularExpression> _fullTraversalRegexDir;
|
||||||
QRegularExpression _fullRegexFile;
|
QMap<BasePathByteArray, QRegularExpression> _fullRegexFile;
|
||||||
QRegularExpression _fullRegexDir;
|
QMap<BasePathByteArray, QRegularExpression> _fullRegexDir;
|
||||||
|
|
||||||
bool _excludeConflictFiles = true;
|
bool _excludeConflictFiles = true;
|
||||||
|
|
||||||
|
|||||||
@@ -124,7 +124,9 @@ static int _csync_detect_update(CSYNC *ctx, std::unique_ptr<csync_file_stat_t> f
|
|||||||
* because it's a hidden file that should not be synced.
|
* because it's a hidden file that should not be synced.
|
||||||
* This code should probably be in csync_exclude, but it does not have the fs parameter.
|
* This code should probably be in csync_exclude, but it does not have the fs parameter.
|
||||||
* Keep it here for now */
|
* Keep it here for now */
|
||||||
if (ctx->ignore_hidden_files && (fs->is_hidden)) {
|
if (ctx->ignore_hidden_files
|
||||||
|
&& fs->is_hidden
|
||||||
|
&& !fs->path.endsWith(".sync-exclude.lst")) {
|
||||||
qCInfo(lcUpdate, "file excluded because it is a hidden file: %s", fs->path.constData());
|
qCInfo(lcUpdate, "file excluded because it is a hidden file: %s", fs->path.constData());
|
||||||
excluded = CSYNC_FILE_EXCLUDE_HIDDEN;
|
excluded = CSYNC_FILE_EXCLUDE_HIDDEN;
|
||||||
}
|
}
|
||||||
@@ -722,7 +724,8 @@ int csync_ftw(CSYNC *ctx, const char *uri, csync_walker_fn fn,
|
|||||||
if (ctx->current == LOCAL_REPLICA) {
|
if (ctx->current == LOCAL_REPLICA) {
|
||||||
ASSERT(dirent->path.startsWith(ctx->local.uri)); // path is relative to uri
|
ASSERT(dirent->path.startsWith(ctx->local.uri)); // path is relative to uri
|
||||||
// "len + 1" to include the slash in-between.
|
// "len + 1" to include the slash in-between.
|
||||||
dirent->path = dirent->path.mid(strlen(ctx->local.uri) + 1);
|
size_t uriLength = strlen(ctx->local.uri);
|
||||||
|
dirent->path = dirent->path.mid(OCC::Utility::convertSizeToInt(uriLength) + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
previous_fs = ctx->current_fs;
|
previous_fs = ctx->current_fs;
|
||||||
|
|||||||
@@ -38,6 +38,7 @@
|
|||||||
#include "c_alloc.h"
|
#include "c_alloc.h"
|
||||||
#include "c_string.h"
|
#include "c_string.h"
|
||||||
#include "common/filesystembase.h"
|
#include "common/filesystembase.h"
|
||||||
|
#include "common/utility.h"
|
||||||
|
|
||||||
/* Convert a locale String to UTF8 */
|
/* Convert a locale String to UTF8 */
|
||||||
QByteArray c_utf8_from_locale(const mbchar_t *wstr)
|
QByteArray c_utf8_from_locale(const mbchar_t *wstr)
|
||||||
@@ -52,10 +53,10 @@ QByteArray c_utf8_from_locale(const mbchar_t *wstr)
|
|||||||
size_t len;
|
size_t len;
|
||||||
len = wcslen(wstr);
|
len = wcslen(wstr);
|
||||||
/* Call once to get the required size. */
|
/* Call once to get the required size. */
|
||||||
size_needed = WideCharToMultiByte(CP_UTF8, 0, wstr, len, NULL, 0, NULL, NULL);
|
size_needed = WideCharToMultiByte(CP_UTF8, 0, wstr, OCC::Utility::convertSizeToInt(len), NULL, 0, NULL, NULL);
|
||||||
if (size_needed > 0) {
|
if (size_needed > 0) {
|
||||||
dst.resize(size_needed);
|
dst.resize(size_needed);
|
||||||
WideCharToMultiByte(CP_UTF8, 0, wstr, len, dst.data(), size_needed, NULL, NULL);
|
WideCharToMultiByte(CP_UTF8, 0, wstr, OCC::Utility::convertSizeToInt(len), dst.data(), size_needed, NULL, NULL);
|
||||||
}
|
}
|
||||||
return dst;
|
return dst;
|
||||||
#else
|
#else
|
||||||
@@ -95,7 +96,7 @@ mbchar_t* c_utf8_string_to_locale(const char *str)
|
|||||||
int size_needed;
|
int size_needed;
|
||||||
|
|
||||||
len = strlen(str);
|
len = strlen(str);
|
||||||
size_needed = MultiByteToWideChar(CP_UTF8, 0, str, len, NULL, 0);
|
size_needed = MultiByteToWideChar(CP_UTF8, 0, str, OCC::Utility::convertSizeToInt(len), NULL, 0);
|
||||||
if (size_needed > 0) {
|
if (size_needed > 0) {
|
||||||
int size_char = (size_needed + 1) * sizeof(mbchar_t);
|
int size_char = (size_needed + 1) * sizeof(mbchar_t);
|
||||||
dst = (mbchar_t*)c_malloc(size_char);
|
dst = (mbchar_t*)c_malloc(size_char);
|
||||||
@@ -114,7 +115,8 @@ mbchar_t* c_utf8_string_to_locale(const char *str)
|
|||||||
return NULL;
|
return NULL;
|
||||||
} else {
|
} else {
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
QByteArray unc_str = OCC::FileSystem::pathtoUNC(QByteArray::fromRawData(str, strlen(str)));
|
size_t strLength = strlen(str);
|
||||||
|
QByteArray unc_str = OCC::FileSystem::pathtoUNC(QByteArray::fromRawData(str, OCC::Utility::convertSizeToInt(strLength)));
|
||||||
mbchar_t *dst = c_utf8_string_to_locale(unc_str);
|
mbchar_t *dst = c_utf8_string_to_locale(unc_str);
|
||||||
return dst;
|
return dst;
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ csync_vio_handle_t *csync_vio_local_opendir(const char *name) {
|
|||||||
handle = (dhandle_t*)c_malloc(sizeof(dhandle_t));
|
handle = (dhandle_t*)c_malloc(sizeof(dhandle_t));
|
||||||
|
|
||||||
// the file wildcard has to be attached
|
// the file wildcard has to be attached
|
||||||
int len_name = strlen(name);
|
size_t len_name = strlen(name);
|
||||||
if( len_name ) {
|
if( len_name ) {
|
||||||
char *h = NULL;
|
char *h = NULL;
|
||||||
|
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ set(client_UI_SRCS
|
|||||||
generalsettings.ui
|
generalsettings.ui
|
||||||
legalnotice.ui
|
legalnotice.ui
|
||||||
ignorelisteditor.ui
|
ignorelisteditor.ui
|
||||||
|
ignorelisttablewidget.ui
|
||||||
networksettings.ui
|
networksettings.ui
|
||||||
activitywidget.ui
|
activitywidget.ui
|
||||||
synclogdialog.ui
|
synclogdialog.ui
|
||||||
@@ -34,6 +35,7 @@ set(client_UI_SRCS
|
|||||||
addcertificatedialog.ui
|
addcertificatedialog.ui
|
||||||
proxyauthdialog.ui
|
proxyauthdialog.ui
|
||||||
mnemonicdialog.ui
|
mnemonicdialog.ui
|
||||||
|
wizard/flow2authwidget.ui
|
||||||
wizard/owncloudadvancedsetuppage.ui
|
wizard/owncloudadvancedsetuppage.ui
|
||||||
wizard/owncloudconnectionmethoddialog.ui
|
wizard/owncloudconnectionmethoddialog.ui
|
||||||
wizard/owncloudhttpcredspage.ui
|
wizard/owncloudhttpcredspage.ui
|
||||||
@@ -59,6 +61,7 @@ set(client_SRCS
|
|||||||
generalsettings.cpp
|
generalsettings.cpp
|
||||||
legalnotice.cpp
|
legalnotice.cpp
|
||||||
ignorelisteditor.cpp
|
ignorelisteditor.cpp
|
||||||
|
ignorelisttablewidget.cpp
|
||||||
lockwatcher.cpp
|
lockwatcher.cpp
|
||||||
logbrowser.cpp
|
logbrowser.cpp
|
||||||
navigationpanehelper.cpp
|
navigationpanehelper.cpp
|
||||||
@@ -99,10 +102,14 @@ set(client_SRCS
|
|||||||
servernotificationhandler.cpp
|
servernotificationhandler.cpp
|
||||||
guiutility.cpp
|
guiutility.cpp
|
||||||
elidedlabel.cpp
|
elidedlabel.cpp
|
||||||
|
headerbanner.cpp
|
||||||
iconjob.cpp
|
iconjob.cpp
|
||||||
|
remotewipe.cpp
|
||||||
creds/credentialsfactory.cpp
|
creds/credentialsfactory.cpp
|
||||||
creds/httpcredentialsgui.cpp
|
creds/httpcredentialsgui.cpp
|
||||||
creds/oauth.cpp
|
creds/oauth.cpp
|
||||||
|
creds/flow2auth.cpp
|
||||||
|
creds/keychainchunk.cpp
|
||||||
creds/webflowcredentials.cpp
|
creds/webflowcredentials.cpp
|
||||||
creds/webflowcredentialsdialog.cpp
|
creds/webflowcredentialsdialog.cpp
|
||||||
wizard/postfixlineedit.cpp
|
wizard/postfixlineedit.cpp
|
||||||
@@ -111,6 +118,8 @@ set(client_SRCS
|
|||||||
wizard/owncloudconnectionmethoddialog.cpp
|
wizard/owncloudconnectionmethoddialog.cpp
|
||||||
wizard/owncloudhttpcredspage.cpp
|
wizard/owncloudhttpcredspage.cpp
|
||||||
wizard/owncloudoauthcredspage.cpp
|
wizard/owncloudoauthcredspage.cpp
|
||||||
|
wizard/flow2authcredspage.cpp
|
||||||
|
wizard/flow2authwidget.cpp
|
||||||
wizard/owncloudsetuppage.cpp
|
wizard/owncloudsetuppage.cpp
|
||||||
wizard/owncloudwizardcommon.cpp
|
wizard/owncloudwizardcommon.cpp
|
||||||
wizard/owncloudwizard.cpp
|
wizard/owncloudwizard.cpp
|
||||||
@@ -137,8 +146,6 @@ set(updater_SRCS
|
|||||||
|
|
||||||
IF( APPLE )
|
IF( APPLE )
|
||||||
list(APPEND client_SRCS cocoainitializer_mac.mm)
|
list(APPEND client_SRCS cocoainitializer_mac.mm)
|
||||||
list(APPEND client_SRCS settingsdialogmac.cpp)
|
|
||||||
list(REMOVE_ITEM client_SRCS settingsdialog.cpp)
|
|
||||||
list(APPEND client_SRCS socketapisocket_mac.mm)
|
list(APPEND client_SRCS socketapisocket_mac.mm)
|
||||||
list(APPEND client_SRCS systray.mm)
|
list(APPEND client_SRCS systray.mm)
|
||||||
|
|
||||||
@@ -165,16 +172,9 @@ set(3rdparty_SRC
|
|||||||
../3rdparty/qtsingleapplication/qtlocalpeer.cpp
|
../3rdparty/qtsingleapplication/qtlocalpeer.cpp
|
||||||
../3rdparty/qtsingleapplication/qtsingleapplication.cpp
|
../3rdparty/qtsingleapplication/qtsingleapplication.cpp
|
||||||
../3rdparty/qtsingleapplication/qtsinglecoreapplication.cpp
|
../3rdparty/qtsingleapplication/qtsinglecoreapplication.cpp
|
||||||
|
../3rdparty/kmessagewidget/kmessagewidget.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
if (APPLE)
|
|
||||||
list(APPEND 3rdparty_SRC
|
|
||||||
../3rdparty/qtmacgoodies/src/macpreferenceswindow.mm
|
|
||||||
../3rdparty/qtmacgoodies/src/macstandardicon.mm
|
|
||||||
../3rdparty/qtmacgoodies/src/macwindow.mm
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(NOT WIN32)
|
if(NOT WIN32)
|
||||||
list(APPEND 3rdparty_SRC ../3rdparty/qtlockedfile/qtlockedfile_unix.cpp)
|
list(APPEND 3rdparty_SRC ../3rdparty/qtlockedfile/qtlockedfile_unix.cpp)
|
||||||
else()
|
else()
|
||||||
@@ -243,7 +243,7 @@ if(APPLE)
|
|||||||
file(GLOB_RECURSE OWNCLOUD_SIDEBAR_ICONS "${theme_dir}/colored/*-${APPLICATION_ICON_NAME}-sidebar*")
|
file(GLOB_RECURSE OWNCLOUD_SIDEBAR_ICONS "${theme_dir}/colored/*-${APPLICATION_ICON_NAME}-sidebar*")
|
||||||
MESSAGE(STATUS "OWNCLOUD_SIDEBAR_ICONS: ${APPLICATION_ICON_NAME}: ${OWNCLOUD_SIDEBAR_ICONS}")
|
MESSAGE(STATUS "OWNCLOUD_SIDEBAR_ICONS: ${APPLICATION_ICON_NAME}: ${OWNCLOUD_SIDEBAR_ICONS}")
|
||||||
endif()
|
endif()
|
||||||
ecm_add_app_icon(final_src ICONS "${OWNCLOUD_ICONS}" SIDEBAR_ICONS "${OWNCLOUD_SIDEBAR_ICONS}" OUTFILE_BASE "${APPLICATION_ICON_NAME}")
|
ecm_add_app_icon(final_src ICONS "${OWNCLOUD_ICONS}" SIDEBAR_ICONS "${OWNCLOUD_SIDEBAR_ICONS}" OUTFILE_BASENAME "${APPLICATION_ICON_NAME}")
|
||||||
|
|
||||||
if(UNIX AND NOT APPLE)
|
if(UNIX AND NOT APPLE)
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIE")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIE")
|
||||||
@@ -265,6 +265,9 @@ if(NOT BUILD_OWNCLOUD_OSX_BUNDLE)
|
|||||||
endforeach(_file)
|
endforeach(_file)
|
||||||
install(FILES ${client_I18N} DESTINATION ${SHAREDIR}/${APPLICATION_EXECUTABLE}/i18n)
|
install(FILES ${client_I18N} DESTINATION ${SHAREDIR}/${APPLICATION_EXECUTABLE}/i18n)
|
||||||
else()
|
else()
|
||||||
|
file(GLOB_RECURSE VISUAL_ELEMENTS "${theme_dir}/colored/*-${APPLICATION_ICON_NAME}-w10startmenu*")
|
||||||
|
install(FILES ${VISUAL_ELEMENTS} DESTINATION bin/visualelements)
|
||||||
|
install(FILES "${theme_dir}/${APPLICATION_EXECUTABLE}.VisualElementsManifest.xml" DESTINATION bin)
|
||||||
install(FILES ${client_I18N} DESTINATION i18n)
|
install(FILES ${client_I18N} DESTINATION i18n)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@@ -327,8 +330,8 @@ ENDIF()
|
|||||||
target_include_directories(${APPLICATION_EXECUTABLE} PRIVATE
|
target_include_directories(${APPLICATION_EXECUTABLE} PRIVATE
|
||||||
${CMAKE_SOURCE_DIR}/src/3rdparty/QProgressIndicator
|
${CMAKE_SOURCE_DIR}/src/3rdparty/QProgressIndicator
|
||||||
${CMAKE_SOURCE_DIR}/src/3rdparty/qtlockedfile
|
${CMAKE_SOURCE_DIR}/src/3rdparty/qtlockedfile
|
||||||
${CMAKE_SOURCE_DIR}/src/3rdparty/qtmacgoodies/src
|
|
||||||
${CMAKE_SOURCE_DIR}/src/3rdparty/qtsingleapplication
|
${CMAKE_SOURCE_DIR}/src/3rdparty/qtsingleapplication
|
||||||
|
${CMAKE_SOURCE_DIR}/src/3rdparty/kmessagewidget
|
||||||
${CMAKE_CURRENT_BINARY_DIR}
|
${CMAKE_CURRENT_BINARY_DIR}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -342,9 +342,6 @@ AccountPtr AccountManager::createAccount()
|
|||||||
connect(acc.data(), &Account::proxyAuthenticationRequired,
|
connect(acc.data(), &Account::proxyAuthenticationRequired,
|
||||||
ProxyAuthHandler::instance(), &ProxyAuthHandler::handleProxyAuthenticationRequired);
|
ProxyAuthHandler::instance(), &ProxyAuthHandler::handleProxyAuthenticationRequired);
|
||||||
|
|
||||||
connect(acc.data()->e2e(), &ClientSideEncryption::mnemonicGenerated,
|
|
||||||
&AccountManager::displayMnemonic);
|
|
||||||
|
|
||||||
return acc;
|
return acc;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -364,12 +361,14 @@ void AccountManager::displayMnemonic(const QString& mnemonic)
|
|||||||
widget->exec();
|
widget->exec();
|
||||||
widget->resize(widget->sizeHint());
|
widget->resize(widget->sizeHint());
|
||||||
}
|
}
|
||||||
|
|
||||||
void AccountManager::shutdown()
|
void AccountManager::shutdown()
|
||||||
{
|
{
|
||||||
auto accountsCopy = _accounts;
|
auto accountsCopy = _accounts;
|
||||||
_accounts.clear();
|
_accounts.clear();
|
||||||
foreach (const auto &acc, accountsCopy) {
|
foreach (const auto &acc, accountsCopy) {
|
||||||
emit accountRemoved(acc.data());
|
emit accountRemoved(acc.data());
|
||||||
|
emit removeAccountFolders(acc.data());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -70,7 +70,6 @@ public:
|
|||||||
*/
|
*/
|
||||||
void deleteAccount(AccountState *account);
|
void deleteAccount(AccountState *account);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates an account and sets up some basic handlers.
|
* Creates an account and sets up some basic handlers.
|
||||||
* Does *not* add the account to the account manager just yet.
|
* Does *not* add the account to the account manager just yet.
|
||||||
@@ -104,6 +103,7 @@ public slots:
|
|||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
void accountAdded(AccountState *account);
|
void accountAdded(AccountState *account);
|
||||||
void accountRemoved(AccountState *account);
|
void accountRemoved(AccountState *account);
|
||||||
|
void removeAccountFolders(AccountState *account);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
AccountManager() {}
|
AccountManager() {}
|
||||||
|
|||||||
@@ -35,10 +35,12 @@
|
|||||||
#include "filesystem.h"
|
#include "filesystem.h"
|
||||||
#include "clientsideencryptionjobs.h"
|
#include "clientsideencryptionjobs.h"
|
||||||
#include "syncresult.h"
|
#include "syncresult.h"
|
||||||
|
#include "ignorelisttablewidget.h"
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#include <QDesktopServices>
|
#include <QDesktopServices>
|
||||||
|
#include <QDialogButtonBox>
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QListWidgetItem>
|
#include <QListWidgetItem>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
@@ -55,10 +57,6 @@
|
|||||||
|
|
||||||
#include "account.h"
|
#include "account.h"
|
||||||
|
|
||||||
#ifdef Q_OS_MAC
|
|
||||||
#include "settingsdialogmac.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace OCC {
|
namespace OCC {
|
||||||
|
|
||||||
Q_LOGGING_CATEGORY(lcAccountSettings, "nextcloud.gui.account.settings", QtInfoMsg)
|
Q_LOGGING_CATEGORY(lcAccountSettings, "nextcloud.gui.account.settings", QtInfoMsg)
|
||||||
@@ -111,13 +109,13 @@ protected:
|
|||||||
|
|
||||||
AccountSettings::AccountSettings(AccountState *accountState, QWidget *parent)
|
AccountSettings::AccountSettings(AccountState *accountState, QWidget *parent)
|
||||||
: QWidget(parent)
|
: QWidget(parent)
|
||||||
, ui(new Ui::AccountSettings)
|
, _ui(new Ui::AccountSettings)
|
||||||
, _wasDisabledBefore(false)
|
, _wasDisabledBefore(false)
|
||||||
, _accountState(accountState)
|
, _accountState(accountState)
|
||||||
, _quotaInfo(accountState)
|
, _quotaInfo(accountState)
|
||||||
, _menuShown(false)
|
, _menuShown(false)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
_ui->setupUi(this);
|
||||||
|
|
||||||
_model = new FolderStatusModel;
|
_model = new FolderStatusModel;
|
||||||
_model->setAccountState(_accountState);
|
_model->setAccountState(_accountState);
|
||||||
@@ -125,35 +123,40 @@ AccountSettings::AccountSettings(AccountState *accountState, QWidget *parent)
|
|||||||
FolderStatusDelegate *delegate = new FolderStatusDelegate;
|
FolderStatusDelegate *delegate = new FolderStatusDelegate;
|
||||||
delegate->setParent(this);
|
delegate->setParent(this);
|
||||||
|
|
||||||
ui->_folderList->header()->hide();
|
// Connect styleChanged events to our widgets, so they can adapt (Dark-/Light-Mode switching)
|
||||||
ui->_folderList->setItemDelegate(delegate);
|
connect(this, &AccountSettings::styleChanged, delegate, &FolderStatusDelegate::slotStyleChanged);
|
||||||
ui->_folderList->setModel(_model);
|
|
||||||
|
_ui->_folderList->header()->hide();
|
||||||
|
_ui->_folderList->setItemDelegate(delegate);
|
||||||
|
_ui->_folderList->setModel(_model);
|
||||||
#if defined(Q_OS_MAC)
|
#if defined(Q_OS_MAC)
|
||||||
ui->_folderList->setMinimumWidth(400);
|
_ui->_folderList->setMinimumWidth(400);
|
||||||
#else
|
#else
|
||||||
ui->_folderList->setMinimumWidth(300);
|
_ui->_folderList->setMinimumWidth(300);
|
||||||
#endif
|
#endif
|
||||||
new ToolTipUpdater(ui->_folderList);
|
new ToolTipUpdater(_ui->_folderList);
|
||||||
|
|
||||||
auto mouseCursorChanger = new MouseCursorChanger(this);
|
auto mouseCursorChanger = new MouseCursorChanger(this);
|
||||||
mouseCursorChanger->folderList = ui->_folderList;
|
mouseCursorChanger->folderList = _ui->_folderList;
|
||||||
mouseCursorChanger->model = _model;
|
mouseCursorChanger->model = _model;
|
||||||
ui->_folderList->setMouseTracking(true);
|
_ui->_folderList->setMouseTracking(true);
|
||||||
ui->_folderList->setAttribute(Qt::WA_Hover, true);
|
_ui->_folderList->setAttribute(Qt::WA_Hover, true);
|
||||||
ui->_folderList->installEventFilter(mouseCursorChanger);
|
_ui->_folderList->installEventFilter(mouseCursorChanger);
|
||||||
|
|
||||||
createAccountToolbox();
|
createAccountToolbox();
|
||||||
connect(AccountManager::instance(), &AccountManager::accountAdded,
|
connect(AccountManager::instance(), &AccountManager::accountAdded,
|
||||||
this, &AccountSettings::slotAccountAdded);
|
this, &AccountSettings::slotAccountAdded);
|
||||||
connect(ui->_folderList, &QWidget::customContextMenuRequested,
|
connect(this, &AccountSettings::removeAccountFolders,
|
||||||
|
AccountManager::instance(), &AccountManager::removeAccountFolders);
|
||||||
|
connect(_ui->_folderList, &QWidget::customContextMenuRequested,
|
||||||
this, &AccountSettings::slotCustomContextMenuRequested);
|
this, &AccountSettings::slotCustomContextMenuRequested);
|
||||||
connect(ui->_folderList, &QAbstractItemView::clicked,
|
connect(_ui->_folderList, &QAbstractItemView::clicked,
|
||||||
this, &AccountSettings::slotFolderListClicked);
|
this, &AccountSettings::slotFolderListClicked);
|
||||||
connect(ui->_folderList, &QTreeView::expanded, this, &AccountSettings::refreshSelectiveSyncStatus);
|
connect(_ui->_folderList, &QTreeView::expanded, this, &AccountSettings::refreshSelectiveSyncStatus);
|
||||||
connect(ui->_folderList, &QTreeView::collapsed, this, &AccountSettings::refreshSelectiveSyncStatus);
|
connect(_ui->_folderList, &QTreeView::collapsed, this, &AccountSettings::refreshSelectiveSyncStatus);
|
||||||
connect(ui->selectiveSyncNotification, &QLabel::linkActivated,
|
connect(_ui->selectiveSyncNotification, &QLabel::linkActivated,
|
||||||
this, &AccountSettings::slotLinkActivated);
|
this, &AccountSettings::slotLinkActivated);
|
||||||
connect(_model, &FolderStatusModel::suggestExpand, ui->_folderList, &QTreeView::expand);
|
connect(_model, &FolderStatusModel::suggestExpand, _ui->_folderList, &QTreeView::expand);
|
||||||
connect(_model, &FolderStatusModel::dirtyChanged, this, &AccountSettings::refreshSelectiveSyncStatus);
|
connect(_model, &FolderStatusModel::dirtyChanged, this, &AccountSettings::refreshSelectiveSyncStatus);
|
||||||
refreshSelectiveSyncStatus();
|
refreshSelectiveSyncStatus();
|
||||||
connect(_model, &QAbstractItemModel::rowsInserted,
|
connect(_model, &QAbstractItemModel::rowsInserted,
|
||||||
@@ -170,20 +173,21 @@ AccountSettings::AccountSettings(AccountState *accountState, QWidget *parent)
|
|||||||
addAction(syncNowWithRemoteDiscovery);
|
addAction(syncNowWithRemoteDiscovery);
|
||||||
|
|
||||||
|
|
||||||
connect(ui->selectiveSyncApply, &QAbstractButton::clicked, _model, &FolderStatusModel::slotApplySelectiveSync);
|
connect(_ui->selectiveSyncApply, &QAbstractButton::clicked, _model, &FolderStatusModel::slotApplySelectiveSync);
|
||||||
connect(ui->selectiveSyncCancel, &QAbstractButton::clicked, _model, &FolderStatusModel::resetFolders);
|
connect(_ui->selectiveSyncCancel, &QAbstractButton::clicked, _model, &FolderStatusModel::resetFolders);
|
||||||
connect(ui->bigFolderApply, &QAbstractButton::clicked, _model, &FolderStatusModel::slotApplySelectiveSync);
|
connect(_ui->bigFolderApply, &QAbstractButton::clicked, _model, &FolderStatusModel::slotApplySelectiveSync);
|
||||||
connect(ui->bigFolderSyncAll, &QAbstractButton::clicked, _model, &FolderStatusModel::slotSyncAllPendingBigFolders);
|
connect(_ui->bigFolderSyncAll, &QAbstractButton::clicked, _model, &FolderStatusModel::slotSyncAllPendingBigFolders);
|
||||||
connect(ui->bigFolderSyncNone, &QAbstractButton::clicked, _model, &FolderStatusModel::slotSyncNoPendingBigFolders);
|
connect(_ui->bigFolderSyncNone, &QAbstractButton::clicked, _model, &FolderStatusModel::slotSyncNoPendingBigFolders);
|
||||||
|
|
||||||
connect(FolderMan::instance(), &FolderMan::folderListChanged, _model, &FolderStatusModel::resetFolders);
|
connect(FolderMan::instance(), &FolderMan::folderListChanged, _model, &FolderStatusModel::resetFolders);
|
||||||
connect(this, &AccountSettings::folderChanged, _model, &FolderStatusModel::resetFolders);
|
connect(this, &AccountSettings::folderChanged, _model, &FolderStatusModel::resetFolders);
|
||||||
|
|
||||||
|
|
||||||
QColor color = palette().highlight().color();
|
// quotaProgressBar style now set in customizeStyle()
|
||||||
ui->quotaProgressBar->setStyleSheet(QString::fromLatin1(progressBarStyleC).arg(color.name()));
|
/*QColor color = palette().highlight().color();
|
||||||
|
_ui->quotaProgressBar->setStyleSheet(QString::fromLatin1(progressBarStyleC).arg(color.name()));*/
|
||||||
|
|
||||||
ui->connectLabel->setText(tr("No account configured."));
|
_ui->connectLabel->setText(tr("No account configured."));
|
||||||
|
|
||||||
connect(_accountState, &AccountState::stateChanged, this, &AccountSettings::slotAccountStateChanged);
|
connect(_accountState, &AccountState::stateChanged, this, &AccountSettings::slotAccountStateChanged);
|
||||||
slotAccountStateChanged();
|
slotAccountStateChanged();
|
||||||
@@ -194,6 +198,16 @@ AccountSettings::AccountSettings(AccountState *accountState, QWidget *parent)
|
|||||||
// Connect E2E stuff
|
// Connect E2E stuff
|
||||||
connect(this, &AccountSettings::requesetMnemonic, _accountState->account()->e2e(), &ClientSideEncryption::slotRequestMnemonic);
|
connect(this, &AccountSettings::requesetMnemonic, _accountState->account()->e2e(), &ClientSideEncryption::slotRequestMnemonic);
|
||||||
connect(_accountState->account()->e2e(), &ClientSideEncryption::showMnemonic, this, &AccountSettings::slotShowMnemonic);
|
connect(_accountState->account()->e2e(), &ClientSideEncryption::showMnemonic, this, &AccountSettings::slotShowMnemonic);
|
||||||
|
|
||||||
|
connect(_accountState->account()->e2e(), &ClientSideEncryption::mnemonicGenerated, this, &AccountSettings::slotNewMnemonicGenerated);
|
||||||
|
if (_accountState->account()->e2e()->newMnemonicGenerated())
|
||||||
|
{
|
||||||
|
slotNewMnemonicGenerated();
|
||||||
|
} else {
|
||||||
|
_ui->encryptionMessage->hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
customizeStyle();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -215,19 +229,32 @@ void AccountSettings::createAccountToolbox()
|
|||||||
menu->addAction(action);
|
menu->addAction(action);
|
||||||
connect(action, &QAction::triggered, this, &AccountSettings::slotDeleteAccount);
|
connect(action, &QAction::triggered, this, &AccountSettings::slotDeleteAccount);
|
||||||
|
|
||||||
ui->_accountToolbox->setText(tr("Account") + QLatin1Char(' '));
|
_ui->_accountToolbox->setText(tr("Account") + QLatin1Char(' '));
|
||||||
ui->_accountToolbox->setMenu(menu);
|
_ui->_accountToolbox->setMenu(menu);
|
||||||
ui->_accountToolbox->setPopupMode(QToolButton::InstantPopup);
|
_ui->_accountToolbox->setPopupMode(QToolButton::InstantPopup);
|
||||||
|
|
||||||
slotAccountAdded(_accountState);
|
slotAccountAdded(_accountState);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void AccountSettings::slotNewMnemonicGenerated()
|
||||||
|
{
|
||||||
|
_ui->encryptionMessage->setText(tr("This account supports end-to-end encryption"));
|
||||||
|
|
||||||
|
QAction *mnemonic = new QAction(tr("Enable encryption"), this);
|
||||||
|
connect(mnemonic, &QAction::triggered, this, &AccountSettings::requesetMnemonic);
|
||||||
|
connect(mnemonic, &QAction::triggered, _ui->encryptionMessage, &KMessageWidget::hide);
|
||||||
|
|
||||||
|
_ui->encryptionMessage->addAction(mnemonic);
|
||||||
|
_ui->encryptionMessage->show();
|
||||||
|
}
|
||||||
|
|
||||||
void AccountSettings::slotMenuBeforeShow() {
|
void AccountSettings::slotMenuBeforeShow() {
|
||||||
if (_menuShown) {
|
if (_menuShown) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto menu = ui->_accountToolbox->menu();
|
auto menu = _ui->_accountToolbox->menu();
|
||||||
|
|
||||||
// We can't check this during the initial creation as there is no account yet then
|
// We can't check this during the initial creation as there is no account yet then
|
||||||
if (_accountState->account()->capabilities().clientSideEncryptionAvaliable()) {
|
if (_accountState->account()->capabilities().clientSideEncryptionAvaliable()) {
|
||||||
@@ -242,7 +269,7 @@ void AccountSettings::slotMenuBeforeShow() {
|
|||||||
|
|
||||||
QString AccountSettings::selectedFolderAlias() const
|
QString AccountSettings::selectedFolderAlias() const
|
||||||
{
|
{
|
||||||
QModelIndex selected = ui->_folderList->selectionModel()->currentIndex();
|
QModelIndex selected = _ui->_folderList->selectionModel()->currentIndex();
|
||||||
if (!selected.isValid())
|
if (!selected.isValid())
|
||||||
return "";
|
return "";
|
||||||
return _model->data(selected, FolderStatusDelegate::FolderAliasRole).toString();
|
return _model->data(selected, FolderStatusDelegate::FolderAliasRole).toString();
|
||||||
@@ -255,16 +282,7 @@ void AccountSettings::slotOpenAccountWizard()
|
|||||||
if (qgetenv("QT_QPA_PLATFORMTHEME") == "appmenu-qt5" || QSystemTrayIcon::isSystemTrayAvailable()) {
|
if (qgetenv("QT_QPA_PLATFORMTHEME") == "appmenu-qt5" || QSystemTrayIcon::isSystemTrayAvailable()) {
|
||||||
topLevelWidget()->close();
|
topLevelWidget()->close();
|
||||||
}
|
}
|
||||||
#ifdef Q_OS_MAC
|
|
||||||
qCDebug(lcAccountSettings) << parent() << topLevelWidget();
|
|
||||||
SettingsDialogMac *sd = qobject_cast<SettingsDialogMac *>(topLevelWidget());
|
|
||||||
|
|
||||||
if (sd) {
|
|
||||||
sd->showActivityPage();
|
|
||||||
} else {
|
|
||||||
qFatal("nope");
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
OwncloudSetupWizard::runWizard(qApp, SLOT(slotownCloudWizardDone(int)), nullptr);
|
OwncloudSetupWizard::runWizard(qApp, SLOT(slotownCloudWizardDone(int)), nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -280,7 +298,7 @@ void AccountSettings::slotToggleSignInState()
|
|||||||
|
|
||||||
void AccountSettings::doExpand()
|
void AccountSettings::doExpand()
|
||||||
{
|
{
|
||||||
ui->_folderList->expandToDepth(0);
|
_ui->_folderList->expandToDepth(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AccountSettings::slotShowMnemonic(const QString &mnemonic) {
|
void AccountSettings::slotShowMnemonic(const QString &mnemonic) {
|
||||||
@@ -311,9 +329,9 @@ void AccountSettings::slotEncryptionFlagError(const QByteArray& fileId, int http
|
|||||||
|
|
||||||
void AccountSettings::slotLockForEncryptionSuccess(const QByteArray& fileId, const QByteArray &token)
|
void AccountSettings::slotLockForEncryptionSuccess(const QByteArray& fileId, const QByteArray &token)
|
||||||
{
|
{
|
||||||
accountsState()->account()->e2e()->setTokenForFolder(fileId, token);
|
accountsState()->account()->e2e()->setTokenForFolder(fileId, token);
|
||||||
|
|
||||||
FolderMetadata emptyMetadata(accountsState()->account());
|
FolderMetadata emptyMetadata(accountsState()->account());
|
||||||
auto encryptedMetadata = emptyMetadata.encryptedMetadata();
|
auto encryptedMetadata = emptyMetadata.encryptedMetadata();
|
||||||
if (encryptedMetadata.isEmpty()) {
|
if (encryptedMetadata.isEmpty()) {
|
||||||
//TODO: Mark the folder as unencrypted as the metadata generation failed.
|
//TODO: Mark the folder as unencrypted as the metadata generation failed.
|
||||||
@@ -325,36 +343,36 @@ void AccountSettings::slotLockForEncryptionSuccess(const QByteArray& fileId, con
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
auto storeMetadataJob = new StoreMetaDataApiJob(accountsState()->account(), fileId, emptyMetadata.encryptedMetadata());
|
auto storeMetadataJob = new StoreMetaDataApiJob(accountsState()->account(), fileId, emptyMetadata.encryptedMetadata());
|
||||||
connect(storeMetadataJob, &StoreMetaDataApiJob::success,
|
connect(storeMetadataJob, &StoreMetaDataApiJob::success,
|
||||||
this, &AccountSettings::slotUploadMetadataSuccess);
|
this, &AccountSettings::slotUploadMetadataSuccess);
|
||||||
connect(storeMetadataJob, &StoreMetaDataApiJob::error,
|
connect(storeMetadataJob, &StoreMetaDataApiJob::error,
|
||||||
this, &AccountSettings::slotUpdateMetadataError);
|
this, &AccountSettings::slotUpdateMetadataError);
|
||||||
|
|
||||||
storeMetadataJob->start();
|
storeMetadataJob->start();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AccountSettings::slotUploadMetadataSuccess(const QByteArray& folderId)
|
void AccountSettings::slotUploadMetadataSuccess(const QByteArray& folderId)
|
||||||
{
|
{
|
||||||
const auto token = accountsState()->account()->e2e()->tokenForFolder(folderId);
|
const auto token = accountsState()->account()->e2e()->tokenForFolder(folderId);
|
||||||
auto unlockJob = new UnlockEncryptFolderApiJob(accountsState()->account(), folderId, token);
|
auto unlockJob = new UnlockEncryptFolderApiJob(accountsState()->account(), folderId, token);
|
||||||
connect(unlockJob, &UnlockEncryptFolderApiJob::success,
|
connect(unlockJob, &UnlockEncryptFolderApiJob::success,
|
||||||
this, &AccountSettings::slotUnlockFolderSuccess);
|
this, &AccountSettings::slotUnlockFolderSuccess);
|
||||||
connect(unlockJob, &UnlockEncryptFolderApiJob::error,
|
connect(unlockJob, &UnlockEncryptFolderApiJob::error,
|
||||||
this, &AccountSettings::slotUnlockFolderError);
|
this, &AccountSettings::slotUnlockFolderError);
|
||||||
unlockJob->start();
|
unlockJob->start();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AccountSettings::slotUpdateMetadataError(const QByteArray& folderId, int httpReturnCode)
|
void AccountSettings::slotUpdateMetadataError(const QByteArray& folderId, int httpReturnCode)
|
||||||
{
|
{
|
||||||
Q_UNUSED(httpReturnCode);
|
Q_UNUSED(httpReturnCode);
|
||||||
|
|
||||||
const auto token = accountsState()->account()->e2e()->tokenForFolder(folderId);
|
const auto token = accountsState()->account()->e2e()->tokenForFolder(folderId);
|
||||||
auto unlockJob = new UnlockEncryptFolderApiJob(accountsState()->account(), folderId, token);
|
auto unlockJob = new UnlockEncryptFolderApiJob(accountsState()->account(), folderId, token);
|
||||||
connect(unlockJob, &UnlockEncryptFolderApiJob::success,
|
connect(unlockJob, &UnlockEncryptFolderApiJob::success,
|
||||||
this, &AccountSettings::slotUnlockFolderSuccess);
|
this, &AccountSettings::slotUnlockFolderSuccess);
|
||||||
connect(unlockJob, &UnlockEncryptFolderApiJob::error,
|
connect(unlockJob, &UnlockEncryptFolderApiJob::error,
|
||||||
this, &AccountSettings::slotUnlockFolderError);
|
this, &AccountSettings::slotUnlockFolderError);
|
||||||
unlockJob->start();
|
unlockJob->start();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AccountSettings::slotLockForEncryptionError(const QByteArray& fileId, int httpErrorCode)
|
void AccountSettings::slotLockForEncryptionError(const QByteArray& fileId, int httpErrorCode)
|
||||||
@@ -401,7 +419,7 @@ bool AccountSettings::canEncryptOrDecrypt (const FolderStatusModel::SubFolderInf
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AccountSettings::slotMarkSubfolderEncrpted(const FolderStatusModel::SubFolderInfo* folderInfo)
|
void AccountSettings::slotMarkSubfolderEncrypted(const FolderStatusModel::SubFolderInfo* folderInfo)
|
||||||
{
|
{
|
||||||
if (!canEncryptOrDecrypt(folderInfo)) {
|
if (!canEncryptOrDecrypt(folderInfo)) {
|
||||||
return;
|
return;
|
||||||
@@ -518,6 +536,51 @@ void AccountSettings::slotLockForDecryptionError(const QByteArray& fileId, int h
|
|||||||
qDebug() << "Error Locking for decryption";
|
qDebug() << "Error Locking for decryption";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AccountSettings::slotEditCurrentIgnoredFiles()
|
||||||
|
{
|
||||||
|
Folder *f = FolderMan::instance()->folder(selectedFolderAlias());
|
||||||
|
if (f == nullptr)
|
||||||
|
return;
|
||||||
|
openIgnoredFilesDialog(f->path());
|
||||||
|
}
|
||||||
|
|
||||||
|
void AccountSettings::slotEditCurrentLocalIgnoredFiles()
|
||||||
|
{
|
||||||
|
QModelIndex selected = _ui->_folderList->selectionModel()->currentIndex();
|
||||||
|
if (!selected.isValid() || _model->classify(selected) != FolderStatusModel::SubFolder)
|
||||||
|
return;
|
||||||
|
QString fileName = _model->data(selected, FolderStatusDelegate::FolderPathRole).toString();
|
||||||
|
openIgnoredFilesDialog(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
void AccountSettings::openIgnoredFilesDialog(const QString & absFolderPath)
|
||||||
|
{
|
||||||
|
Q_ASSERT(absFolderPath.startsWith('/'));
|
||||||
|
Q_ASSERT(absFolderPath.endsWith('/'));
|
||||||
|
|
||||||
|
const QString ignoreFile = absFolderPath + ".sync-exclude.lst";
|
||||||
|
auto layout = new QVBoxLayout();
|
||||||
|
auto ignoreListWidget = new IgnoreListTableWidget(this);
|
||||||
|
ignoreListWidget->readIgnoreFile(ignoreFile);
|
||||||
|
layout->addWidget(ignoreListWidget);
|
||||||
|
|
||||||
|
auto buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
|
||||||
|
layout->addWidget(buttonBox);
|
||||||
|
|
||||||
|
auto dialog = new QDialog();
|
||||||
|
dialog->setLayout(layout);
|
||||||
|
|
||||||
|
connect(buttonBox, &QDialogButtonBox::clicked, [=](QAbstractButton * button) {
|
||||||
|
if (buttonBox->buttonRole(button) == QDialogButtonBox::AcceptRole)
|
||||||
|
ignoreListWidget->slotWriteIgnoreFile(ignoreFile);
|
||||||
|
dialog->close();
|
||||||
|
});
|
||||||
|
connect(buttonBox, &QDialogButtonBox::rejected,
|
||||||
|
dialog, &QDialog::close);
|
||||||
|
|
||||||
|
dialog->open();
|
||||||
|
}
|
||||||
|
|
||||||
void AccountSettings::slotSubfolderContextMenuRequested(const QModelIndex& index, const QPoint& pos)
|
void AccountSettings::slotSubfolderContextMenuRequested(const QModelIndex& index, const QPoint& pos)
|
||||||
{
|
{
|
||||||
Q_UNUSED(pos);
|
Q_UNUSED(pos);
|
||||||
@@ -540,18 +603,22 @@ void AccountSettings::slotSubfolderContextMenuRequested(const QModelIndex& index
|
|||||||
|
|
||||||
if (!isEncrypted) {
|
if (!isEncrypted) {
|
||||||
ac = menu.addAction(tr("Encrypt"));
|
ac = menu.addAction(tr("Encrypt"));
|
||||||
connect(ac, &QAction::triggered, [this, &info] { slotMarkSubfolderEncrpted(info); });
|
connect(ac, &QAction::triggered, [this, &info] { slotMarkSubfolderEncrypted(info); });
|
||||||
} else {
|
} else {
|
||||||
// Ingore decrypting for now since it only works with an empty folder
|
// Ingore decrypting for now since it only works with an empty folder
|
||||||
// connect(ac, &QAction::triggered, [this, &info] { slotMarkSubfolderDecrypted(info); });
|
// connect(ac, &QAction::triggered, [this, &info] { slotMarkSubfolderDecrypted(info); });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ac = menu.addAction(tr("Edit Ignored Files"));
|
||||||
|
connect(ac, &QAction::triggered, this, &AccountSettings::slotEditCurrentLocalIgnoredFiles);
|
||||||
|
|
||||||
menu.exec(QCursor::pos());
|
menu.exec(QCursor::pos());
|
||||||
}
|
}
|
||||||
|
|
||||||
void AccountSettings::slotCustomContextMenuRequested(const QPoint &pos)
|
void AccountSettings::slotCustomContextMenuRequested(const QPoint &pos)
|
||||||
{
|
{
|
||||||
QTreeView *tv = ui->_folderList;
|
QTreeView *tv = _ui->_folderList;
|
||||||
QModelIndex index = tv->indexAt(pos);
|
QModelIndex index = tv->indexAt(pos);
|
||||||
if (!index.isValid()) {
|
if (!index.isValid()) {
|
||||||
return;
|
return;
|
||||||
@@ -579,7 +646,10 @@ void AccountSettings::slotCustomContextMenuRequested(const QPoint &pos)
|
|||||||
QAction *ac = menu->addAction(tr("Open folder"));
|
QAction *ac = menu->addAction(tr("Open folder"));
|
||||||
connect(ac, &QAction::triggered, this, &AccountSettings::slotOpenCurrentFolder);
|
connect(ac, &QAction::triggered, this, &AccountSettings::slotOpenCurrentFolder);
|
||||||
|
|
||||||
if (!ui->_folderList->isExpanded(index)) {
|
ac = menu->addAction(tr("Edit Ignored Files"));
|
||||||
|
connect(ac, &QAction::triggered, this, &AccountSettings::slotEditCurrentIgnoredFiles);
|
||||||
|
|
||||||
|
if (!_ui->_folderList->isExpanded(index)) {
|
||||||
ac = menu->addAction(tr("Choose what to sync"));
|
ac = menu->addAction(tr("Choose what to sync"));
|
||||||
ac->setEnabled(folderConnected);
|
ac->setEnabled(folderConnected);
|
||||||
connect(ac, &QAction::triggered, this, &AccountSettings::doExpand);
|
connect(ac, &QAction::triggered, this, &AccountSettings::doExpand);
|
||||||
@@ -618,7 +688,7 @@ void AccountSettings::slotFolderListClicked(const QModelIndex &indx)
|
|||||||
}
|
}
|
||||||
if (_model->classify(indx) == FolderStatusModel::RootFolder) {
|
if (_model->classify(indx) == FolderStatusModel::RootFolder) {
|
||||||
// tries to find if we clicked on the '...' button.
|
// tries to find if we clicked on the '...' button.
|
||||||
QTreeView *tv = ui->_folderList;
|
QTreeView *tv = _ui->_folderList;
|
||||||
auto pos = tv->mapFromGlobal(QCursor::pos());
|
auto pos = tv->mapFromGlobal(QCursor::pos());
|
||||||
if (FolderStatusDelegate::optionsButtonRect(tv->visualRect(indx), layoutDirection()).contains(pos)) {
|
if (FolderStatusDelegate::optionsButtonRect(tv->visualRect(indx), layoutDirection()).contains(pos)) {
|
||||||
slotCustomContextMenuRequested(pos);
|
slotCustomContextMenuRequested(pos);
|
||||||
@@ -631,8 +701,8 @@ void AccountSettings::slotFolderListClicked(const QModelIndex &indx)
|
|||||||
|
|
||||||
// Expand root items on single click
|
// Expand root items on single click
|
||||||
if (_accountState && _accountState->state() == AccountState::Connected) {
|
if (_accountState && _accountState->state() == AccountState::Connected) {
|
||||||
bool expanded = !(ui->_folderList->isExpanded(indx));
|
bool expanded = !(_ui->_folderList->isExpanded(indx));
|
||||||
ui->_folderList->setExpanded(indx, expanded);
|
_ui->_folderList->setExpanded(indx, expanded);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -669,7 +739,7 @@ void AccountSettings::slotFolderWizardAccepted()
|
|||||||
qCInfo(lcAccountSettings) << "Creating folder" << definition.localPath;
|
qCInfo(lcAccountSettings) << "Creating folder" << definition.localPath;
|
||||||
if (!dir.mkpath(".")) {
|
if (!dir.mkpath(".")) {
|
||||||
QMessageBox::warning(this, tr("Folder creation failed"),
|
QMessageBox::warning(this, tr("Folder creation failed"),
|
||||||
tr("<p>Could not create local folder <i>%1</i>.")
|
tr("<p>Could not create local folder <i>%1</i>.</p>")
|
||||||
.arg(QDir::toNativeSeparators(definition.localPath)));
|
.arg(QDir::toNativeSeparators(definition.localPath)));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -714,7 +784,7 @@ void AccountSettings::slotRemoveCurrentFolder()
|
|||||||
{
|
{
|
||||||
FolderMan *folderMan = FolderMan::instance();
|
FolderMan *folderMan = FolderMan::instance();
|
||||||
auto folder = folderMan->folder(selectedFolderAlias());
|
auto folder = folderMan->folder(selectedFolderAlias());
|
||||||
QModelIndex selected = ui->_folderList->selectionModel()->currentIndex();
|
QModelIndex selected = _ui->_folderList->selectionModel()->currentIndex();
|
||||||
if (selected.isValid() && folder) {
|
if (selected.isValid() && folder) {
|
||||||
int row = selected.row();
|
int row = selected.row();
|
||||||
|
|
||||||
@@ -756,7 +826,7 @@ void AccountSettings::slotOpenCurrentFolder()
|
|||||||
|
|
||||||
void AccountSettings::slotOpenCurrentLocalSubFolder()
|
void AccountSettings::slotOpenCurrentLocalSubFolder()
|
||||||
{
|
{
|
||||||
QModelIndex selected = ui->_folderList->selectionModel()->currentIndex();
|
QModelIndex selected = _ui->_folderList->selectionModel()->currentIndex();
|
||||||
if (!selected.isValid() || _model->classify(selected) != FolderStatusModel::SubFolder)
|
if (!selected.isValid() || _model->classify(selected) != FolderStatusModel::SubFolder)
|
||||||
return;
|
return;
|
||||||
QString fileName = _model->data(selected, FolderStatusDelegate::FolderPathRole).toString();
|
QString fileName = _model->data(selected, FolderStatusDelegate::FolderPathRole).toString();
|
||||||
@@ -770,18 +840,21 @@ void AccountSettings::showConnectionLabel(const QString &message, QStringList er
|
|||||||
"border-width: 1px; border-style: solid; border-color: #aaaaaa;"
|
"border-width: 1px; border-style: solid; border-color: #aaaaaa;"
|
||||||
"border-radius:5px;");
|
"border-radius:5px;");
|
||||||
if (errors.isEmpty()) {
|
if (errors.isEmpty()) {
|
||||||
ui->connectLabel->setText(message);
|
QString msg = message;
|
||||||
ui->connectLabel->setToolTip(QString());
|
Theme::replaceLinkColorStringBackgroundAware(msg);
|
||||||
ui->connectLabel->setStyleSheet(QString());
|
_ui->connectLabel->setText(msg);
|
||||||
|
_ui->connectLabel->setToolTip(QString());
|
||||||
|
_ui->connectLabel->setStyleSheet(QString());
|
||||||
} else {
|
} else {
|
||||||
errors.prepend(message);
|
errors.prepend(message);
|
||||||
const QString msg = errors.join(QLatin1String("\n"));
|
QString msg = errors.join(QLatin1String("\n"));
|
||||||
qCDebug(lcAccountSettings) << msg;
|
qCDebug(lcAccountSettings) << msg;
|
||||||
ui->connectLabel->setText(msg);
|
Theme::replaceLinkColorString(msg, QColor("#c1c8e6"));
|
||||||
ui->connectLabel->setToolTip(QString());
|
_ui->connectLabel->setText(msg);
|
||||||
ui->connectLabel->setStyleSheet(errStyle);
|
_ui->connectLabel->setToolTip(QString());
|
||||||
|
_ui->connectLabel->setStyleSheet(errStyle);
|
||||||
}
|
}
|
||||||
ui->accountStatus->setVisible(!message.isEmpty());
|
_ui->accountStatus->setVisible(!message.isEmpty());
|
||||||
}
|
}
|
||||||
|
|
||||||
void AccountSettings::slotEnableCurrentFolder()
|
void AccountSettings::slotEnableCurrentFolder()
|
||||||
@@ -879,29 +952,29 @@ void AccountSettings::slotOpenOC()
|
|||||||
void AccountSettings::slotUpdateQuota(qint64 total, qint64 used)
|
void AccountSettings::slotUpdateQuota(qint64 total, qint64 used)
|
||||||
{
|
{
|
||||||
if (total > 0) {
|
if (total > 0) {
|
||||||
ui->quotaProgressBar->setVisible(true);
|
_ui->quotaProgressBar->setVisible(true);
|
||||||
ui->quotaProgressBar->setEnabled(true);
|
_ui->quotaProgressBar->setEnabled(true);
|
||||||
// workaround the label only accepting ints (which may be only 32 bit wide)
|
// workaround the label only accepting ints (which may be only 32 bit wide)
|
||||||
const double percent = used / (double)total * 100;
|
const double percent = used / (double)total * 100;
|
||||||
const int percentInt = qMin(qRound(percent), 100);
|
const int percentInt = qMin(qRound(percent), 100);
|
||||||
ui->quotaProgressBar->setValue(percentInt);
|
_ui->quotaProgressBar->setValue(percentInt);
|
||||||
QString usedStr = Utility::octetsToString(used);
|
QString usedStr = Utility::octetsToString(used);
|
||||||
QString totalStr = Utility::octetsToString(total);
|
QString totalStr = Utility::octetsToString(total);
|
||||||
QString percentStr = Utility::compactFormatDouble(percent, 1);
|
QString percentStr = Utility::compactFormatDouble(percent, 1);
|
||||||
QString toolTip = tr("%1 (%3%) of %2 in use. Some folders, including network mounted or shared folders, might have different limits.").arg(usedStr, totalStr, percentStr);
|
QString toolTip = tr("%1 (%3%) of %2 in use. Some folders, including network mounted or shared folders, might have different limits.").arg(usedStr, totalStr, percentStr);
|
||||||
ui->quotaInfoLabel->setText(tr("%1 of %2 in use").arg(usedStr, totalStr));
|
_ui->quotaInfoLabel->setText(tr("%1 of %2 in use").arg(usedStr, totalStr));
|
||||||
ui->quotaInfoLabel->setToolTip(toolTip);
|
_ui->quotaInfoLabel->setToolTip(toolTip);
|
||||||
ui->quotaProgressBar->setToolTip(toolTip);
|
_ui->quotaProgressBar->setToolTip(toolTip);
|
||||||
} else {
|
} else {
|
||||||
ui->quotaProgressBar->setVisible(false);
|
_ui->quotaProgressBar->setVisible(false);
|
||||||
ui->quotaInfoLabel->setToolTip(QString());
|
_ui->quotaInfoLabel->setToolTip(QString());
|
||||||
|
|
||||||
/* -1 means not computed; -2 means unknown; -3 means unlimited (#3940)*/
|
/* -1 means not computed; -2 means unknown; -3 means unlimited (#3940)*/
|
||||||
if (total == 0 || total == -1) {
|
if (total == 0 || total == -1) {
|
||||||
ui->quotaInfoLabel->setText(tr("Currently there is no storage usage information available."));
|
_ui->quotaInfoLabel->setText(tr("Currently there is no storage usage information available."));
|
||||||
} else {
|
} else {
|
||||||
QString usedStr = Utility::octetsToString(used);
|
QString usedStr = Utility::octetsToString(used);
|
||||||
ui->quotaInfoLabel->setText(tr("%1 in use").arg(usedStr));
|
_ui->quotaInfoLabel->setText(tr("%1 in use").arg(usedStr));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -910,7 +983,7 @@ void AccountSettings::slotAccountStateChanged()
|
|||||||
{
|
{
|
||||||
int state = _accountState ? _accountState->state() : AccountState::Disconnected;
|
int state = _accountState ? _accountState->state() : AccountState::Disconnected;
|
||||||
if (_accountState) {
|
if (_accountState) {
|
||||||
ui->sslButton->updateAccountState(_accountState);
|
_ui->sslButton->updateAccountState(_accountState);
|
||||||
AccountPtr account = _accountState->account();
|
AccountPtr account = _accountState->account();
|
||||||
QUrl safeUrl(account->url());
|
QUrl safeUrl(account->url());
|
||||||
safeUrl.setPassword(QString()); // Remove the password from the URL to avoid showing it in the UI
|
safeUrl.setPassword(QString()); // Remove the password from the URL to avoid showing it in the UI
|
||||||
@@ -955,7 +1028,7 @@ void AccountSettings::slotAccountStateChanged()
|
|||||||
"<a href='%1'>Click here</a> to re-open the browser.")
|
"<a href='%1'>Click here</a> to re-open the browser.")
|
||||||
.arg(url.toString(QUrl::FullyEncoded)));
|
.arg(url.toString(QUrl::FullyEncoded)));
|
||||||
} else {
|
} else {
|
||||||
showConnectionLabel(tr("Connecting to %1...").arg(serverWithUser));
|
showConnectionLabel(tr("Connecting to %1 …").arg(serverWithUser));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
showConnectionLabel(tr("No connection to %1 at %2.")
|
showConnectionLabel(tr("No connection to %1 at %2.")
|
||||||
@@ -969,14 +1042,14 @@ void AccountSettings::slotAccountStateChanged()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Allow to expand the item if the account is connected. */
|
/* Allow to expand the item if the account is connected. */
|
||||||
ui->_folderList->setItemsExpandable(state == AccountState::Connected);
|
_ui->_folderList->setItemsExpandable(state == AccountState::Connected);
|
||||||
|
|
||||||
if (state != AccountState::Connected) {
|
if (state != AccountState::Connected) {
|
||||||
/* check if there are expanded root items, if so, close them */
|
/* check if there are expanded root items, if so, close them */
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < _model->rowCount(); ++i) {
|
for (i = 0; i < _model->rowCount(); ++i) {
|
||||||
if (ui->_folderList->isExpanded(_model->index(i)))
|
if (_ui->_folderList->isExpanded(_model->index(i)))
|
||||||
ui->_folderList->setExpanded(_model->index(i), false);
|
_ui->_folderList->setExpanded(_model->index(i), false);
|
||||||
}
|
}
|
||||||
} else if (_model->isDirty()) {
|
} else if (_model->isDirty()) {
|
||||||
// If we connect and have pending changes, show the list.
|
// If we connect and have pending changes, show the list.
|
||||||
@@ -1020,21 +1093,21 @@ void AccountSettings::slotLinkActivated(const QString &link)
|
|||||||
// Make sure the folder itself is expanded
|
// Make sure the folder itself is expanded
|
||||||
Folder *f = FolderMan::instance()->folder(alias);
|
Folder *f = FolderMan::instance()->folder(alias);
|
||||||
QModelIndex folderIndx = _model->indexForPath(f, QString());
|
QModelIndex folderIndx = _model->indexForPath(f, QString());
|
||||||
if (!ui->_folderList->isExpanded(folderIndx)) {
|
if (!_ui->_folderList->isExpanded(folderIndx)) {
|
||||||
ui->_folderList->setExpanded(folderIndx, true);
|
_ui->_folderList->setExpanded(folderIndx, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
QModelIndex indx = _model->indexForPath(f, myFolder);
|
QModelIndex indx = _model->indexForPath(f, myFolder);
|
||||||
if (indx.isValid()) {
|
if (indx.isValid()) {
|
||||||
// make sure all the parents are expanded
|
// make sure all the parents are expanded
|
||||||
for (auto i = indx.parent(); i.isValid(); i = i.parent()) {
|
for (auto i = indx.parent(); i.isValid(); i = i.parent()) {
|
||||||
if (!ui->_folderList->isExpanded(i)) {
|
if (!_ui->_folderList->isExpanded(i)) {
|
||||||
ui->_folderList->setExpanded(i, true);
|
_ui->_folderList->setExpanded(i, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ui->_folderList->setSelectionMode(QAbstractItemView::SingleSelection);
|
_ui->_folderList->setSelectionMode(QAbstractItemView::SingleSelection);
|
||||||
ui->_folderList->setCurrentIndex(indx);
|
_ui->_folderList->setCurrentIndex(indx);
|
||||||
ui->_folderList->scrollTo(indx);
|
_ui->_folderList->scrollTo(indx);
|
||||||
} else {
|
} else {
|
||||||
qCWarning(lcAccountSettings) << "Unable to find a valid index for " << myFolder;
|
qCWarning(lcAccountSettings) << "Unable to find a valid index for " << myFolder;
|
||||||
}
|
}
|
||||||
@@ -1043,7 +1116,7 @@ void AccountSettings::slotLinkActivated(const QString &link)
|
|||||||
|
|
||||||
AccountSettings::~AccountSettings()
|
AccountSettings::~AccountSettings()
|
||||||
{
|
{
|
||||||
delete ui;
|
delete _ui;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AccountSettings::refreshSelectiveSyncStatus()
|
void AccountSettings::refreshSelectiveSyncStatus()
|
||||||
@@ -1081,8 +1154,8 @@ void AccountSettings::refreshSelectiveSyncStatus()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (msg.isEmpty()) {
|
if (msg.isEmpty()) {
|
||||||
ui->selectiveSyncButtons->setVisible(true);
|
_ui->selectiveSyncButtons->setVisible(true);
|
||||||
ui->bigFolderUi->setVisible(false);
|
_ui->bigFolderUi->setVisible(false);
|
||||||
} else {
|
} else {
|
||||||
ConfigFile cfg;
|
ConfigFile cfg;
|
||||||
QString info = !cfg.confirmExternalStorage()
|
QString info = !cfg.confirmExternalStorage()
|
||||||
@@ -1091,27 +1164,27 @@ void AccountSettings::refreshSelectiveSyncStatus()
|
|||||||
? tr("There are folders that were not synchronized because they are external storages: ")
|
? tr("There are folders that were not synchronized because they are external storages: ")
|
||||||
: tr("There are folders that were not synchronized because they are too big or external storages: ");
|
: tr("There are folders that were not synchronized because they are too big or external storages: ");
|
||||||
|
|
||||||
ui->selectiveSyncNotification->setText(info + msg);
|
_ui->selectiveSyncNotification->setText(info + msg);
|
||||||
ui->selectiveSyncButtons->setVisible(false);
|
_ui->selectiveSyncButtons->setVisible(false);
|
||||||
ui->bigFolderUi->setVisible(true);
|
_ui->bigFolderUi->setVisible(true);
|
||||||
shouldBeVisible = true;
|
shouldBeVisible = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
ui->selectiveSyncApply->setEnabled(_model->isDirty() || !msg.isEmpty());
|
_ui->selectiveSyncApply->setEnabled(_model->isDirty() || !msg.isEmpty());
|
||||||
bool wasVisible = !ui->selectiveSyncStatus->isHidden();
|
bool wasVisible = !_ui->selectiveSyncStatus->isHidden();
|
||||||
if (wasVisible != shouldBeVisible) {
|
if (wasVisible != shouldBeVisible) {
|
||||||
QSize hint = ui->selectiveSyncStatus->sizeHint();
|
QSize hint = _ui->selectiveSyncStatus->sizeHint();
|
||||||
if (shouldBeVisible) {
|
if (shouldBeVisible) {
|
||||||
ui->selectiveSyncStatus->setMaximumHeight(0);
|
_ui->selectiveSyncStatus->setMaximumHeight(0);
|
||||||
ui->selectiveSyncStatus->setVisible(true);
|
_ui->selectiveSyncStatus->setVisible(true);
|
||||||
}
|
}
|
||||||
auto anim = new QPropertyAnimation(ui->selectiveSyncStatus, "maximumHeight", ui->selectiveSyncStatus);
|
auto anim = new QPropertyAnimation(_ui->selectiveSyncStatus, "maximumHeight", _ui->selectiveSyncStatus);
|
||||||
anim->setEndValue(shouldBeVisible ? hint.height() : 0);
|
anim->setEndValue(shouldBeVisible ? hint.height() : 0);
|
||||||
anim->start(QAbstractAnimation::DeleteWhenStopped);
|
anim->start(QAbstractAnimation::DeleteWhenStopped);
|
||||||
connect(anim, &QPropertyAnimation::finished, [this, shouldBeVisible]() {
|
connect(anim, &QPropertyAnimation::finished, [this, shouldBeVisible]() {
|
||||||
ui->selectiveSyncStatus->setMaximumHeight(QWIDGETSIZE_MAX);
|
_ui->selectiveSyncStatus->setMaximumHeight(QWIDGETSIZE_MAX);
|
||||||
if (!shouldBeVisible) {
|
if (!shouldBeVisible) {
|
||||||
ui->selectiveSyncStatus->hide();
|
_ui->selectiveSyncStatus->hide();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -1171,12 +1244,30 @@ bool AccountSettings::event(QEvent *e)
|
|||||||
// Expand the folder automatically only if there's only one, see #4283
|
// Expand the folder automatically only if there's only one, see #4283
|
||||||
// The 2 is 1 folder + 1 'add folder' button
|
// The 2 is 1 folder + 1 'add folder' button
|
||||||
if (_model->rowCount() <= 2) {
|
if (_model->rowCount() <= 2) {
|
||||||
ui->_folderList->setExpanded(_model->index(0, 0), true);
|
_ui->_folderList->setExpanded(_model->index(0, 0), true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return QWidget::event(e);
|
return QWidget::event(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AccountSettings::slotStyleChanged()
|
||||||
|
{
|
||||||
|
customizeStyle();
|
||||||
|
|
||||||
|
// Notify the other widgets (Dark-/Light-Mode switching)
|
||||||
|
emit styleChanged();
|
||||||
|
}
|
||||||
|
|
||||||
|
void AccountSettings::customizeStyle()
|
||||||
|
{
|
||||||
|
QString msg = _ui->connectLabel->text();
|
||||||
|
Theme::replaceLinkColorStringBackgroundAware(msg);
|
||||||
|
_ui->connectLabel->setText(msg);
|
||||||
|
|
||||||
|
QColor color = palette().highlight().color();
|
||||||
|
_ui->quotaProgressBar->setStyleSheet(QString::fromLatin1(progressBarStyleC).arg(color.name()));
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace OCC
|
} // namespace OCC
|
||||||
|
|
||||||
#include "accountsettings.moc"
|
#include "accountsettings.moc"
|
||||||
|
|||||||
@@ -63,11 +63,14 @@ signals:
|
|||||||
void openFolderAlias(const QString &);
|
void openFolderAlias(const QString &);
|
||||||
void showIssuesList(AccountState *account);
|
void showIssuesList(AccountState *account);
|
||||||
void requesetMnemonic();
|
void requesetMnemonic();
|
||||||
|
void removeAccountFolders(AccountState *account);
|
||||||
|
void styleChanged();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void slotOpenOC();
|
void slotOpenOC();
|
||||||
void slotUpdateQuota(qint64, qint64);
|
void slotUpdateQuota(qint64, qint64);
|
||||||
void slotAccountStateChanged();
|
void slotAccountStateChanged();
|
||||||
|
void slotStyleChanged();
|
||||||
|
|
||||||
AccountState *accountsState() { return _accountState; }
|
AccountState *accountsState() { return _accountState; }
|
||||||
|
|
||||||
@@ -80,6 +83,8 @@ protected slots:
|
|||||||
void slotRemoveCurrentFolder();
|
void slotRemoveCurrentFolder();
|
||||||
void slotOpenCurrentFolder(); // sync folder
|
void slotOpenCurrentFolder(); // sync folder
|
||||||
void slotOpenCurrentLocalSubFolder(); // selected subfolder in sync folder
|
void slotOpenCurrentLocalSubFolder(); // selected subfolder in sync folder
|
||||||
|
void slotEditCurrentIgnoredFiles();
|
||||||
|
void slotEditCurrentLocalIgnoredFiles();
|
||||||
void slotFolderWizardAccepted();
|
void slotFolderWizardAccepted();
|
||||||
void slotFolderWizardRejected();
|
void slotFolderWizardRejected();
|
||||||
void slotDeleteAccount();
|
void slotDeleteAccount();
|
||||||
@@ -87,7 +92,7 @@ protected slots:
|
|||||||
void slotOpenAccountWizard();
|
void slotOpenAccountWizard();
|
||||||
void slotAccountAdded(AccountState *);
|
void slotAccountAdded(AccountState *);
|
||||||
void refreshSelectiveSyncStatus();
|
void refreshSelectiveSyncStatus();
|
||||||
void slotMarkSubfolderEncrpted(const FolderStatusModel::SubFolderInfo* folderInfo);
|
void slotMarkSubfolderEncrypted(const FolderStatusModel::SubFolderInfo* folderInfo);
|
||||||
void slotMarkSubfolderDecrypted(const FolderStatusModel::SubFolderInfo* folderInfo);
|
void slotMarkSubfolderDecrypted(const FolderStatusModel::SubFolderInfo* folderInfo);
|
||||||
void slotSubfolderContextMenuRequested(const QModelIndex& idx, const QPoint& point);
|
void slotSubfolderContextMenuRequested(const QModelIndex& idx, const QPoint& point);
|
||||||
void slotCustomContextMenuRequested(const QPoint &);
|
void slotCustomContextMenuRequested(const QPoint &);
|
||||||
@@ -99,6 +104,7 @@ protected slots:
|
|||||||
|
|
||||||
// Encryption Related Stuff.
|
// Encryption Related Stuff.
|
||||||
void slotShowMnemonic(const QString &mnemonic);
|
void slotShowMnemonic(const QString &mnemonic);
|
||||||
|
void slotNewMnemonicGenerated();
|
||||||
|
|
||||||
void slotEncryptionFlagSuccess(const QByteArray &folderId);
|
void slotEncryptionFlagSuccess(const QByteArray &folderId);
|
||||||
void slotEncryptionFlagError(const QByteArray &folderId, int httpReturnCode);
|
void slotEncryptionFlagError(const QByteArray &folderId, int httpReturnCode);
|
||||||
@@ -109,7 +115,7 @@ protected slots:
|
|||||||
void slotUploadMetadataSuccess(const QByteArray& folderId);
|
void slotUploadMetadataSuccess(const QByteArray& folderId);
|
||||||
void slotUpdateMetadataError(const QByteArray& folderId, int httpReturnCode);
|
void slotUpdateMetadataError(const QByteArray& folderId, int httpReturnCode);
|
||||||
|
|
||||||
// Remove Encryotion Bit.
|
// Remove Encryption Bit.
|
||||||
void slotLockForDecryptionSuccess(const QByteArray& folderId, const QByteArray& token);
|
void slotLockForDecryptionSuccess(const QByteArray& folderId, const QByteArray& token);
|
||||||
void slotLockForDecryptionError(const QByteArray& folderId, int httpReturnCode);
|
void slotLockForDecryptionError(const QByteArray& folderId, int httpReturnCode);
|
||||||
void slotDeleteMetadataSuccess(const QByteArray& folderId);
|
void slotDeleteMetadataSuccess(const QByteArray& folderId);
|
||||||
@@ -124,11 +130,13 @@ private:
|
|||||||
QStringList errors = QStringList());
|
QStringList errors = QStringList());
|
||||||
bool event(QEvent *) override;
|
bool event(QEvent *) override;
|
||||||
void createAccountToolbox();
|
void createAccountToolbox();
|
||||||
|
void openIgnoredFilesDialog(const QString & absFolderPath);
|
||||||
|
void customizeStyle();
|
||||||
|
|
||||||
/// Returns the alias of the selected folder, empty string if none
|
/// Returns the alias of the selected folder, empty string if none
|
||||||
QString selectedFolderAlias() const;
|
QString selectedFolderAlias() const;
|
||||||
|
|
||||||
Ui::AccountSettings *ui;
|
Ui::AccountSettings *_ui;
|
||||||
|
|
||||||
FolderStatusModel *_model;
|
FolderStatusModel *_model;
|
||||||
QUrl _OCUrl;
|
QUrl _OCUrl;
|
||||||
|
|||||||
@@ -6,136 +6,15 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>575</width>
|
<width>582</width>
|
||||||
<height>557</height>
|
<height>557</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Form</string>
|
<string notr="true">Form</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<item row="0" column="0">
|
<item row="4" column="0">
|
||||||
<widget class="QWidget" name="accountStatus" native="true">
|
|
||||||
<layout class="QGridLayout" name="gridLayout_2">
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="SslButton" name="sslButton">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QLabel" name="connectLabel">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Connected with <server> as <user></string>
|
|
||||||
</property>
|
|
||||||
<property name="textFormat">
|
|
||||||
<enum>Qt::RichText</enum>
|
|
||||||
</property>
|
|
||||||
<property name="wordWrap">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="openExternalLinks">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="2">
|
|
||||||
<widget class="QToolButton" name="_accountToolbox">
|
|
||||||
<property name="text">
|
|
||||||
<string>...</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<layout class="QHBoxLayout" name="storageGroupBox">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="quotaInfoLabel">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Storage space: ...</string>
|
|
||||||
</property>
|
|
||||||
<property name="textFormat">
|
|
||||||
<enum>Qt::PlainText</enum>
|
|
||||||
</property>
|
|
||||||
<property name="wordWrap">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QProgressBar" name="quotaProgressBar">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>16777215</width>
|
|
||||||
<height>7</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximum">
|
|
||||||
<number>100</number>
|
|
||||||
</property>
|
|
||||||
<property name="value">
|
|
||||||
<number>-1</number>
|
|
||||||
</property>
|
|
||||||
<property name="textVisible">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="OCC::FolderStatusView" name="_folderList">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Expanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>5</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="contextMenuPolicy">
|
|
||||||
<enum>Qt::CustomContextMenu</enum>
|
|
||||||
</property>
|
|
||||||
<property name="editTriggers">
|
|
||||||
<set>QAbstractItemView::NoEditTriggers</set>
|
|
||||||
</property>
|
|
||||||
<property name="animated">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="0">
|
|
||||||
<widget class="QWidget" name="selectiveSyncStatus" native="true">
|
<widget class="QWidget" name="selectiveSyncStatus" native="true">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||||
<item>
|
<item>
|
||||||
@@ -267,6 +146,130 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QWidget" name="accountStatus" native="true">
|
||||||
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="SslButton" name="sslButton">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QLabel" name="connectLabel">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Connected with <server> as <user></string>
|
||||||
|
</property>
|
||||||
|
<property name="textFormat">
|
||||||
|
<enum>Qt::RichText</enum>
|
||||||
|
</property>
|
||||||
|
<property name="wordWrap">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="openExternalLinks">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="2">
|
||||||
|
<widget class="QToolButton" name="_accountToolbox">
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true">...</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<layout class="QHBoxLayout" name="storageGroupBox">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="quotaInfoLabel">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Storage space: ...</string>
|
||||||
|
</property>
|
||||||
|
<property name="textFormat">
|
||||||
|
<enum>Qt::PlainText</enum>
|
||||||
|
</property>
|
||||||
|
<property name="wordWrap">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QProgressBar" name="quotaProgressBar">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>7</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>100</number>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<number>-1</number>
|
||||||
|
</property>
|
||||||
|
<property name="textVisible">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<widget class="OCC::FolderStatusView" name="_folderList">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Expanding">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>5</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="contextMenuPolicy">
|
||||||
|
<enum>Qt::CustomContextMenu</enum>
|
||||||
|
</property>
|
||||||
|
<property name="editTriggers">
|
||||||
|
<set>QAbstractItemView::NoEditTriggers</set>
|
||||||
|
</property>
|
||||||
|
<property name="animated">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="KMessageWidget" name="encryptionMessage" native="true"/>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
@@ -280,6 +283,12 @@
|
|||||||
<extends>QTreeView</extends>
|
<extends>QTreeView</extends>
|
||||||
<header>folderstatusview.h</header>
|
<header>folderstatusview.h</header>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
|
<customwidget>
|
||||||
|
<class>KMessageWidget</class>
|
||||||
|
<extends>QWidget</extends>
|
||||||
|
<header>kmessagewidget.h</header>
|
||||||
|
<container>1</container>
|
||||||
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
|
|
||||||
#include "accountstate.h"
|
#include "accountstate.h"
|
||||||
#include "accountmanager.h"
|
#include "accountmanager.h"
|
||||||
|
#include "remotewipe.h"
|
||||||
#include "account.h"
|
#include "account.h"
|
||||||
#include "creds/abstractcredentials.h"
|
#include "creds/abstractcredentials.h"
|
||||||
#include "creds/httpcredentials.h"
|
#include "creds/httpcredentials.h"
|
||||||
@@ -24,6 +25,11 @@
|
|||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
#include <qfontmetrics.h>
|
#include <qfontmetrics.h>
|
||||||
|
|
||||||
|
#include <QJsonDocument>
|
||||||
|
#include <QJsonObject>
|
||||||
|
#include <QNetworkRequest>
|
||||||
|
#include <QBuffer>
|
||||||
|
|
||||||
namespace OCC {
|
namespace OCC {
|
||||||
|
|
||||||
Q_LOGGING_CATEGORY(lcAccountState, "nextcloud.gui.account.state", QtInfoMsg)
|
Q_LOGGING_CATEGORY(lcAccountState, "nextcloud.gui.account.state", QtInfoMsg)
|
||||||
@@ -36,11 +42,12 @@ AccountState::AccountState(AccountPtr account)
|
|||||||
, _waitingForNewCredentials(false)
|
, _waitingForNewCredentials(false)
|
||||||
, _notificationsEtagResponseHeader("*")
|
, _notificationsEtagResponseHeader("*")
|
||||||
, _maintenanceToConnectedDelay(60000 + (qrand() % (4 * 60000))) // 1-5min delay
|
, _maintenanceToConnectedDelay(60000 + (qrand() % (4 * 60000))) // 1-5min delay
|
||||||
|
, _remoteWipe(new RemoteWipe(_account))
|
||||||
{
|
{
|
||||||
qRegisterMetaType<AccountState *>("AccountState*");
|
qRegisterMetaType<AccountState *>("AccountState*");
|
||||||
|
|
||||||
connect(account.data(), &Account::invalidCredentials,
|
connect(account.data(), &Account::invalidCredentials,
|
||||||
this, &AccountState::slotInvalidCredentials);
|
this, &AccountState::slotHandleRemoteWipeCheck);
|
||||||
connect(account.data(), &Account::credentialsFetched,
|
connect(account.data(), &Account::credentialsFetched,
|
||||||
this, &AccountState::slotCredentialsFetched);
|
this, &AccountState::slotCredentialsFetched);
|
||||||
connect(account.data(), &Account::credentialsAsked,
|
connect(account.data(), &Account::credentialsAsked,
|
||||||
@@ -303,7 +310,7 @@ void AccountState::slotConnectionValidatorResult(ConnectionValidator::Status sta
|
|||||||
break;
|
break;
|
||||||
case ConnectionValidator::CredentialsWrong:
|
case ConnectionValidator::CredentialsWrong:
|
||||||
case ConnectionValidator::CredentialsNotReady:
|
case ConnectionValidator::CredentialsNotReady:
|
||||||
slotInvalidCredentials();
|
handleInvalidCredentials();
|
||||||
break;
|
break;
|
||||||
case ConnectionValidator::SslError:
|
case ConnectionValidator::SslError:
|
||||||
setState(SignedOut);
|
setState(SignedOut);
|
||||||
@@ -322,7 +329,20 @@ void AccountState::slotConnectionValidatorResult(ConnectionValidator::Status sta
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void AccountState::slotInvalidCredentials()
|
void AccountState::slotHandleRemoteWipeCheck()
|
||||||
|
{
|
||||||
|
// make sure it changes account state and icons
|
||||||
|
signOutByUi();
|
||||||
|
|
||||||
|
qCInfo(lcAccountState) << "Invalid credentials for" << _account->url().toString()
|
||||||
|
<< "checking for remote wipe request";
|
||||||
|
|
||||||
|
_waitingForNewCredentials = false;
|
||||||
|
setState(SignedOut);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void AccountState::handleInvalidCredentials()
|
||||||
{
|
{
|
||||||
if (isSignedOut() || _waitingForNewCredentials)
|
if (isSignedOut() || _waitingForNewCredentials)
|
||||||
return;
|
return;
|
||||||
@@ -343,6 +363,7 @@ void AccountState::slotInvalidCredentials()
|
|||||||
account()->credentials()->askFromUser();
|
account()->credentials()->askFromUser();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void AccountState::slotCredentialsFetched(AbstractCredentials *)
|
void AccountState::slotCredentialsFetched(AbstractCredentials *)
|
||||||
{
|
{
|
||||||
// Make a connection attempt, no matter whether the credentials are
|
// Make a connection attempt, no matter whether the credentials are
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ namespace OCC {
|
|||||||
|
|
||||||
class AccountState;
|
class AccountState;
|
||||||
class Account;
|
class Account;
|
||||||
|
class RemoteWipe;
|
||||||
|
|
||||||
typedef QExplicitlySharedDataPointer<AccountState> AccountStatePtr;
|
typedef QExplicitlySharedDataPointer<AccountState> AccountStatePtr;
|
||||||
|
|
||||||
@@ -150,6 +151,9 @@ public:
|
|||||||
*/
|
*/
|
||||||
void setNavigationAppsEtagResponseHeader(const QByteArray &value);
|
void setNavigationAppsEtagResponseHeader(const QByteArray &value);
|
||||||
|
|
||||||
|
///Asks for user credentials
|
||||||
|
void handleInvalidCredentials();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
/// Triggers a ping to the server to update state and
|
/// Triggers a ping to the server to update state and
|
||||||
/// connection status and errors.
|
/// connection status and errors.
|
||||||
@@ -164,7 +168,11 @@ signals:
|
|||||||
|
|
||||||
protected Q_SLOTS:
|
protected Q_SLOTS:
|
||||||
void slotConnectionValidatorResult(ConnectionValidator::Status status, const QStringList &errors);
|
void slotConnectionValidatorResult(ConnectionValidator::Status status, const QStringList &errors);
|
||||||
void slotInvalidCredentials();
|
|
||||||
|
/// When client gets a 401 or 403 checks if server requested remote wipe
|
||||||
|
/// before asking for user credentials again
|
||||||
|
void slotHandleRemoteWipeCheck();
|
||||||
|
|
||||||
void slotCredentialsFetched(AbstractCredentials *creds);
|
void slotCredentialsFetched(AbstractCredentials *creds);
|
||||||
void slotCredentialsAsked(AbstractCredentials *creds);
|
void slotCredentialsAsked(AbstractCredentials *creds);
|
||||||
|
|
||||||
@@ -190,6 +198,13 @@ private:
|
|||||||
* Milliseconds for which to delay reconnection after 503/maintenance.
|
* Milliseconds for which to delay reconnection after 503/maintenance.
|
||||||
*/
|
*/
|
||||||
int _maintenanceToConnectedDelay;
|
int _maintenanceToConnectedDelay;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Connects remote wipe check with the account
|
||||||
|
* the log out triggers the check (loads app password -> create request)
|
||||||
|
*/
|
||||||
|
RemoteWipe *_remoteWipe;
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ namespace OCC {
|
|||||||
|
|
||||||
bool operator<(const Activity &rhs, const Activity &lhs)
|
bool operator<(const Activity &rhs, const Activity &lhs)
|
||||||
{
|
{
|
||||||
return rhs._dateTime.toMSecsSinceEpoch() > lhs._dateTime.toMSecsSinceEpoch();
|
return rhs._dateTime > lhs._dateTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool operator==(const Activity &rhs, const Activity &lhs)
|
bool operator==(const Activity &rhs, const Activity &lhs)
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "activityitemdelegate.h"
|
#include "activityitemdelegate.h"
|
||||||
|
#include "activitylistmodel.h"
|
||||||
#include "folderstatusmodel.h"
|
#include "folderstatusmodel.h"
|
||||||
#include "folderman.h"
|
#include "folderman.h"
|
||||||
#include "accountstate.h"
|
#include "accountstate.h"
|
||||||
@@ -26,6 +27,14 @@
|
|||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
|
|
||||||
|
#define FIXME_USE_HIGH_DPI_RATIO
|
||||||
|
#ifdef FIXME_USE_HIGH_DPI_RATIO
|
||||||
|
// FIXME: Find a better way to calculate the text width on high-dpi displays (Retina).
|
||||||
|
#include <QDesktopWidget>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define HASQT5_11 (QT_VERSION >= QT_VERSION_CHECK(5,11,0))
|
||||||
|
|
||||||
namespace OCC {
|
namespace OCC {
|
||||||
|
|
||||||
int ActivityItemDelegate::_iconHeight = 0;
|
int ActivityItemDelegate::_iconHeight = 0;
|
||||||
@@ -38,6 +47,12 @@ int ActivityItemDelegate::_buttonHeight = 0;
|
|||||||
const QString ActivityItemDelegate::_remote_share("remote_share");
|
const QString ActivityItemDelegate::_remote_share("remote_share");
|
||||||
const QString ActivityItemDelegate::_call("call");
|
const QString ActivityItemDelegate::_call("call");
|
||||||
|
|
||||||
|
ActivityItemDelegate::ActivityItemDelegate()
|
||||||
|
: QStyledItemDelegate()
|
||||||
|
{
|
||||||
|
customizeStyle();
|
||||||
|
}
|
||||||
|
|
||||||
int ActivityItemDelegate::iconHeight()
|
int ActivityItemDelegate::iconHeight()
|
||||||
{
|
{
|
||||||
if (_iconHeight == 0) {
|
if (_iconHeight == 0) {
|
||||||
@@ -87,10 +102,26 @@ void ActivityItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &
|
|||||||
int iconSize = 16;
|
int iconSize = 16;
|
||||||
int iconOffset = qRound(fm.height() / 4.0 * 7.0);
|
int iconOffset = qRound(fm.height() / 4.0 * 7.0);
|
||||||
int offset = 4;
|
int offset = 4;
|
||||||
|
const bool isSelected = (option.state & QStyle::State_Selected);
|
||||||
|
#ifdef FIXME_USE_HIGH_DPI_RATIO
|
||||||
|
// FIXME: Find a better way to calculate the text width on high-dpi displays (Retina).
|
||||||
|
const int device_pixel_ration = QApplication::desktop()->devicePixelRatio();
|
||||||
|
int pixel_ratio = (device_pixel_ration > 1 ? device_pixel_ration : 1);
|
||||||
|
#endif
|
||||||
|
|
||||||
// get the data
|
// get the data
|
||||||
Activity::Type activityType = qvariant_cast<Activity::Type>(index.data(ActionRole));
|
Activity::Type activityType = qvariant_cast<Activity::Type>(index.data(ActionRole));
|
||||||
QIcon actionIcon = qvariant_cast<QIcon>(index.data(ActionIconRole));
|
QIcon actionIcon;
|
||||||
|
const ActivityListModel::ActionIcon icn = qvariant_cast<ActivityListModel::ActionIcon>(index.data(ActionIconRole));
|
||||||
|
switch(icn.iconType) {
|
||||||
|
case ActivityListModel::ActivityIconType::iconUseCached: actionIcon = icn.cachedIcon; break;
|
||||||
|
case ActivityListModel::ActivityIconType::iconActivity: actionIcon = (isSelected ? _iconActivity_sel : _iconActivity); break;
|
||||||
|
case ActivityListModel::ActivityIconType::iconBell: actionIcon = (isSelected ? _iconBell_sel : _iconBell); break;
|
||||||
|
case ActivityListModel::ActivityIconType::iconStateError: actionIcon = _iconStateError; break;
|
||||||
|
case ActivityListModel::ActivityIconType::iconStateWarning: actionIcon = _iconStateWarning; break;
|
||||||
|
case ActivityListModel::ActivityIconType::iconStateInfo: actionIcon = _iconStateInfo; break;
|
||||||
|
case ActivityListModel::ActivityIconType::iconStateSync: actionIcon = _iconStateSync; break;
|
||||||
|
}
|
||||||
QString objectType = qvariant_cast<QString>(index.data(ObjectTypeRole));
|
QString objectType = qvariant_cast<QString>(index.data(ObjectTypeRole));
|
||||||
QString actionText = qvariant_cast<QString>(index.data(ActionTextRole));
|
QString actionText = qvariant_cast<QString>(index.data(ActionTextRole));
|
||||||
QString messageText = qvariant_cast<QString>(index.data(MessageRole));
|
QString messageText = qvariant_cast<QString>(index.data(MessageRole));
|
||||||
@@ -106,15 +137,27 @@ void ActivityItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &
|
|||||||
|
|
||||||
// subject text rect
|
// subject text rect
|
||||||
QRect actionTextBox = actionIconRect;
|
QRect actionTextBox = actionIconRect;
|
||||||
|
#if (HASQT5_11)
|
||||||
|
int actionTextBoxWidth = fm.horizontalAdvance(actionText);
|
||||||
|
#else
|
||||||
int actionTextBoxWidth = fm.width(actionText);
|
int actionTextBoxWidth = fm.width(actionText);
|
||||||
|
#endif
|
||||||
actionTextBox.setTop(option.rect.top() + margin + offset/2);
|
actionTextBox.setTop(option.rect.top() + margin + offset/2);
|
||||||
actionTextBox.setHeight(fm.height());
|
actionTextBox.setHeight(fm.height());
|
||||||
actionTextBox.setLeft(actionIconRect.right() + margin);
|
actionTextBox.setLeft(actionIconRect.right() + margin);
|
||||||
|
#ifdef FIXME_USE_HIGH_DPI_RATIO
|
||||||
|
// FIXME: Find a better way to calculate the text width on high-dpi displays (Retina).
|
||||||
|
actionTextBoxWidth *= pixel_ratio;
|
||||||
|
#endif
|
||||||
actionTextBox.setRight(actionTextBox.left() + actionTextBoxWidth + margin);
|
actionTextBox.setRight(actionTextBox.left() + actionTextBoxWidth + margin);
|
||||||
|
|
||||||
// message text rect
|
// message text rect
|
||||||
QRect messageTextBox = actionTextBox;
|
QRect messageTextBox = actionTextBox;
|
||||||
|
#if (HASQT5_11)
|
||||||
|
int messageTextWidth = fm.horizontalAdvance(messageText);
|
||||||
|
#else
|
||||||
int messageTextWidth = fm.width(messageText);
|
int messageTextWidth = fm.width(messageText);
|
||||||
|
#endif
|
||||||
int messageTextTop = option.rect.top() + fm.height() + margin;
|
int messageTextTop = option.rect.top() + fm.height() + margin;
|
||||||
if(actionText.isEmpty()) messageTextTop = option.rect.top() + margin + offset/2;
|
if(actionText.isEmpty()) messageTextTop = option.rect.top() + margin + offset/2;
|
||||||
messageTextBox.setTop(messageTextTop);
|
messageTextBox.setTop(messageTextTop);
|
||||||
@@ -128,14 +171,21 @@ void ActivityItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &
|
|||||||
|
|
||||||
// time box rect
|
// time box rect
|
||||||
QRect timeBox = messageTextBox;
|
QRect timeBox = messageTextBox;
|
||||||
QString timeStr = tr("%1").arg(timeText);
|
#if (HASQT5_11)
|
||||||
int timeTextWidth = fm.width(timeStr);
|
int timeTextWidth = fm.horizontalAdvance(timeText);
|
||||||
|
#else
|
||||||
|
int timeTextWidth = fm.width(timeText);
|
||||||
|
#endif
|
||||||
int timeTop = option.rect.top() + fm.height() + fm.height() + margin + offset/2;
|
int timeTop = option.rect.top() + fm.height() + fm.height() + margin + offset/2;
|
||||||
if(messageText.isEmpty() || actionText.isEmpty())
|
if(messageText.isEmpty() || actionText.isEmpty())
|
||||||
timeTop = option.rect.top() + fm.height() + margin;
|
timeTop = option.rect.top() + fm.height() + margin;
|
||||||
timeBox.setTop(timeTop);
|
timeBox.setTop(timeTop);
|
||||||
timeBox.setHeight(fm.height());
|
timeBox.setHeight(fm.height());
|
||||||
timeBox.setBottom(timeBox.top() + fm.height());
|
timeBox.setBottom(timeBox.top() + fm.height());
|
||||||
|
#ifdef FIXME_USE_HIGH_DPI_RATIO
|
||||||
|
// FIXME: Find a better way to calculate the text width on high-dpi displays (Retina).
|
||||||
|
timeTextWidth *= pixel_ratio;
|
||||||
|
#endif
|
||||||
timeBox.setRight(timeBox.left() + timeTextWidth + margin);
|
timeBox.setRight(timeBox.left() + timeTextWidth + margin);
|
||||||
|
|
||||||
// buttons - default values
|
// buttons - default values
|
||||||
@@ -170,9 +220,9 @@ void ActivityItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &
|
|||||||
if(activityType == Activity::Type::NotificationType){
|
if(activityType == Activity::Type::NotificationType){
|
||||||
|
|
||||||
// Secondary will be 'Dismiss' or '...' multiple options button
|
// Secondary will be 'Dismiss' or '...' multiple options button
|
||||||
secondaryButton.icon = QIcon(QLatin1String(":/client/resources/close.svg"));
|
secondaryButton.icon = (isSelected ? _iconClose_sel : _iconClose);
|
||||||
if(customList.size() > 1)
|
if(customList.size() > 1)
|
||||||
secondaryButton.icon = QIcon(QLatin1String(":/client/resources/more.svg"));
|
secondaryButton.icon = (isSelected ? _iconMore_sel : _iconMore);
|
||||||
secondaryButton.iconSize = QSize(iconSize, iconSize);
|
secondaryButton.iconSize = QSize(iconSize, iconSize);
|
||||||
|
|
||||||
// Primary button will be 'More Information' or 'Accept'
|
// Primary button will be 'More Information' or 'Accept'
|
||||||
@@ -180,7 +230,11 @@ void ActivityItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &
|
|||||||
if(objectType == _remote_share) primaryButton.text = tr("Accept");
|
if(objectType == _remote_share) primaryButton.text = tr("Accept");
|
||||||
if(objectType == _call) primaryButton.text = tr("Join");
|
if(objectType == _call) primaryButton.text = tr("Join");
|
||||||
|
|
||||||
|
#if (HASQT5_11)
|
||||||
|
primaryButton.rect.setLeft(left - margin * 2 - fm.horizontalAdvance(primaryButton.text));
|
||||||
|
#else
|
||||||
primaryButton.rect.setLeft(left - margin * 2 - fm.width(primaryButton.text));
|
primaryButton.rect.setLeft(left - margin * 2 - fm.width(primaryButton.text));
|
||||||
|
#endif
|
||||||
|
|
||||||
// save info to be able to filter mouse clicks
|
// save info to be able to filter mouse clicks
|
||||||
_buttonHeight = buttonSize;
|
_buttonHeight = buttonSize;
|
||||||
@@ -191,12 +245,17 @@ void ActivityItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &
|
|||||||
} else if(activityType == Activity::SyncResultType){
|
} else if(activityType == Activity::SyncResultType){
|
||||||
|
|
||||||
// Secondary will be 'open file manager' with the folder icon
|
// Secondary will be 'open file manager' with the folder icon
|
||||||
secondaryButton.icon = QIcon(QLatin1String(":/client/resources/folder.svg"));
|
secondaryButton.icon = _iconFolder;
|
||||||
secondaryButton.iconSize = QSize(iconSize, iconSize);
|
secondaryButton.iconSize = QSize(iconSize, iconSize);
|
||||||
|
|
||||||
// Primary button will be 'open browser'
|
// Primary button will be 'open browser'
|
||||||
primaryButton.text = tr("Open Browser");
|
primaryButton.text = tr("Open Browser");
|
||||||
|
|
||||||
|
#if (HASQT5_11)
|
||||||
|
primaryButton.rect.setLeft(left - margin * 2 - fm.horizontalAdvance(primaryButton.text));
|
||||||
|
#else
|
||||||
primaryButton.rect.setLeft(left - margin * 2 - fm.width(primaryButton.text));
|
primaryButton.rect.setLeft(left - margin * 2 - fm.width(primaryButton.text));
|
||||||
|
#endif
|
||||||
|
|
||||||
// save info to be able to filter mouse clicks
|
// save info to be able to filter mouse clicks
|
||||||
_buttonHeight = buttonSize;
|
_buttonHeight = buttonSize;
|
||||||
@@ -207,7 +266,7 @@ void ActivityItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &
|
|||||||
} else if(activityType == Activity::SyncFileItemType){
|
} else if(activityType == Activity::SyncFileItemType){
|
||||||
|
|
||||||
// Secondary will be 'open file manager' with the folder icon
|
// Secondary will be 'open file manager' with the folder icon
|
||||||
secondaryButton.icon = QIcon(QLatin1String(":/client/resources/folder.svg"));
|
secondaryButton.icon = _iconFolder;
|
||||||
secondaryButton.iconSize = QSize(iconSize, iconSize);
|
secondaryButton.iconSize = QSize(iconSize, iconSize);
|
||||||
|
|
||||||
// No primary button on this case
|
// No primary button on this case
|
||||||
@@ -232,7 +291,7 @@ void ActivityItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &
|
|||||||
p.setCurrentColorGroup(QPalette::Disabled);
|
p.setCurrentColorGroup(QPalette::Disabled);
|
||||||
|
|
||||||
// change pen color if the line is selected
|
// change pen color if the line is selected
|
||||||
if (option.state & QStyle::State_Selected)
|
if (isSelected)
|
||||||
painter->setPen(p.color(QPalette::HighlightedText));
|
painter->setPen(p.color(QPalette::HighlightedText));
|
||||||
else
|
else
|
||||||
painter->setPen(p.color(QPalette::Text));
|
painter->setPen(p.color(QPalette::Text));
|
||||||
@@ -246,8 +305,15 @@ void ActivityItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &
|
|||||||
painter->drawText(actionTextBox, elidedAction);
|
painter->drawText(actionTextBox, elidedAction);
|
||||||
|
|
||||||
// draw the buttons
|
// draw the buttons
|
||||||
if(activityType == Activity::Type::NotificationType || activityType == Activity::Type::SyncResultType)
|
if(activityType == Activity::Type::NotificationType || activityType == Activity::Type::SyncResultType) {
|
||||||
|
primaryButton.palette = p;
|
||||||
|
if (isSelected)
|
||||||
|
primaryButton.palette.setColor(QPalette::ButtonText, p.color(QPalette::HighlightedText));
|
||||||
|
else
|
||||||
|
primaryButton.palette.setColor(QPalette::ButtonText, p.color(QPalette::Text));
|
||||||
|
|
||||||
QApplication::style()->drawControl(QStyle::CE_PushButton, &primaryButton, painter);
|
QApplication::style()->drawControl(QStyle::CE_PushButton, &primaryButton, painter);
|
||||||
|
}
|
||||||
|
|
||||||
// Since they are errors on local syncing, there is nothing to do in the server
|
// Since they are errors on local syncing, there is nothing to do in the server
|
||||||
if(activityType != Activity::Type::ActivityType)
|
if(activityType != Activity::Type::ActivityType)
|
||||||
@@ -261,13 +327,13 @@ void ActivityItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &
|
|||||||
}
|
}
|
||||||
|
|
||||||
// change pen color for the time
|
// change pen color for the time
|
||||||
if (option.state & QStyle::State_Selected)
|
if (isSelected)
|
||||||
painter->setPen(p.color(QPalette::Disabled, QPalette::HighlightedText));
|
painter->setPen(p.color(QPalette::Disabled, QPalette::HighlightedText));
|
||||||
else
|
else
|
||||||
painter->setPen(p.color(QPalette::Disabled, QPalette::Text));
|
painter->setPen(p.color(QPalette::Disabled, QPalette::Text));
|
||||||
|
|
||||||
// draw the time
|
// draw the time
|
||||||
const QString elidedTime = fm.elidedText(timeStr, Qt::ElideRight, spaceLeftForText);
|
const QString elidedTime = fm.elidedText(timeText, Qt::ElideRight, spaceLeftForText);
|
||||||
painter->drawText(timeBox, elidedTime);
|
painter->drawText(timeBox, elidedTime);
|
||||||
|
|
||||||
painter->restore();
|
painter->restore();
|
||||||
@@ -310,4 +376,32 @@ bool ActivityItemDelegate::editorEvent(QEvent *event, QAbstractItemModel *model,
|
|||||||
return QStyledItemDelegate::editorEvent(event, model, option, index);
|
return QStyledItemDelegate::editorEvent(event, model, option, index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ActivityItemDelegate::slotStyleChanged()
|
||||||
|
{
|
||||||
|
customizeStyle();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ActivityItemDelegate::customizeStyle()
|
||||||
|
{
|
||||||
|
QPalette pal;
|
||||||
|
pal.setColor(QPalette::Base, QColor(0,0,0)); // use dark background colour to invert icons
|
||||||
|
|
||||||
|
_iconClose = Theme::createColorAwareIcon(QLatin1String(":/client/resources/close.svg"));
|
||||||
|
_iconClose_sel = Theme::createColorAwareIcon(QLatin1String(":/client/resources/close.svg"), pal);
|
||||||
|
_iconMore = Theme::createColorAwareIcon(QLatin1String(":/client/resources/more.svg"));
|
||||||
|
_iconMore_sel = Theme::createColorAwareIcon(QLatin1String(":/client/resources/more.svg"), pal);
|
||||||
|
|
||||||
|
_iconFolder = QIcon(QLatin1String(":/client/resources/folder.svg"));
|
||||||
|
|
||||||
|
_iconActivity = Theme::createColorAwareIcon(QLatin1String(":/client/resources/activity.png"));
|
||||||
|
_iconActivity_sel = Theme::createColorAwareIcon(QLatin1String(":/client/resources/activity.png"), pal);
|
||||||
|
_iconBell = Theme::createColorAwareIcon(QLatin1String(":/client/resources/bell.svg"));
|
||||||
|
_iconBell_sel = Theme::createColorAwareIcon(QLatin1String(":/client/resources/bell.svg"), pal);
|
||||||
|
|
||||||
|
_iconStateError = QIcon(QLatin1String(":/client/resources/state-error.svg"));
|
||||||
|
_iconStateWarning = QIcon(QLatin1String(":/client/resources/state-warning.svg"));
|
||||||
|
_iconStateInfo = QIcon(QLatin1String(":/client/resources/state-info.svg"));
|
||||||
|
_iconStateSync = QIcon(QLatin1String(":/client/resources/state-sync.svg"));
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace OCC
|
} // namespace OCC
|
||||||
|
|||||||
@@ -43,6 +43,8 @@ public:
|
|||||||
AccountConnectedRole,
|
AccountConnectedRole,
|
||||||
SyncFileStatusRole };
|
SyncFileStatusRole };
|
||||||
|
|
||||||
|
ActivityItemDelegate();
|
||||||
|
|
||||||
void paint(QPainter *, const QStyleOptionViewItem &, const QModelIndex &) const override;
|
void paint(QPainter *, const QStyleOptionViewItem &, const QModelIndex &) const override;
|
||||||
QSize sizeHint(const QStyleOptionViewItem &, const QModelIndex &) const override;
|
QSize sizeHint(const QStyleOptionViewItem &, const QModelIndex &) const override;
|
||||||
bool editorEvent(QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option,
|
bool editorEvent(QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option,
|
||||||
@@ -51,11 +53,16 @@ public:
|
|||||||
static int rowHeight();
|
static int rowHeight();
|
||||||
static int iconHeight();
|
static int iconHeight();
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
void slotStyleChanged();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void primaryButtonClickedOnItemView(const QModelIndex &index);
|
void primaryButtonClickedOnItemView(const QModelIndex &index);
|
||||||
void secondaryButtonClickedOnItemView(const QModelIndex &index);
|
void secondaryButtonClickedOnItemView(const QModelIndex &index);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
void customizeStyle();
|
||||||
|
|
||||||
static int _margin;
|
static int _margin;
|
||||||
static int _iconHeight;
|
static int _iconHeight;
|
||||||
static int _primaryButtonWidth;
|
static int _primaryButtonWidth;
|
||||||
@@ -65,6 +72,23 @@ private:
|
|||||||
static int _buttonHeight;
|
static int _buttonHeight;
|
||||||
static const QString _remote_share;
|
static const QString _remote_share;
|
||||||
static const QString _call;
|
static const QString _call;
|
||||||
|
|
||||||
|
QIcon _iconClose;
|
||||||
|
QIcon _iconClose_sel;
|
||||||
|
QIcon _iconMore;
|
||||||
|
QIcon _iconMore_sel;
|
||||||
|
|
||||||
|
QIcon _iconFolder;
|
||||||
|
|
||||||
|
QIcon _iconActivity;
|
||||||
|
QIcon _iconActivity_sel;
|
||||||
|
QIcon _iconBell;
|
||||||
|
QIcon _iconBell_sel;
|
||||||
|
|
||||||
|
QIcon _iconStateError;
|
||||||
|
QIcon _iconStateWarning;
|
||||||
|
QIcon _iconStateInfo;
|
||||||
|
QIcon _iconStateSync;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace OCC
|
} // namespace OCC
|
||||||
|
|||||||
@@ -71,13 +71,14 @@ QVariant ActivityListModel::data(const QModelIndex &index, int role) const
|
|||||||
return QVariant(list.at(0));
|
return QVariant(list.at(0));
|
||||||
}
|
}
|
||||||
// File does not exist anymore? Let's try to open its path
|
// File does not exist anymore? Let's try to open its path
|
||||||
list = FolderMan::instance()->findFileInLocalFolders(QFileInfo(relPath).path(), ast->account());
|
if(QFileInfo(relPath).exists()) {
|
||||||
if (list.count() > 0) {
|
list = FolderMan::instance()->findFileInLocalFolders(QFileInfo(relPath).path(), ast->account());
|
||||||
return QVariant(list.at(0));
|
if (list.count() > 0) {
|
||||||
|
return QVariant(list.at(0));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return QVariant();
|
return QVariant();
|
||||||
break;
|
|
||||||
case ActivityItemDelegate::ActionsLinksRole:{
|
case ActivityItemDelegate::ActionsLinksRole:{
|
||||||
QList<QVariant> customList;
|
QList<QVariant> customList;
|
||||||
foreach (ActivityLink customItem, a._links) {
|
foreach (ActivityLink customItem, a._links) {
|
||||||
@@ -86,59 +87,61 @@ QVariant ActivityListModel::data(const QModelIndex &index, int role) const
|
|||||||
customList << customVariant;
|
customList << customVariant;
|
||||||
}
|
}
|
||||||
return customList;
|
return customList;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
case ActivityItemDelegate::ActionIconRole:
|
case ActivityItemDelegate::ActionIconRole:{
|
||||||
|
ActionIcon actionIcon;
|
||||||
if(a._type == Activity::NotificationType){
|
if(a._type == Activity::NotificationType){
|
||||||
QIcon cachedIcon = ServerNotificationHandler::iconCache.value(a._id);
|
QIcon cachedIcon = ServerNotificationHandler::iconCache.value(a._id);
|
||||||
if(!cachedIcon.isNull())
|
if(!cachedIcon.isNull()) {
|
||||||
return cachedIcon;
|
actionIcon.iconType = ActivityIconType::iconUseCached;
|
||||||
else return QIcon(QLatin1String(":/client/resources/bell.svg"));
|
actionIcon.cachedIcon = cachedIcon;
|
||||||
|
} else {
|
||||||
|
actionIcon.iconType = ActivityIconType::iconBell;
|
||||||
|
}
|
||||||
} else if(a._type == Activity::SyncResultType){
|
} else if(a._type == Activity::SyncResultType){
|
||||||
return QIcon(QLatin1String(":/client/resources/state-error.svg"));
|
actionIcon.iconType = ActivityIconType::iconStateError;
|
||||||
} else if(a._type == Activity::SyncFileItemType){
|
} else if(a._type == Activity::SyncFileItemType){
|
||||||
if(a._status == SyncFileItem::NormalError
|
if(a._status == SyncFileItem::NormalError
|
||||||
|| a._status == SyncFileItem::FatalError
|
|| a._status == SyncFileItem::FatalError
|
||||||
|| a._status == SyncFileItem::DetailError
|
|| a._status == SyncFileItem::DetailError
|
||||||
|| a._status == SyncFileItem::BlacklistedError) {
|
|| a._status == SyncFileItem::BlacklistedError) {
|
||||||
return QIcon(QLatin1String(":/client/resources/state-error.svg"));
|
actionIcon.iconType = ActivityIconType::iconStateError;
|
||||||
} else if(a._status == SyncFileItem::SoftError
|
} else if(a._status == SyncFileItem::SoftError
|
||||||
|| a._status == SyncFileItem::FileIgnored
|
|
||||||
|| a._status == SyncFileItem::Conflict
|
|| a._status == SyncFileItem::Conflict
|
||||||
|| a._status == SyncFileItem::Restoration){
|
|| a._status == SyncFileItem::Restoration
|
||||||
return QIcon(QLatin1String(":/client/resources/state-warning.svg"));
|
|| a._status == SyncFileItem::FileLocked){
|
||||||
|
actionIcon.iconType = ActivityIconType::iconStateWarning;
|
||||||
|
} else if(a._status == SyncFileItem::FileIgnored){
|
||||||
|
actionIcon.iconType = ActivityIconType::iconStateInfo;
|
||||||
|
} else {
|
||||||
|
actionIcon.iconType = ActivityIconType::iconStateSync;
|
||||||
}
|
}
|
||||||
return QIcon(QLatin1String(":/client/resources/state-sync.svg"));
|
} else {
|
||||||
|
actionIcon.iconType = ActivityIconType::iconActivity;
|
||||||
}
|
}
|
||||||
return QIcon(QLatin1String(":/client/resources/activity.png"));
|
QVariant icn;
|
||||||
break;
|
icn.setValue(actionIcon);
|
||||||
|
return icn;
|
||||||
|
}
|
||||||
case ActivityItemDelegate::ObjectTypeRole:
|
case ActivityItemDelegate::ObjectTypeRole:
|
||||||
return a._objectType;
|
return a._objectType;
|
||||||
break;
|
|
||||||
case ActivityItemDelegate::ActionRole:{
|
case ActivityItemDelegate::ActionRole:{
|
||||||
QVariant type;
|
QVariant type;
|
||||||
type.setValue(a._type);
|
type.setValue(a._type);
|
||||||
return type;
|
return type;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
case ActivityItemDelegate::ActionTextRole:
|
case ActivityItemDelegate::ActionTextRole:
|
||||||
return a._subject;
|
return a._subject;
|
||||||
break;
|
|
||||||
case ActivityItemDelegate::MessageRole:
|
case ActivityItemDelegate::MessageRole:
|
||||||
return a._message;
|
return a._message;
|
||||||
break;
|
|
||||||
case ActivityItemDelegate::LinkRole:
|
case ActivityItemDelegate::LinkRole:
|
||||||
return a._link;
|
return a._link;
|
||||||
break;
|
|
||||||
case ActivityItemDelegate::AccountRole:
|
case ActivityItemDelegate::AccountRole:
|
||||||
return a._accName;
|
return a._accName;
|
||||||
break;
|
|
||||||
case ActivityItemDelegate::PointInTimeRole:
|
case ActivityItemDelegate::PointInTimeRole:
|
||||||
return Utility::timeAgoInWords(a._dateTime);
|
return QString("%1 (%2)").arg(a._dateTime.toLocalTime().toString(Qt::DefaultLocaleShortDate), Utility::timeAgoInWords(a._dateTime.toLocalTime()));
|
||||||
break;
|
|
||||||
case ActivityItemDelegate::AccountConnectedRole:
|
case ActivityItemDelegate::AccountConnectedRole:
|
||||||
return (ast && ast->isConnected());
|
return (ast && ast->isConnected());
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
return QVariant();
|
return QVariant();
|
||||||
}
|
}
|
||||||
@@ -227,6 +230,29 @@ void ActivityListModel::addErrorToActivityList(Activity activity) {
|
|||||||
combineActivityLists();
|
combineActivityLists();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ActivityListModel::addIgnoredFileToList(Activity newActivity) {
|
||||||
|
qCInfo(lcActivity) << "First checking for duplicates then add file to the notification list of ignored files: " << newActivity._file;
|
||||||
|
|
||||||
|
bool duplicate = false;
|
||||||
|
if(_listOfIgnoredFiles.size() == 0){
|
||||||
|
_notificationIgnoredFiles = newActivity;
|
||||||
|
_notificationIgnoredFiles._subject = tr("Files from the ignore list as well as symbolic links are not synced. This includes:");
|
||||||
|
_listOfIgnoredFiles.append(newActivity);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach(Activity activity, _listOfIgnoredFiles){
|
||||||
|
if(activity._file == newActivity._file){
|
||||||
|
duplicate = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!duplicate){
|
||||||
|
_notificationIgnoredFiles._message.append(", " + newActivity._file);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void ActivityListModel::addNotificationToActivityList(Activity activity) {
|
void ActivityListModel::addNotificationToActivityList(Activity activity) {
|
||||||
qCInfo(lcActivity) << "Notification successfully added to the notification list: " << activity._subject;
|
qCInfo(lcActivity) << "Notification successfully added to the notification list: " << activity._subject;
|
||||||
_notificationLists.prepend(activity);
|
_notificationLists.prepend(activity);
|
||||||
@@ -240,7 +266,7 @@ void ActivityListModel::clearNotifications() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ActivityListModel::removeActivityFromActivityList(int row) {
|
void ActivityListModel::removeActivityFromActivityList(int row) {
|
||||||
Activity activity = _finalList.at(row);
|
Activity activity = _finalList.at(row);
|
||||||
removeActivityFromActivityList(activity);
|
removeActivityFromActivityList(activity);
|
||||||
combineActivityLists();
|
combineActivityLists();
|
||||||
}
|
}
|
||||||
@@ -274,22 +300,31 @@ void ActivityListModel::removeActivityFromActivityList(Activity activity) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ActivityListModel::combineActivityLists()
|
void ActivityListModel::combineActivityLists()
|
||||||
{
|
{
|
||||||
ActivityList resultList;
|
ActivityList resultList;
|
||||||
|
|
||||||
std::sort(_notificationErrorsLists.begin(), _notificationErrorsLists.end());
|
if(_notificationErrorsLists.count() > 0) {
|
||||||
resultList.append(_notificationErrorsLists);
|
std::sort(_notificationErrorsLists.begin(), _notificationErrorsLists.end());
|
||||||
|
resultList.append(_notificationErrorsLists);
|
||||||
|
}
|
||||||
|
if(_listOfIgnoredFiles.size() > 0)
|
||||||
|
resultList.append(_notificationIgnoredFiles);
|
||||||
|
|
||||||
std::sort(_notificationLists.begin(), _notificationLists.end());
|
if(_notificationLists.count() > 0) {
|
||||||
resultList.append(_notificationLists);
|
std::sort(_notificationLists.begin(), _notificationLists.end());
|
||||||
|
resultList.append(_notificationLists);
|
||||||
|
}
|
||||||
|
|
||||||
std::sort(_syncFileItemLists.begin(), _syncFileItemLists.end());
|
if(_syncFileItemLists.count() > 0) {
|
||||||
resultList.append(_syncFileItemLists);
|
std::sort(_syncFileItemLists.begin(), _syncFileItemLists.end());
|
||||||
|
resultList.append(_syncFileItemLists);
|
||||||
|
}
|
||||||
|
|
||||||
std::sort(_activityLists.begin(), _activityLists.end());
|
if(_activityLists.count() > 0) {
|
||||||
resultList.append(_activityLists);
|
std::sort(_activityLists.begin(), _activityLists.end());
|
||||||
|
resultList.append(_activityLists);
|
||||||
|
}
|
||||||
|
|
||||||
beginResetModel();
|
beginResetModel();
|
||||||
_finalList.clear();
|
_finalList.clear();
|
||||||
|
|||||||
@@ -38,6 +38,20 @@ class ActivityListModel : public QAbstractListModel
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
enum ActivityIconType {
|
||||||
|
iconUseCached = 0,
|
||||||
|
iconActivity,
|
||||||
|
iconBell,
|
||||||
|
iconStateError,
|
||||||
|
iconStateWarning,
|
||||||
|
iconStateInfo,
|
||||||
|
iconStateSync
|
||||||
|
};
|
||||||
|
struct ActionIcon {
|
||||||
|
ActivityIconType iconType;
|
||||||
|
QIcon cachedIcon;
|
||||||
|
};
|
||||||
|
|
||||||
explicit ActivityListModel(AccountState *accountState, QWidget *parent = nullptr);
|
explicit ActivityListModel(AccountState *accountState, QWidget *parent = nullptr);
|
||||||
|
|
||||||
QVariant data(const QModelIndex &index, int role) const override;
|
QVariant data(const QModelIndex &index, int role) const override;
|
||||||
@@ -51,6 +65,7 @@ public:
|
|||||||
void addNotificationToActivityList(Activity activity);
|
void addNotificationToActivityList(Activity activity);
|
||||||
void clearNotifications();
|
void clearNotifications();
|
||||||
void addErrorToActivityList(Activity activity);
|
void addErrorToActivityList(Activity activity);
|
||||||
|
void addIgnoredFileToList(Activity newActivity);
|
||||||
void addSyncFileItemToActivityList(Activity activity);
|
void addSyncFileItemToActivityList(Activity activity);
|
||||||
void removeActivityFromActivityList(int row);
|
void removeActivityFromActivityList(int row);
|
||||||
void removeActivityFromActivityList(Activity activity);
|
void removeActivityFromActivityList(Activity activity);
|
||||||
@@ -73,6 +88,8 @@ private:
|
|||||||
ActivityList _activityLists;
|
ActivityList _activityLists;
|
||||||
ActivityList _syncFileItemLists;
|
ActivityList _syncFileItemLists;
|
||||||
ActivityList _notificationLists;
|
ActivityList _notificationLists;
|
||||||
|
ActivityList _listOfIgnoredFiles;
|
||||||
|
Activity _notificationIgnoredFiles;
|
||||||
ActivityList _notificationErrorsLists;
|
ActivityList _notificationErrorsLists;
|
||||||
ActivityList _finalList;
|
ActivityList _finalList;
|
||||||
AccountState *_accountState;
|
AccountState *_accountState;
|
||||||
@@ -81,4 +98,7 @@ private:
|
|||||||
int _currentItem = 0;
|
int _currentItem = 0;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Q_DECLARE_METATYPE(OCC::ActivityListModel::ActionIcon)
|
||||||
|
|
||||||
#endif // ACTIVITYLISTMODEL_H
|
#endif // ACTIVITYLISTMODEL_H
|
||||||
|
|||||||
@@ -89,6 +89,9 @@ ActivityWidget::ActivityWidget(AccountState *accountState, QWidget *parent)
|
|||||||
this, &ActivityWidget::addError);
|
this, &ActivityWidget::addError);
|
||||||
|
|
||||||
_removeTimer.setInterval(1000);
|
_removeTimer.setInterval(1000);
|
||||||
|
|
||||||
|
// Connect styleChanged events to our widgets, so they can adapt (Dark-/Light-Mode switching)
|
||||||
|
connect(this, &ActivityWidget::styleChanged, delegate, &ActivityItemDelegate::slotStyleChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
ActivityWidget::~ActivityWidget()
|
ActivityWidget::~ActivityWidget()
|
||||||
@@ -121,12 +124,18 @@ void ActivityWidget::slotProgressInfo(const QString &folder, const ProgressInfo
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(activity._status == SyncFileItem::FileLocked && !QFileInfo(f->path() + activity._file).exists()){
|
||||||
if(activity._status == SyncFileItem::FileIgnored && !QFileInfo(f->path() + activity._file).exists()){
|
|
||||||
_model->removeActivityFromActivityList(activity);
|
_model->removeActivityFromActivityList(activity);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if(activity._status == SyncFileItem::FileIgnored && !QFileInfo(f->path() + activity._file).exists()) {
|
||||||
|
_model->removeActivityFromActivityList(activity);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if(!QFileInfo(f->path() + activity._file).exists()){
|
if(!QFileInfo(f->path() + activity._file).exists()){
|
||||||
_model->removeActivityFromActivityList(activity);
|
_model->removeActivityFromActivityList(activity);
|
||||||
continue;
|
continue;
|
||||||
@@ -170,7 +179,7 @@ void ActivityWidget::slotItemCompleted(const QString &folder, const SyncFileItem
|
|||||||
Activity activity;
|
Activity activity;
|
||||||
activity._type = Activity::SyncFileItemType; //client activity
|
activity._type = Activity::SyncFileItemType; //client activity
|
||||||
activity._status = item->_status;
|
activity._status = item->_status;
|
||||||
activity._dateTime = QDateTime::fromString(QDateTime::currentDateTime().toString(), Qt::ISODate);
|
activity._dateTime = QDateTime::currentDateTime();
|
||||||
activity._message = item->_originalFile;
|
activity._message = item->_originalFile;
|
||||||
activity._link = folderInstance->accountState()->account()->url();
|
activity._link = folderInstance->accountState()->account()->url();
|
||||||
activity._accName = folderInstance->accountState()->account()->displayName();
|
activity._accName = folderInstance->accountState()->account()->displayName();
|
||||||
@@ -186,8 +195,12 @@ void ActivityWidget::slotItemCompleted(const QString &folder, const SyncFileItem
|
|||||||
qCWarning(lcActivity) << "Item " << item->_file << " retrieved resulted in error " << item->_errorString;
|
qCWarning(lcActivity) << "Item " << item->_file << " retrieved resulted in error " << item->_errorString;
|
||||||
activity._subject = item->_errorString;
|
activity._subject = item->_errorString;
|
||||||
|
|
||||||
// add 'protocol error' to activity list
|
if(item->_status == SyncFileItem::Status::FileIgnored) {
|
||||||
_model->addErrorToActivityList(activity);
|
_model->addIgnoredFileToList(activity);
|
||||||
|
} else {
|
||||||
|
// add 'protocol error' to activity list
|
||||||
|
_model->addErrorToActivityList(activity);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -538,6 +551,12 @@ void ActivityWidget::slotNotifyServerFinished(const QString &reply, int replyCod
|
|||||||
qCInfo(lcActivity) << "Server Notification reply code" << replyCode << reply;
|
qCInfo(lcActivity) << "Server Notification reply code" << replyCode << reply;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ActivityWidget::slotStyleChanged()
|
||||||
|
{
|
||||||
|
// Notify the other widgets (Dark-/Light-Mode switching)
|
||||||
|
emit styleChanged();
|
||||||
|
}
|
||||||
|
|
||||||
/* ==================================================================== */
|
/* ==================================================================== */
|
||||||
|
|
||||||
ActivitySettings::ActivitySettings(AccountState *accountState, QWidget *parent)
|
ActivitySettings::ActivitySettings(AccountState *accountState, QWidget *parent)
|
||||||
@@ -560,6 +579,9 @@ ActivitySettings::ActivitySettings(AccountState *accountState, QWidget *parent)
|
|||||||
// connect a model signal to stop the animation
|
// connect a model signal to stop the animation
|
||||||
connect(_activityWidget, &ActivityWidget::rowsInserted, _progressIndicator, &QProgressIndicator::stopAnimation);
|
connect(_activityWidget, &ActivityWidget::rowsInserted, _progressIndicator, &QProgressIndicator::stopAnimation);
|
||||||
connect(_activityWidget, &ActivityWidget::rowsInserted, this, &ActivitySettings::slotDisplayActivities);
|
connect(_activityWidget, &ActivityWidget::rowsInserted, this, &ActivitySettings::slotDisplayActivities);
|
||||||
|
|
||||||
|
// Connect styleChanged events to our widgets, so they can adapt (Dark-/Light-Mode switching)
|
||||||
|
connect(this, &ActivitySettings::styleChanged, _activityWidget, &ActivityWidget::slotStyleChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ActivitySettings::slotDisplayActivities(){
|
void ActivitySettings::slotDisplayActivities(){
|
||||||
@@ -618,4 +640,14 @@ bool ActivitySettings::event(QEvent *e)
|
|||||||
ActivitySettings::~ActivitySettings()
|
ActivitySettings::~ActivitySettings()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ActivitySettings::slotStyleChanged()
|
||||||
|
{
|
||||||
|
if(_progressIndicator)
|
||||||
|
_progressIndicator->setColor(QGuiApplication::palette().color(QPalette::Text));
|
||||||
|
|
||||||
|
// Notify the other widgets (Dark-/Light-Mode switching)
|
||||||
|
emit styleChanged();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -78,12 +78,14 @@ public slots:
|
|||||||
void addError(const QString &folderAlias, const QString &message, ErrorCategory category);
|
void addError(const QString &folderAlias, const QString &message, ErrorCategory category);
|
||||||
void slotProgressInfo(const QString &folder, const ProgressInfo &progress);
|
void slotProgressInfo(const QString &folder, const ProgressInfo &progress);
|
||||||
void slotItemCompleted(const QString &folder, const SyncFileItemPtr &item);
|
void slotItemCompleted(const QString &folder, const SyncFileItemPtr &item);
|
||||||
|
void slotStyleChanged();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void guiLog(const QString &, const QString &);
|
void guiLog(const QString &, const QString &);
|
||||||
void rowsInserted();
|
void rowsInserted();
|
||||||
void hideActivityTab(bool);
|
void hideActivityTab(bool);
|
||||||
void sendNotificationRequest(const QString &accountName, const QString &link, const QByteArray &verb, int row);
|
void sendNotificationRequest(const QString &accountName, const QString &link, const QByteArray &verb, int row);
|
||||||
|
void styleChanged();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void slotBuildNotificationDisplay(const ActivityList &list);
|
void slotBuildNotificationDisplay(const ActivityList &list);
|
||||||
@@ -96,6 +98,7 @@ private slots:
|
|||||||
void slotSecondaryButtonClickedOnListView(const QModelIndex &index);
|
void slotSecondaryButtonClickedOnListView(const QModelIndex &index);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
void customizeStyle();
|
||||||
void showLabels();
|
void showLabels();
|
||||||
QString timeString(QDateTime dt, QLocale::FormatType format) const;
|
QString timeString(QDateTime dt, QLocale::FormatType format) const;
|
||||||
Ui::ActivityWidget *_ui;
|
Ui::ActivityWidget *_ui;
|
||||||
@@ -137,6 +140,7 @@ public slots:
|
|||||||
void slotRefresh();
|
void slotRefresh();
|
||||||
void slotRemoveAccount();
|
void slotRemoveAccount();
|
||||||
void setNotificationRefreshInterval(std::chrono::milliseconds interval);
|
void setNotificationRefreshInterval(std::chrono::milliseconds interval);
|
||||||
|
void slotStyleChanged();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void slotRegularNotificationCheck();
|
void slotRegularNotificationCheck();
|
||||||
@@ -144,6 +148,7 @@ private slots:
|
|||||||
|
|
||||||
signals:
|
signals:
|
||||||
void guiLog(const QString &, const QString &);
|
void guiLog(const QString &, const QString &);
|
||||||
|
void styleChanged();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool event(QEvent *e) override;
|
bool event(QEvent *e) override;
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Form</string>
|
<string notr="true">Form</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
<property name="sizeConstraint">
|
<property name="sizeConstraint">
|
||||||
@@ -81,7 +81,7 @@
|
|||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>TextLabel</string>
|
<string notr="true">TextLabel</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="textFormat">
|
<property name="textFormat">
|
||||||
<enum>Qt::RichText</enum>
|
<enum>Qt::RichText</enum>
|
||||||
|
|||||||
@@ -108,6 +108,7 @@ Application::Application(int &argc, char **argv)
|
|||||||
, _userTriggeredConnect(false)
|
, _userTriggeredConnect(false)
|
||||||
, _debugMode(false)
|
, _debugMode(false)
|
||||||
, _backgroundMode(false)
|
, _backgroundMode(false)
|
||||||
|
, _isQuitting(false)
|
||||||
{
|
{
|
||||||
_startedAt.start();
|
_startedAt.start();
|
||||||
|
|
||||||
@@ -253,6 +254,9 @@ Application::Application(int &argc, char **argv)
|
|||||||
|
|
||||||
// Cleanup at Quit.
|
// Cleanup at Quit.
|
||||||
connect(this, &QCoreApplication::aboutToQuit, this, &Application::slotCleanup);
|
connect(this, &QCoreApplication::aboutToQuit, this, &Application::slotCleanup);
|
||||||
|
|
||||||
|
// Allow other classes to hook into isShowingSettingsDialog() signals (re-auth widgets, for example)
|
||||||
|
connect(_gui.data(), &ownCloudGui::isShowingSettingsDialog, this, &Application::slotGuiIsShowingSettings);
|
||||||
}
|
}
|
||||||
|
|
||||||
Application::~Application()
|
Application::~Application()
|
||||||
@@ -264,6 +268,8 @@ Application::~Application()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Remove the account from the account manager so it can be deleted.
|
// Remove the account from the account manager so it can be deleted.
|
||||||
|
disconnect(AccountManager::instance(), &AccountManager::accountRemoved,
|
||||||
|
this, &Application::slotAccountStateRemoved);
|
||||||
AccountManager::instance()->shutdown();
|
AccountManager::instance()->shutdown();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -283,7 +289,7 @@ void Application::slotAccountStateRemoved(AccountState *accountState)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// if there is no more account, show the wizard.
|
// if there is no more account, show the wizard.
|
||||||
if (AccountManager::instance()->accounts().isEmpty()) {
|
if (!_isQuitting && AccountManager::instance()->accounts().isEmpty()) {
|
||||||
// allow to add a new account if there is non any more. Always think
|
// allow to add a new account if there is non any more. Always think
|
||||||
// about single account theming!
|
// about single account theming!
|
||||||
OwncloudSetupWizard::runWizard(this, SLOT(slotownCloudWizardDone(int)));
|
OwncloudSetupWizard::runWizard(this, SLOT(slotownCloudWizardDone(int)));
|
||||||
@@ -306,6 +312,8 @@ void Application::slotAccountStateAdded(AccountState *accountState)
|
|||||||
|
|
||||||
void Application::slotCleanup()
|
void Application::slotCleanup()
|
||||||
{
|
{
|
||||||
|
_isQuitting = true;
|
||||||
|
|
||||||
AccountManager::instance()->save();
|
AccountManager::instance()->save();
|
||||||
FolderMan::instance()->unloadAndDeleteAllFolders();
|
FolderMan::instance()->unloadAndDeleteAllFolders();
|
||||||
|
|
||||||
@@ -643,5 +651,9 @@ void Application::showSettingsDialog()
|
|||||||
_gui->slotShowSettings();
|
_gui->slotShowSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Application::slotGuiIsShowingSettings()
|
||||||
|
{
|
||||||
|
emit isShowingSettingsDialog();
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace OCC
|
} // namespace OCC
|
||||||
|
|||||||
@@ -82,6 +82,7 @@ protected:
|
|||||||
signals:
|
signals:
|
||||||
void folderRemoved();
|
void folderRemoved();
|
||||||
void folderStateChanged(Folder *);
|
void folderStateChanged(Folder *);
|
||||||
|
void isShowingSettingsDialog();
|
||||||
|
|
||||||
protected slots:
|
protected slots:
|
||||||
void slotParseMessage(const QString &, QObject *);
|
void slotParseMessage(const QString &, QObject *);
|
||||||
@@ -91,6 +92,7 @@ protected slots:
|
|||||||
void slotAccountStateAdded(AccountState *accountState);
|
void slotAccountStateAdded(AccountState *accountState);
|
||||||
void slotAccountStateRemoved(AccountState *accountState);
|
void slotAccountStateRemoved(AccountState *accountState);
|
||||||
void slotSystemOnlineConfigurationChanged(QNetworkConfiguration);
|
void slotSystemOnlineConfigurationChanged(QNetworkConfiguration);
|
||||||
|
void slotGuiIsShowingSettings();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void setHelp();
|
void setHelp();
|
||||||
@@ -114,6 +116,7 @@ private:
|
|||||||
bool _userTriggeredConnect;
|
bool _userTriggeredConnect;
|
||||||
bool _debugMode;
|
bool _debugMode;
|
||||||
bool _backgroundMode;
|
bool _backgroundMode;
|
||||||
|
bool _isQuitting;
|
||||||
|
|
||||||
ClientProxy _proxy;
|
ClientProxy _proxy;
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ extern "C" {
|
|||||||
|
|
||||||
CloudProvidersProviderExporter *_providerExporter;
|
CloudProvidersProviderExporter *_providerExporter;
|
||||||
|
|
||||||
void on_bus_acquired (GDBusConnection *connection, const gchar *name, gpointer user_data)
|
void on_name_acquired (GDBusConnection *connection, const gchar *name, gpointer user_data)
|
||||||
{
|
{
|
||||||
Q_UNUSED(name);
|
Q_UNUSED(name);
|
||||||
CloudProviderManager *self;
|
CloudProviderManager *self;
|
||||||
@@ -34,6 +34,14 @@ void on_bus_acquired (GDBusConnection *connection, const gchar *name, gpointer u
|
|||||||
self->registerSignals();
|
self->registerSignals();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void on_name_lost (GDBusConnection *connection, const gchar *name, gpointer user_data)
|
||||||
|
{
|
||||||
|
Q_UNUSED(connection);
|
||||||
|
Q_UNUSED(name);
|
||||||
|
Q_UNUSED(user_data);
|
||||||
|
g_clear_object (&_providerExporter);
|
||||||
|
}
|
||||||
|
|
||||||
void CloudProviderManager::registerSignals()
|
void CloudProviderManager::registerSignals()
|
||||||
{
|
{
|
||||||
OCC::FolderMan *folderManager = OCC::FolderMan::instance();
|
OCC::FolderMan *folderManager = OCC::FolderMan::instance();
|
||||||
@@ -45,7 +53,7 @@ CloudProviderManager::CloudProviderManager(QObject *parent) : QObject(parent)
|
|||||||
{
|
{
|
||||||
_map = new QMap<QString, CloudProviderWrapper*>();
|
_map = new QMap<QString, CloudProviderWrapper*>();
|
||||||
QString busName = QString(LIBCLOUDPROVIDERS_DBUS_BUS_NAME);
|
QString busName = QString(LIBCLOUDPROVIDERS_DBUS_BUS_NAME);
|
||||||
g_bus_own_name (G_BUS_TYPE_SESSION, busName.toAscii().data(), G_BUS_NAME_OWNER_FLAGS_NONE, on_bus_acquired, nullptr, nullptr, this, nullptr);
|
g_bus_own_name (G_BUS_TYPE_SESSION, busName.toAscii().data(), G_BUS_NAME_OWNER_FLAGS_NONE, nullptr, on_name_acquired, nullptr, this, nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CloudProviderManager::slotFolderListChanged(const Folder::Map &folderMap)
|
void CloudProviderManager::slotFolderListChanged(const Folder::Map &folderMap)
|
||||||
|
|||||||
@@ -33,33 +33,25 @@ using namespace OCC;
|
|||||||
|
|
||||||
GSimpleActionGroup *actionGroup = nullptr;
|
GSimpleActionGroup *actionGroup = nullptr;
|
||||||
|
|
||||||
static
|
|
||||||
gchar* qstring_to_gchar(const QString &string)
|
|
||||||
{
|
|
||||||
QByteArray ba = string.toUtf8();
|
|
||||||
char* data = ba.data();
|
|
||||||
return g_strdup(data);
|
|
||||||
}
|
|
||||||
|
|
||||||
CloudProviderWrapper::CloudProviderWrapper(QObject *parent, Folder *folder, CloudProvidersProviderExporter* cloudprovider) : QObject(parent)
|
CloudProviderWrapper::CloudProviderWrapper(QObject *parent, Folder *folder, CloudProvidersProviderExporter* cloudprovider) : QObject(parent)
|
||||||
, _folder(folder)
|
, _folder(folder)
|
||||||
{
|
{
|
||||||
|
GMenuModel *model;
|
||||||
|
GActionGroup *action_group;
|
||||||
_recentlyChanged = new QList<QPair<QString, QString>>();
|
_recentlyChanged = new QList<QPair<QString, QString>>();
|
||||||
gchar *accountName = g_strdup_printf ("Account%sFolder%s",
|
QString accountName = QString("Account%1Folder%2").arg(folder->alias(), folder->accountState()->account()->id());
|
||||||
qstring_to_gchar(folder->alias()),
|
|
||||||
qstring_to_gchar(folder->accountState()->account()->id()));
|
|
||||||
|
|
||||||
_cloudProvider = CLOUD_PROVIDERS_PROVIDER_EXPORTER(cloudprovider);
|
_cloudProvider = CLOUD_PROVIDERS_PROVIDER_EXPORTER(cloudprovider);
|
||||||
_cloudProviderAccount = cloud_providers_account_exporter_new(_cloudProvider, accountName);
|
_cloudProviderAccount = cloud_providers_account_exporter_new(_cloudProvider, accountName.toUtf8().data());
|
||||||
|
|
||||||
gchar* folderName = qstring_to_gchar(folder->shortGuiLocalPath());
|
cloud_providers_account_exporter_set_name (_cloudProviderAccount, folder->shortGuiLocalPath().toUtf8().data());
|
||||||
gchar* folderPath = qstring_to_gchar(folder->cleanPath());
|
|
||||||
cloud_providers_account_exporter_set_name (_cloudProviderAccount, folderName);
|
|
||||||
cloud_providers_account_exporter_set_icon (_cloudProviderAccount, g_icon_new_for_string(APPLICATION_ICON_NAME, nullptr));
|
cloud_providers_account_exporter_set_icon (_cloudProviderAccount, g_icon_new_for_string(APPLICATION_ICON_NAME, nullptr));
|
||||||
cloud_providers_account_exporter_set_path (_cloudProviderAccount, folderPath);
|
cloud_providers_account_exporter_set_path (_cloudProviderAccount, folder->cleanPath().toUtf8().data());
|
||||||
cloud_providers_account_exporter_set_status (_cloudProviderAccount, CLOUD_PROVIDERS_ACCOUNT_STATUS_IDLE);
|
cloud_providers_account_exporter_set_status (_cloudProviderAccount, CLOUD_PROVIDERS_ACCOUNT_STATUS_IDLE);
|
||||||
cloud_providers_account_exporter_set_menu_model (_cloudProviderAccount, getMenuModel());
|
model = getMenuModel();
|
||||||
cloud_providers_account_exporter_set_action_group (_cloudProviderAccount, getActionGroup());
|
cloud_providers_account_exporter_set_menu_model (_cloudProviderAccount, model);
|
||||||
|
action_group = getActionGroup();
|
||||||
|
cloud_providers_account_exporter_set_action_group (_cloudProviderAccount, action_group);
|
||||||
|
|
||||||
connect(ProgressDispatcher::instance(), SIGNAL(progressInfo(QString, ProgressInfo)), this, SLOT(slotUpdateProgress(QString, ProgressInfo)));
|
connect(ProgressDispatcher::instance(), SIGNAL(progressInfo(QString, ProgressInfo)), this, SLOT(slotUpdateProgress(QString, ProgressInfo)));
|
||||||
connect(_folder, SIGNAL(syncStarted()), this, SLOT(slotSyncStarted()));
|
connect(_folder, SIGNAL(syncStarted()), this, SLOT(slotSyncStarted()));
|
||||||
@@ -68,10 +60,8 @@ CloudProviderWrapper::CloudProviderWrapper(QObject *parent, Folder *folder, Clou
|
|||||||
|
|
||||||
_paused = _folder->syncPaused();
|
_paused = _folder->syncPaused();
|
||||||
updatePauseStatus();
|
updatePauseStatus();
|
||||||
|
g_clear_object (&model);
|
||||||
g_free(accountName);
|
g_clear_object (&action_group);
|
||||||
g_free(folderName);
|
|
||||||
g_free(folderPath);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CloudProviderWrapper::~CloudProviderWrapper()
|
CloudProviderWrapper::~CloudProviderWrapper()
|
||||||
@@ -93,6 +83,16 @@ static bool shouldShowInRecentsMenu(const SyncFileItem &item)
|
|||||||
&& item._instruction != CSYNC_INSTRUCTION_NONE;
|
&& item._instruction != CSYNC_INSTRUCTION_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static GMenuItem *menu_item_new(const QString &label, const gchar *detailed_action)
|
||||||
|
{
|
||||||
|
return g_menu_item_new(label.toUtf8 ().data(), detailed_action);
|
||||||
|
}
|
||||||
|
|
||||||
|
static GMenuItem *menu_item_new_submenu(const QString &label, GMenuModel *submenu)
|
||||||
|
{
|
||||||
|
return g_menu_item_new_submenu(label.toUtf8 ().data(), submenu);
|
||||||
|
}
|
||||||
|
|
||||||
void CloudProviderWrapper::slotUpdateProgress(const QString &folder, const ProgressInfo &progress)
|
void CloudProviderWrapper::slotUpdateProgress(const QString &folder, const ProgressInfo &progress)
|
||||||
{
|
{
|
||||||
// Only update progress for the current folder
|
// Only update progress for the current folder
|
||||||
@@ -154,30 +154,25 @@ void CloudProviderWrapper::slotUpdateProgress(const QString &folder, const Progr
|
|||||||
if(!_recentlyChanged->isEmpty()) {
|
if(!_recentlyChanged->isEmpty()) {
|
||||||
QList<QPair<QString, QString>>::iterator i;
|
QList<QPair<QString, QString>>::iterator i;
|
||||||
for (i = _recentlyChanged->begin(); i != _recentlyChanged->end(); i++) {
|
for (i = _recentlyChanged->begin(); i != _recentlyChanged->end(); i++) {
|
||||||
gchar *file;
|
|
||||||
QString label = i->first;
|
QString label = i->first;
|
||||||
QString fullPath = i->second;
|
QString fullPath = i->second;
|
||||||
file = g_strdup(qstring_to_gchar(label));
|
item = menu_item_new(label, "cloudprovider.showfile");
|
||||||
item = g_menu_item_new(file, "cloudprovider.showfile");
|
g_menu_item_set_action_and_target_value(item, "cloudprovider.showfile", g_variant_new_string(fullPath.toUtf8().data()));
|
||||||
g_menu_item_set_action_and_target_value(item, "cloudprovider.showfile", g_variant_new_string(qstring_to_gchar(fullPath)));
|
|
||||||
g_menu_append_item(_recentMenu, item);
|
g_menu_append_item(_recentMenu, item);
|
||||||
|
g_clear_object (&item);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
item = g_menu_item_new("No recently changed files", nullptr);
|
item = menu_item_new(tr("No recently changed files"), nullptr);
|
||||||
g_menu_append_item(_recentMenu, item);
|
g_menu_append_item(_recentMenu, item);
|
||||||
|
g_clear_object (&item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CloudProviderWrapper::updateStatusText(QString statusText)
|
void CloudProviderWrapper::updateStatusText(QString statusText)
|
||||||
{
|
{
|
||||||
char* state = qstring_to_gchar(_folder->accountState()->stateString(_folder->accountState()->state()));
|
QString status = QString("%1 - %2").arg(_folder->accountState()->stateString(_folder->accountState()->state()), statusText);
|
||||||
char* statusChar = qstring_to_gchar(statusText);
|
cloud_providers_account_exporter_set_status_details(_cloudProviderAccount, status.toUtf8().data());
|
||||||
char* status = g_strdup_printf("%s - %s", state, statusChar);
|
|
||||||
cloud_providers_account_exporter_set_status_details(_cloudProviderAccount, status);
|
|
||||||
g_free(state);
|
|
||||||
g_free(statusChar);
|
|
||||||
g_free(status);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CloudProviderWrapper::updatePauseStatus()
|
void CloudProviderWrapper::updatePauseStatus()
|
||||||
@@ -217,38 +212,53 @@ GMenuModel* CloudProviderWrapper::getMenuModel() {
|
|||||||
|
|
||||||
GMenu* section;
|
GMenu* section;
|
||||||
GMenuItem* item;
|
GMenuItem* item;
|
||||||
|
QString item_label;
|
||||||
|
|
||||||
_mainMenu = g_menu_new();
|
_mainMenu = g_menu_new();
|
||||||
|
|
||||||
section = g_menu_new();
|
section = g_menu_new();
|
||||||
item = g_menu_item_new("Open website", "cloudprovider.openwebsite");
|
item = menu_item_new(tr("Open website"), "cloudprovider.openwebsite");
|
||||||
g_menu_append_item(section, item);
|
g_menu_append_item(section, item);
|
||||||
|
g_clear_object (&item);
|
||||||
g_menu_append_section(_mainMenu, nullptr, G_MENU_MODEL(section));
|
g_menu_append_section(_mainMenu, nullptr, G_MENU_MODEL(section));
|
||||||
|
g_clear_object (§ion);
|
||||||
|
|
||||||
_recentMenu = g_menu_new();
|
_recentMenu = g_menu_new();
|
||||||
item = g_menu_item_new("No recently changed files", nullptr);
|
item = menu_item_new(tr("No recently changed files"), nullptr);
|
||||||
g_menu_append_item(_recentMenu, item);
|
g_menu_append_item(_recentMenu, item);
|
||||||
section = g_menu_new();
|
g_clear_object (&item);
|
||||||
item = g_menu_item_new_submenu("Recently changed", G_MENU_MODEL(_recentMenu));
|
|
||||||
g_menu_append_item(section, item);
|
|
||||||
g_menu_append_section(_mainMenu, nullptr, G_MENU_MODEL(section));
|
|
||||||
|
|
||||||
section = g_menu_new();
|
section = g_menu_new();
|
||||||
item = g_menu_item_new("Pause synchronization", "cloudprovider.pause");
|
item = menu_item_new_submenu(tr("Recently changed"), G_MENU_MODEL(_recentMenu));
|
||||||
g_menu_append_item(section, item);
|
g_menu_append_item(section, item);
|
||||||
|
g_clear_object (&item);
|
||||||
g_menu_append_section(_mainMenu, nullptr, G_MENU_MODEL(section));
|
g_menu_append_section(_mainMenu, nullptr, G_MENU_MODEL(section));
|
||||||
|
g_clear_object (§ion);
|
||||||
|
|
||||||
section = g_menu_new();
|
section = g_menu_new();
|
||||||
item = g_menu_item_new("Help", "cloudprovider.openhelp");
|
item = menu_item_new(tr("Pause synchronization"), "cloudprovider.pause");
|
||||||
g_menu_append_item(section, item);
|
|
||||||
item = g_menu_item_new("Settings", "cloudprovider.opensettings");
|
|
||||||
g_menu_append_item(section, item);
|
|
||||||
item = g_menu_item_new("Log out", "cloudprovider.logout");
|
|
||||||
g_menu_append_item(section, item);
|
|
||||||
item = g_menu_item_new("Quit sync client", "cloudprovider.quit");
|
|
||||||
g_menu_append_item(section, item);
|
g_menu_append_item(section, item);
|
||||||
|
g_clear_object (&item);
|
||||||
g_menu_append_section(_mainMenu, nullptr, G_MENU_MODEL(section));
|
g_menu_append_section(_mainMenu, nullptr, G_MENU_MODEL(section));
|
||||||
|
g_clear_object (§ion);
|
||||||
|
|
||||||
|
section = g_menu_new();
|
||||||
|
item = menu_item_new(tr("Help"), "cloudprovider.openhelp");
|
||||||
|
g_menu_append_item(section, item);
|
||||||
|
g_clear_object (&item);
|
||||||
|
item = menu_item_new(tr("Settings"), "cloudprovider.opensettings");
|
||||||
|
g_menu_append_item(section, item);
|
||||||
|
g_clear_object (&item);
|
||||||
|
item = menu_item_new(tr("Log out"), "cloudprovider.logout");
|
||||||
|
g_menu_append_item(section, item);
|
||||||
|
g_clear_object (&item);
|
||||||
|
item = menu_item_new(tr("Quit sync client"), "cloudprovider.quit");
|
||||||
|
g_menu_append_item(section, item);
|
||||||
|
g_clear_object (&item);
|
||||||
|
g_menu_append_section(_mainMenu, nullptr, G_MENU_MODEL(section));
|
||||||
|
g_clear_object (§ion);
|
||||||
|
|
||||||
|
g_clear_object (&_recentMenu);
|
||||||
return G_MENU_MODEL(_mainMenu);
|
return G_MENU_MODEL(_mainMenu);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -277,11 +287,10 @@ activate_action_open (GSimpleAction *action, GVariant *parameter, gpointer user_
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(g_str_equal(name, "showfile")) {
|
if(g_str_equal(name, "showfile")) {
|
||||||
gchar *path;
|
const gchar *path = g_variant_get_string (parameter, NULL);
|
||||||
g_variant_get (parameter, "s", &path);
|
g_print("showfile => %s\n", path);
|
||||||
g_print("showfile => %s\n", path);
|
showInFileManager(QString(path));
|
||||||
showInFileManager(QString(path));
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if(g_str_equal(name, "logout")) {
|
if(g_str_equal(name, "logout")) {
|
||||||
self->folder()->accountState()->signOutByUi();
|
self->folder()->accountState()->signOutByUi();
|
||||||
@@ -331,12 +340,13 @@ static GActionEntry actions[] = {
|
|||||||
|
|
||||||
GActionGroup* CloudProviderWrapper::getActionGroup()
|
GActionGroup* CloudProviderWrapper::getActionGroup()
|
||||||
{
|
{
|
||||||
|
g_clear_object (&actionGroup);
|
||||||
actionGroup = g_simple_action_group_new ();
|
actionGroup = g_simple_action_group_new ();
|
||||||
g_action_map_add_action_entries (G_ACTION_MAP (actionGroup), actions, G_N_ELEMENTS (actions), this);
|
g_action_map_add_action_entries (G_ACTION_MAP (actionGroup), actions, G_N_ELEMENTS (actions), this);
|
||||||
bool state = _folder->syncPaused();
|
bool state = _folder->syncPaused();
|
||||||
GAction *pause = g_action_map_lookup_action(G_ACTION_MAP(actionGroup), "pause");
|
GAction *pause = g_action_map_lookup_action(G_ACTION_MAP(actionGroup), "pause");
|
||||||
g_simple_action_set_state(G_SIMPLE_ACTION(pause), g_variant_new_boolean(state));
|
g_simple_action_set_state(G_SIMPLE_ACTION(pause), g_variant_new_boolean(state));
|
||||||
return G_ACTION_GROUP (actionGroup);
|
return G_ACTION_GROUP (g_object_ref (actionGroup));
|
||||||
}
|
}
|
||||||
|
|
||||||
void CloudProviderWrapper::slotSyncPausedChanged(Folder *folder, bool state)
|
void CloudProviderWrapper::slotSyncPausedChanged(Folder *folder, bool state)
|
||||||
|
|||||||
271
src/gui/creds/flow2auth.cpp
Normal file
@@ -0,0 +1,271 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) by Olivier Goffart <ogoffart@woboq.com>
|
||||||
|
* Copyright (C) by Michael Schuster <michael@nextcloud.com>
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <QDesktopServices>
|
||||||
|
#include <QApplication>
|
||||||
|
#include <QClipboard>
|
||||||
|
#include <QTimer>
|
||||||
|
#include <QBuffer>
|
||||||
|
#include "account.h"
|
||||||
|
#include "flow2auth.h"
|
||||||
|
#include <QJsonObject>
|
||||||
|
#include <QJsonDocument>
|
||||||
|
#include "theme.h"
|
||||||
|
#include "networkjobs.h"
|
||||||
|
#include "configfile.h"
|
||||||
|
|
||||||
|
namespace OCC {
|
||||||
|
|
||||||
|
Q_LOGGING_CATEGORY(lcFlow2auth, "nextcloud.sync.credentials.flow2auth", QtInfoMsg)
|
||||||
|
|
||||||
|
|
||||||
|
Flow2Auth::Flow2Auth(Account *account, QObject *parent)
|
||||||
|
: QObject(parent)
|
||||||
|
, _account(account)
|
||||||
|
, _isBusy(false)
|
||||||
|
, _hasToken(false)
|
||||||
|
{
|
||||||
|
_pollTimer.setInterval(1000);
|
||||||
|
QObject::connect(&_pollTimer, &QTimer::timeout, this, &Flow2Auth::slotPollTimerTimeout);
|
||||||
|
}
|
||||||
|
|
||||||
|
Flow2Auth::~Flow2Auth()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void Flow2Auth::start()
|
||||||
|
{
|
||||||
|
// Note: All startup code is in openBrowser() to allow reinitiate a new request with
|
||||||
|
// fresh tokens. Opening the same pollEndpoint link twice triggers an expiration
|
||||||
|
// message by the server (security, intended design).
|
||||||
|
openBrowser();
|
||||||
|
}
|
||||||
|
|
||||||
|
QUrl Flow2Auth::authorisationLink() const
|
||||||
|
{
|
||||||
|
return _loginUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Flow2Auth::openBrowser()
|
||||||
|
{
|
||||||
|
fetchNewToken(TokenAction::actionOpenBrowser);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Flow2Auth::copyLinkToClipboard()
|
||||||
|
{
|
||||||
|
fetchNewToken(TokenAction::actionCopyLinkToClipboard);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Flow2Auth::fetchNewToken(const TokenAction action)
|
||||||
|
{
|
||||||
|
if(_isBusy)
|
||||||
|
return;
|
||||||
|
|
||||||
|
_isBusy = true;
|
||||||
|
_hasToken = false;
|
||||||
|
|
||||||
|
emit statusChanged(PollStatus::statusFetchToken, 0);
|
||||||
|
|
||||||
|
// Step 1: Initiate a login, do an anonymous POST request
|
||||||
|
QUrl url = Utility::concatUrlPath(_account->url().toString(), QLatin1String("/index.php/login/v2"));
|
||||||
|
|
||||||
|
// add 'Content-Length: 0' header (see https://github.com/nextcloud/desktop/issues/1473)
|
||||||
|
QNetworkRequest req;
|
||||||
|
req.setHeader(QNetworkRequest::ContentLengthHeader, "0");
|
||||||
|
|
||||||
|
auto job = _account->sendRequest("POST", url, req);
|
||||||
|
job->setTimeout(qMin(30 * 1000ll, job->timeoutMsec()));
|
||||||
|
|
||||||
|
QObject::connect(job, &SimpleNetworkJob::finishedSignal, this, [this, action](QNetworkReply *reply) {
|
||||||
|
auto jsonData = reply->readAll();
|
||||||
|
QJsonParseError jsonParseError;
|
||||||
|
QJsonObject json = QJsonDocument::fromJson(jsonData, &jsonParseError).object();
|
||||||
|
QString pollToken, pollEndpoint, loginUrl;
|
||||||
|
|
||||||
|
if (reply->error() == QNetworkReply::NoError && jsonParseError.error == QJsonParseError::NoError
|
||||||
|
&& !json.isEmpty()) {
|
||||||
|
pollToken = json.value("poll").toObject().value("token").toString();
|
||||||
|
pollEndpoint = json.value("poll").toObject().value("endpoint").toString();
|
||||||
|
loginUrl = json["login"].toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (reply->error() != QNetworkReply::NoError || jsonParseError.error != QJsonParseError::NoError
|
||||||
|
|| json.isEmpty() || pollToken.isEmpty() || pollEndpoint.isEmpty() || loginUrl.isEmpty()) {
|
||||||
|
QString errorReason;
|
||||||
|
QString errorFromJson = json["error"].toString();
|
||||||
|
if (!errorFromJson.isEmpty()) {
|
||||||
|
errorReason = tr("Error returned from the server: <em>%1</em>")
|
||||||
|
.arg(errorFromJson.toHtmlEscaped());
|
||||||
|
} else if (reply->error() != QNetworkReply::NoError) {
|
||||||
|
errorReason = tr("There was an error accessing the 'token' endpoint: <br><em>%1</em>")
|
||||||
|
.arg(reply->errorString().toHtmlEscaped());
|
||||||
|
} else if (jsonParseError.error != QJsonParseError::NoError) {
|
||||||
|
errorReason = tr("Could not parse the JSON returned from the server: <br><em>%1</em>")
|
||||||
|
.arg(jsonParseError.errorString());
|
||||||
|
} else {
|
||||||
|
errorReason = tr("The reply from the server did not contain all expected fields");
|
||||||
|
}
|
||||||
|
qCWarning(lcFlow2auth) << "Error when getting the loginUrl" << json << errorReason;
|
||||||
|
emit result(Error, errorReason);
|
||||||
|
_pollTimer.stop();
|
||||||
|
_isBusy = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
_loginUrl = loginUrl;
|
||||||
|
_pollToken = pollToken;
|
||||||
|
_pollEndpoint = pollEndpoint;
|
||||||
|
|
||||||
|
|
||||||
|
// Start polling
|
||||||
|
ConfigFile cfg;
|
||||||
|
std::chrono::milliseconds polltime = cfg.remotePollInterval();
|
||||||
|
qCInfo(lcFlow2auth) << "setting remote poll timer interval to" << polltime.count() << "msec";
|
||||||
|
_secondsInterval = (polltime.count() / 1000);
|
||||||
|
_secondsLeft = _secondsInterval;
|
||||||
|
emit statusChanged(PollStatus::statusPollCountdown, _secondsLeft);
|
||||||
|
|
||||||
|
if(!_pollTimer.isActive()) {
|
||||||
|
_pollTimer.start();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
switch(action)
|
||||||
|
{
|
||||||
|
case actionOpenBrowser:
|
||||||
|
// Try to open Browser
|
||||||
|
if (!QDesktopServices::openUrl(authorisationLink())) {
|
||||||
|
// We cannot open the browser, then we claim we don't support Flow2Auth.
|
||||||
|
// Our UI callee will ask the user to copy and open the link.
|
||||||
|
emit result(NotSupported);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case actionCopyLinkToClipboard:
|
||||||
|
QApplication::clipboard()->setText(authorisationLink().toString(QUrl::FullyEncoded));
|
||||||
|
emit statusChanged(PollStatus::statusCopyLinkToClipboard, 0);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
_isBusy = false;
|
||||||
|
_hasToken = true;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void Flow2Auth::slotPollTimerTimeout()
|
||||||
|
{
|
||||||
|
if(_isBusy || !_hasToken)
|
||||||
|
return;
|
||||||
|
|
||||||
|
_isBusy = true;
|
||||||
|
|
||||||
|
_secondsLeft--;
|
||||||
|
if(_secondsLeft > 0) {
|
||||||
|
emit statusChanged(PollStatus::statusPollCountdown, _secondsLeft);
|
||||||
|
_isBusy = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
emit statusChanged(PollStatus::statusPollNow, 0);
|
||||||
|
|
||||||
|
// Step 2: Poll
|
||||||
|
QNetworkRequest req;
|
||||||
|
req.setHeader(QNetworkRequest::ContentTypeHeader, "application/x-www-form-urlencoded");
|
||||||
|
|
||||||
|
auto requestBody = new QBuffer;
|
||||||
|
QUrlQuery arguments(QString("token=%1").arg(_pollToken));
|
||||||
|
requestBody->setData(arguments.query(QUrl::FullyEncoded).toLatin1());
|
||||||
|
|
||||||
|
auto job = _account->sendRequest("POST", _pollEndpoint, req, requestBody);
|
||||||
|
job->setTimeout(qMin(30 * 1000ll, job->timeoutMsec()));
|
||||||
|
|
||||||
|
QObject::connect(job, &SimpleNetworkJob::finishedSignal, this, [this](QNetworkReply *reply) {
|
||||||
|
auto jsonData = reply->readAll();
|
||||||
|
QJsonParseError jsonParseError;
|
||||||
|
QJsonObject json = QJsonDocument::fromJson(jsonData, &jsonParseError).object();
|
||||||
|
QUrl serverUrl;
|
||||||
|
QString loginName, appPassword;
|
||||||
|
|
||||||
|
if (reply->error() == QNetworkReply::NoError && jsonParseError.error == QJsonParseError::NoError
|
||||||
|
&& !json.isEmpty()) {
|
||||||
|
serverUrl = json["server"].toString();
|
||||||
|
loginName = json["loginName"].toString();
|
||||||
|
appPassword = json["appPassword"].toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (reply->error() != QNetworkReply::NoError || jsonParseError.error != QJsonParseError::NoError
|
||||||
|
|| json.isEmpty() || serverUrl.isEmpty() || loginName.isEmpty() || appPassword.isEmpty()) {
|
||||||
|
QString errorReason;
|
||||||
|
QString errorFromJson = json["error"].toString();
|
||||||
|
if (!errorFromJson.isEmpty()) {
|
||||||
|
errorReason = tr("Error returned from the server: <em>%1</em>")
|
||||||
|
.arg(errorFromJson.toHtmlEscaped());
|
||||||
|
} else if (reply->error() != QNetworkReply::NoError) {
|
||||||
|
errorReason = tr("There was an error accessing the 'token' endpoint: <br><em>%1</em>")
|
||||||
|
.arg(reply->errorString().toHtmlEscaped());
|
||||||
|
} else if (jsonParseError.error != QJsonParseError::NoError) {
|
||||||
|
errorReason = tr("Could not parse the JSON returned from the server: <br><em>%1</em>")
|
||||||
|
.arg(jsonParseError.errorString());
|
||||||
|
} else {
|
||||||
|
errorReason = tr("The reply from the server did not contain all expected fields");
|
||||||
|
}
|
||||||
|
qCDebug(lcFlow2auth) << "Error when polling for the appPassword" << json << errorReason;
|
||||||
|
|
||||||
|
// We get a 404 until authentication is done, so don't show this error in the GUI.
|
||||||
|
if(reply->error() != QNetworkReply::ContentNotFoundError)
|
||||||
|
emit result(Error, errorReason);
|
||||||
|
|
||||||
|
// Forget sensitive data
|
||||||
|
appPassword.clear();
|
||||||
|
loginName.clear();
|
||||||
|
|
||||||
|
// Failed: poll again
|
||||||
|
_secondsLeft = _secondsInterval;
|
||||||
|
_isBusy = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
_pollTimer.stop();
|
||||||
|
|
||||||
|
// Success
|
||||||
|
qCInfo(lcFlow2auth) << "Success getting the appPassword for user: " << loginName << ", server: " << serverUrl.toString();
|
||||||
|
|
||||||
|
_account->setUrl(serverUrl);
|
||||||
|
|
||||||
|
emit result(LoggedIn, QString(), loginName, appPassword);
|
||||||
|
|
||||||
|
// Forget sensitive data
|
||||||
|
appPassword.clear();
|
||||||
|
loginName.clear();
|
||||||
|
|
||||||
|
_loginUrl.clear();
|
||||||
|
_pollToken.clear();
|
||||||
|
_pollEndpoint.clear();
|
||||||
|
|
||||||
|
_isBusy = false;
|
||||||
|
_hasToken = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void Flow2Auth::slotPollNow()
|
||||||
|
{
|
||||||
|
// poll now if we're not already doing so
|
||||||
|
if(_isBusy || !_hasToken)
|
||||||
|
return;
|
||||||
|
|
||||||
|
_secondsLeft = 1;
|
||||||
|
slotPollTimerTimeout();
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace OCC
|
||||||
86
src/gui/creds/flow2auth.h
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) by Olivier Goffart <ogoffart@woboq.com>
|
||||||
|
* Copyright (C) by Michael Schuster <michael@nextcloud.com>
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
#include <QPointer>
|
||||||
|
#include <QUrl>
|
||||||
|
#include <QTimer>
|
||||||
|
#include "accountfwd.h"
|
||||||
|
|
||||||
|
namespace OCC {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Job that does the authorization, grants and fetches the access token via Login Flow v2
|
||||||
|
*
|
||||||
|
* See: https://docs.nextcloud.com/server/latest/developer_manual/client_apis/LoginFlow/index.html#login-flow-v2
|
||||||
|
*/
|
||||||
|
class Flow2Auth : public QObject
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
enum TokenAction {
|
||||||
|
actionOpenBrowser = 1,
|
||||||
|
actionCopyLinkToClipboard
|
||||||
|
};
|
||||||
|
enum PollStatus {
|
||||||
|
statusPollCountdown = 1,
|
||||||
|
statusPollNow,
|
||||||
|
statusFetchToken,
|
||||||
|
statusCopyLinkToClipboard
|
||||||
|
};
|
||||||
|
|
||||||
|
Flow2Auth(Account *account, QObject *parent);
|
||||||
|
~Flow2Auth();
|
||||||
|
|
||||||
|
enum Result { NotSupported,
|
||||||
|
LoggedIn,
|
||||||
|
Error };
|
||||||
|
Q_ENUM(Result);
|
||||||
|
void start();
|
||||||
|
void openBrowser();
|
||||||
|
void copyLinkToClipboard();
|
||||||
|
QUrl authorisationLink() const;
|
||||||
|
|
||||||
|
signals:
|
||||||
|
/**
|
||||||
|
* The state has changed.
|
||||||
|
* when logged in, appPassword has the value of the app password.
|
||||||
|
*/
|
||||||
|
void result(Flow2Auth::Result result, const QString &errorString = QString(),
|
||||||
|
const QString &user = QString(), const QString &appPassword = QString());
|
||||||
|
|
||||||
|
void statusChanged(const PollStatus status, int secondsLeft);
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
void slotPollNow();
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void slotPollTimerTimeout();
|
||||||
|
|
||||||
|
private:
|
||||||
|
void fetchNewToken(const TokenAction action);
|
||||||
|
|
||||||
|
Account *_account;
|
||||||
|
QUrl _loginUrl;
|
||||||
|
QString _pollToken;
|
||||||
|
QString _pollEndpoint;
|
||||||
|
QTimer _pollTimer;
|
||||||
|
int _secondsLeft;
|
||||||
|
int _secondsInterval;
|
||||||
|
bool _isBusy;
|
||||||
|
bool _hasToken;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace OCC
|
||||||
221
src/gui/creds/keychainchunk.cpp
Normal file
@@ -0,0 +1,221 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) by Michael Schuster <michael@nextcloud.com>
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "account.h"
|
||||||
|
#include "keychainchunk.h"
|
||||||
|
#include "theme.h"
|
||||||
|
#include "networkjobs.h"
|
||||||
|
#include "configfile.h"
|
||||||
|
#include "creds/abstractcredentials.h"
|
||||||
|
|
||||||
|
using namespace QKeychain;
|
||||||
|
|
||||||
|
namespace OCC {
|
||||||
|
|
||||||
|
Q_LOGGING_CATEGORY(lcKeychainChunk, "nextcloud.sync.credentials.keychainchunk", QtInfoMsg)
|
||||||
|
|
||||||
|
namespace KeychainChunk {
|
||||||
|
|
||||||
|
#if defined(KEYCHAINCHUNK_ENABLE_INSECURE_FALLBACK)
|
||||||
|
static void addSettingsToJob(Account *account, QKeychain::Job *job)
|
||||||
|
{
|
||||||
|
Q_UNUSED(account)
|
||||||
|
auto settings = ConfigFile::settingsWithGroup(Theme::instance()->appName());
|
||||||
|
settings->setParent(job); // make the job parent to make setting deleted properly
|
||||||
|
job->setSettings(settings.release());
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Job
|
||||||
|
*/
|
||||||
|
Job::Job(QObject *parent)
|
||||||
|
: QObject(parent)
|
||||||
|
{
|
||||||
|
_serviceName = Theme::instance()->appName();
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* WriteJob
|
||||||
|
*/
|
||||||
|
WriteJob::WriteJob(Account *account, const QString &key, const QByteArray &data, QObject *parent)
|
||||||
|
: Job(parent)
|
||||||
|
{
|
||||||
|
_account = account;
|
||||||
|
_key = key;
|
||||||
|
|
||||||
|
// Windows workaround: Split the private key into chunks of 2048 bytes,
|
||||||
|
// to allow 4k (4096 bit) keys to be saved (obey Windows's limits)
|
||||||
|
_chunkBuffer = data;
|
||||||
|
_chunkCount = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void WriteJob::start()
|
||||||
|
{
|
||||||
|
slotWriteJobDone(nullptr);
|
||||||
|
}
|
||||||
|
|
||||||
|
void WriteJob::slotWriteJobDone(QKeychain::Job *incomingJob)
|
||||||
|
{
|
||||||
|
QKeychain::WritePasswordJob *writeJob = static_cast<QKeychain::WritePasswordJob *>(incomingJob);
|
||||||
|
|
||||||
|
// errors?
|
||||||
|
if (writeJob) {
|
||||||
|
_error = writeJob->error();
|
||||||
|
_errorString = writeJob->errorString();
|
||||||
|
|
||||||
|
if (writeJob->error() != NoError) {
|
||||||
|
qCWarning(lcKeychainChunk) << "Error while writing" << writeJob->key() << "chunk" << writeJob->errorString();
|
||||||
|
_chunkBuffer.clear();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// write a chunk if there is any in the buffer
|
||||||
|
if (!_chunkBuffer.isEmpty()) {
|
||||||
|
#if defined(Q_OS_WIN)
|
||||||
|
// Windows workaround: Split the data into chunks of 2048 bytes,
|
||||||
|
// to allow 4k (4096 bit) keys to be saved (obey Windows's limits)
|
||||||
|
auto chunk = _chunkBuffer.left(KeychainChunk::ChunkSize);
|
||||||
|
|
||||||
|
_chunkBuffer = _chunkBuffer.right(_chunkBuffer.size() - chunk.size());
|
||||||
|
#else
|
||||||
|
// write full data in one chunk on non-Windows, as usual
|
||||||
|
auto chunk = _chunkBuffer;
|
||||||
|
|
||||||
|
_chunkBuffer.clear();
|
||||||
|
#endif
|
||||||
|
auto index = (_chunkCount++);
|
||||||
|
|
||||||
|
// keep the limit
|
||||||
|
if (_chunkCount > KeychainChunk::MaxChunks) {
|
||||||
|
qCWarning(lcKeychainChunk) << "Maximum chunk count exceeded while writing" << writeJob->key() << "chunk" << QString::number(index) << "cutting off after" << QString::number(KeychainChunk::MaxChunks) << "chunks";
|
||||||
|
|
||||||
|
writeJob->deleteLater();
|
||||||
|
|
||||||
|
_chunkBuffer.clear();
|
||||||
|
|
||||||
|
emit finished(this);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const QString kck = AbstractCredentials::keychainKey(
|
||||||
|
_account->url().toString(),
|
||||||
|
_key + (index > 0 ? (QString(".") + QString::number(index)) : QString()),
|
||||||
|
_account->id());
|
||||||
|
|
||||||
|
QKeychain::WritePasswordJob *job = new QKeychain::WritePasswordJob(_serviceName);
|
||||||
|
#if defined(KEYCHAINCHUNK_ENABLE_INSECURE_FALLBACK)
|
||||||
|
addSettingsToJob(_account, job);
|
||||||
|
#endif
|
||||||
|
job->setInsecureFallback(_insecureFallback);
|
||||||
|
connect(job, &QKeychain::Job::finished, this, &KeychainChunk::WriteJob::slotWriteJobDone);
|
||||||
|
// only add the key's (sub)"index" after the first element, to stay compatible with older versions and non-Windows
|
||||||
|
job->setKey(kck);
|
||||||
|
job->setBinaryData(chunk);
|
||||||
|
job->start();
|
||||||
|
|
||||||
|
chunk.clear();
|
||||||
|
} else {
|
||||||
|
emit finished(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
writeJob->deleteLater();
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ReadJob
|
||||||
|
*/
|
||||||
|
ReadJob::ReadJob(Account *account, const QString &key, const bool &keychainMigration, QObject *parent)
|
||||||
|
: Job(parent)
|
||||||
|
{
|
||||||
|
_account = account;
|
||||||
|
_key = key;
|
||||||
|
|
||||||
|
_keychainMigration = keychainMigration;
|
||||||
|
|
||||||
|
_chunkCount = 0;
|
||||||
|
_chunkBuffer.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ReadJob::start()
|
||||||
|
{
|
||||||
|
_chunkCount = 0;
|
||||||
|
_chunkBuffer.clear();
|
||||||
|
|
||||||
|
const QString kck = AbstractCredentials::keychainKey(
|
||||||
|
_account->url().toString(),
|
||||||
|
_key,
|
||||||
|
_keychainMigration ? QString() : _account->id());
|
||||||
|
|
||||||
|
QKeychain::ReadPasswordJob *job = new QKeychain::ReadPasswordJob(_serviceName);
|
||||||
|
#if defined(KEYCHAINCHUNK_ENABLE_INSECURE_FALLBACK)
|
||||||
|
addSettingsToJob(_account, job);
|
||||||
|
#endif
|
||||||
|
job->setInsecureFallback(_insecureFallback);
|
||||||
|
job->setKey(kck);
|
||||||
|
connect(job, &QKeychain::Job::finished, this, &KeychainChunk::ReadJob::slotReadJobDone);
|
||||||
|
job->start();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ReadJob::slotReadJobDone(QKeychain::Job *incomingJob)
|
||||||
|
{
|
||||||
|
// Errors or next chunk?
|
||||||
|
QKeychain::ReadPasswordJob *readJob = static_cast<QKeychain::ReadPasswordJob *>(incomingJob);
|
||||||
|
|
||||||
|
if (readJob) {
|
||||||
|
if (readJob->error() == NoError && readJob->binaryData().length() > 0) {
|
||||||
|
_chunkBuffer.append(readJob->binaryData());
|
||||||
|
_chunkCount++;
|
||||||
|
|
||||||
|
#if defined(Q_OS_WIN)
|
||||||
|
// try to fetch next chunk
|
||||||
|
if (_chunkCount < KeychainChunk::MaxChunks) {
|
||||||
|
const QString kck = AbstractCredentials::keychainKey(
|
||||||
|
_account->url().toString(),
|
||||||
|
_key + QString(".") + QString::number(_chunkCount),
|
||||||
|
_keychainMigration ? QString() : _account->id());
|
||||||
|
|
||||||
|
QKeychain::ReadPasswordJob *job = new QKeychain::ReadPasswordJob(_serviceName);
|
||||||
|
#if defined(KEYCHAINCHUNK_ENABLE_INSECURE_FALLBACK)
|
||||||
|
addSettingsToJob(_account, job);
|
||||||
|
#endif
|
||||||
|
job->setInsecureFallback(_insecureFallback);
|
||||||
|
job->setKey(kck);
|
||||||
|
connect(job, &QKeychain::Job::finished, this, &KeychainChunk::ReadJob::slotReadJobDone);
|
||||||
|
job->start();
|
||||||
|
|
||||||
|
readJob->deleteLater();
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
qCWarning(lcKeychainChunk) << "Maximum chunk count for" << readJob->key() << "reached, ignoring after" << KeychainChunk::MaxChunks;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
} else {
|
||||||
|
if (readJob->error() != QKeychain::Error::EntryNotFound ||
|
||||||
|
((readJob->error() == QKeychain::Error::EntryNotFound) && _chunkCount == 0)) {
|
||||||
|
_error = readJob->error();
|
||||||
|
_errorString = readJob->errorString();
|
||||||
|
qCWarning(lcKeychainChunk) << "Unable to read" << readJob->key() << "chunk" << QString::number(_chunkCount) << readJob->errorString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
readJob->deleteLater();
|
||||||
|
}
|
||||||
|
|
||||||
|
emit finished(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace KeychainChunk
|
||||||
|
|
||||||
|
} // namespace OCC
|
||||||
120
src/gui/creds/keychainchunk.h
Normal file
@@ -0,0 +1,120 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) by Michael Schuster <michael@nextcloud.com>
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
#ifndef KEYCHAINCHUNK_H
|
||||||
|
#define KEYCHAINCHUNK_H
|
||||||
|
|
||||||
|
#include <QObject>
|
||||||
|
#include <keychain.h>
|
||||||
|
#include "accountfwd.h"
|
||||||
|
|
||||||
|
// We don't support insecure fallback
|
||||||
|
// #define KEYCHAINCHUNK_ENABLE_INSECURE_FALLBACK
|
||||||
|
|
||||||
|
namespace OCC {
|
||||||
|
|
||||||
|
namespace KeychainChunk {
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Workaround for Windows:
|
||||||
|
*
|
||||||
|
* Split the keychain entry's data into chunks of 2048 bytes,
|
||||||
|
* to allow 4k (4096 bit) keys / large certs to be saved (see limits in webflowcredentials.h)
|
||||||
|
*/
|
||||||
|
static constexpr int ChunkSize = 2048;
|
||||||
|
static constexpr int MaxChunks = 10;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @brief: Abstract base class for KeychainChunk jobs.
|
||||||
|
*/
|
||||||
|
class Job : public QObject {
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
Job(QObject *parent = nullptr);
|
||||||
|
|
||||||
|
const QKeychain::Error error() const {
|
||||||
|
return _error;
|
||||||
|
}
|
||||||
|
const QString errorString() const {
|
||||||
|
return _errorString;
|
||||||
|
}
|
||||||
|
|
||||||
|
QByteArray binaryData() const {
|
||||||
|
return _chunkBuffer;
|
||||||
|
}
|
||||||
|
|
||||||
|
const bool insecureFallback() const {
|
||||||
|
return _insecureFallback;
|
||||||
|
}
|
||||||
|
|
||||||
|
// If we use it but don't support insecure fallback, give us nice compilation errors ;p
|
||||||
|
#if defined(KEYCHAINCHUNK_ENABLE_INSECURE_FALLBACK)
|
||||||
|
void setInsecureFallback(const bool &insecureFallback)
|
||||||
|
{
|
||||||
|
_insecureFallback = insecureFallback;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
protected:
|
||||||
|
QString _serviceName;
|
||||||
|
Account *_account;
|
||||||
|
QString _key;
|
||||||
|
bool _insecureFallback = false;
|
||||||
|
bool _keychainMigration = false;
|
||||||
|
|
||||||
|
QKeychain::Error _error = QKeychain::NoError;
|
||||||
|
QString _errorString;
|
||||||
|
|
||||||
|
int _chunkCount = 0;
|
||||||
|
QByteArray _chunkBuffer;
|
||||||
|
}; // class Job
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @brief: Simple wrapper class for QKeychain::WritePasswordJob, splits too large keychain entry's data into chunks on Windows
|
||||||
|
*/
|
||||||
|
class WriteJob : public KeychainChunk::Job {
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
WriteJob(Account *account, const QString &key, const QByteArray &data, QObject *parent = nullptr);
|
||||||
|
void start();
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void finished(KeychainChunk::WriteJob *incomingJob);
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void slotWriteJobDone(QKeychain::Job *incomingJob);
|
||||||
|
}; // class WriteJob
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @brief: Simple wrapper class for QKeychain::ReadPasswordJob, splits too large keychain entry's data into chunks on Windows
|
||||||
|
*/
|
||||||
|
class ReadJob : public KeychainChunk::Job {
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
ReadJob(Account *account, const QString &key, const bool &keychainMigration, QObject *parent = nullptr);
|
||||||
|
void start();
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void finished(KeychainChunk::ReadJob *incomingJob);
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void slotReadJobDone(QKeychain::Job *incomingJob);
|
||||||
|
}; // class ReadJob
|
||||||
|
|
||||||
|
} // namespace KeychainChunk
|
||||||
|
|
||||||
|
} // namespace OCC
|
||||||
|
|
||||||
|
#endif // KEYCHAINCHUNK_H
|
||||||
@@ -90,7 +90,7 @@ ShibbolethWebView::ShibbolethWebView(AccountPtr account, QWidget *parent)
|
|||||||
QWebView *debugView = new QWebView(this);
|
QWebView *debugView = new QWebView(this);
|
||||||
debugView->setPage(debugPage);
|
debugView->setPage(debugPage);
|
||||||
QMainWindow *window = new QMainWindow(this);
|
QMainWindow *window = new QMainWindow(this);
|
||||||
window->setWindowTitle(tr("SSL Chipher Debug View"));
|
window->setWindowTitle(tr("SSL Cipher Debug View"));
|
||||||
window->setCentralWidget(debugView);
|
window->setCentralWidget(debugView);
|
||||||
window->show();
|
window->show();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,9 +14,11 @@
|
|||||||
|
|
||||||
#include "accessmanager.h"
|
#include "accessmanager.h"
|
||||||
#include "account.h"
|
#include "account.h"
|
||||||
|
#include "configfile.h"
|
||||||
#include "theme.h"
|
#include "theme.h"
|
||||||
#include "wizard/webview.h"
|
#include "wizard/webview.h"
|
||||||
#include "webflowcredentialsdialog.h"
|
#include "webflowcredentialsdialog.h"
|
||||||
|
#include "keychainchunk.h"
|
||||||
|
|
||||||
using namespace QKeychain;
|
using namespace QKeychain;
|
||||||
|
|
||||||
@@ -24,6 +26,13 @@ namespace OCC {
|
|||||||
|
|
||||||
Q_LOGGING_CATEGORY(lcWebFlowCredentials, "sync.credentials.webflow", QtInfoMsg)
|
Q_LOGGING_CATEGORY(lcWebFlowCredentials, "sync.credentials.webflow", QtInfoMsg)
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
const char userC[] = "user";
|
||||||
|
const char clientCertificatePEMC[] = "_clientCertificatePEM";
|
||||||
|
const char clientKeyPEMC[] = "_clientKeyPEM";
|
||||||
|
const char clientCaCertificatePEMC[] = "_clientCaCertificatePEM";
|
||||||
|
} // ns
|
||||||
|
|
||||||
class WebFlowCredentialsAccessManager : public AccessManager
|
class WebFlowCredentialsAccessManager : public AccessManager
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -37,13 +46,27 @@ protected:
|
|||||||
QNetworkReply *createRequest(Operation op, const QNetworkRequest &request, QIODevice *outgoingData) override
|
QNetworkReply *createRequest(Operation op, const QNetworkRequest &request, QIODevice *outgoingData) override
|
||||||
{
|
{
|
||||||
QNetworkRequest req(request);
|
QNetworkRequest req(request);
|
||||||
if (!req.attribute(HttpCredentials::DontAddCredentialsAttribute).toBool()) {
|
if (!req.attribute(WebFlowCredentials::DontAddCredentialsAttribute).toBool()) {
|
||||||
if (_cred && !_cred->password().isEmpty()) {
|
if (_cred && !_cred->password().isEmpty()) {
|
||||||
QByteArray credHash = QByteArray(_cred->user().toUtf8() + ":" + _cred->password().toUtf8()).toBase64();
|
QByteArray credHash = QByteArray(_cred->user().toUtf8() + ":" + _cred->password().toUtf8()).toBase64();
|
||||||
req.setRawHeader("Authorization", "Basic " + credHash);
|
req.setRawHeader("Authorization", "Basic " + credHash);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (_cred && !_cred->_clientSslKey.isNull() && !_cred->_clientSslCertificate.isNull()) {
|
||||||
|
// SSL configuration
|
||||||
|
QSslConfiguration sslConfiguration = req.sslConfiguration();
|
||||||
|
sslConfiguration.setLocalCertificate(_cred->_clientSslCertificate);
|
||||||
|
sslConfiguration.setPrivateKey(_cred->_clientSslKey);
|
||||||
|
|
||||||
|
// Merge client side CA with system CA
|
||||||
|
auto ca = sslConfiguration.systemCaCertificates();
|
||||||
|
ca.append(_cred->_clientSslCaCertificates);
|
||||||
|
sslConfiguration.setCaCertificates(ca);
|
||||||
|
|
||||||
|
req.setSslConfiguration(sslConfiguration);
|
||||||
|
}
|
||||||
|
|
||||||
return AccessManager::createRequest(op, req, outgoingData);
|
return AccessManager::createRequest(op, req, outgoingData);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -53,22 +76,35 @@ private:
|
|||||||
QPointer<const WebFlowCredentials> _cred;
|
QPointer<const WebFlowCredentials> _cred;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if defined(KEYCHAINCHUNK_ENABLE_INSECURE_FALLBACK)
|
||||||
|
static void addSettingsToJob(Account *account, QKeychain::Job *job)
|
||||||
|
{
|
||||||
|
Q_UNUSED(account)
|
||||||
|
auto settings = ConfigFile::settingsWithGroup(Theme::instance()->appName());
|
||||||
|
settings->setParent(job); // make the job parent to make setting deleted properly
|
||||||
|
job->setSettings(settings.release());
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
WebFlowCredentials::WebFlowCredentials()
|
WebFlowCredentials::WebFlowCredentials()
|
||||||
: _ready(false)
|
: _ready(false)
|
||||||
, _credentialsValid(false)
|
, _credentialsValid(false)
|
||||||
, _keychainMigration(false)
|
, _keychainMigration(false)
|
||||||
|
, _retryOnKeyChainError(false)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
WebFlowCredentials::WebFlowCredentials(const QString &user, const QString &password, const QSslCertificate &certificate, const QSslKey &key)
|
WebFlowCredentials::WebFlowCredentials(const QString &user, const QString &password, const QSslCertificate &certificate, const QSslKey &key, const QList<QSslCertificate> &caCertificates)
|
||||||
: _user(user)
|
: _user(user)
|
||||||
, _password(password)
|
, _password(password)
|
||||||
, _clientSslKey(key)
|
, _clientSslKey(key)
|
||||||
, _clientSslCertificate(certificate)
|
, _clientSslCertificate(certificate)
|
||||||
|
, _clientSslCaCertificates(caCertificates)
|
||||||
, _ready(true)
|
, _ready(true)
|
||||||
, _credentialsValid(true)
|
, _credentialsValid(true)
|
||||||
, _keychainMigration(false)
|
, _keychainMigration(false)
|
||||||
|
, _retryOnKeyChainError(false)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -102,38 +138,50 @@ bool WebFlowCredentials::ready() const {
|
|||||||
void WebFlowCredentials::fetchFromKeychain() {
|
void WebFlowCredentials::fetchFromKeychain() {
|
||||||
_wasFetched = true;
|
_wasFetched = true;
|
||||||
|
|
||||||
// Make sure we get the user fromt he config file
|
// Make sure we get the user from the config file
|
||||||
fetchUser();
|
fetchUser();
|
||||||
|
|
||||||
if (ready()) {
|
if (ready()) {
|
||||||
emit fetched();
|
emit fetched();
|
||||||
} else {
|
} else {
|
||||||
qCInfo(lcWebFlowCredentials()) << "Fetch from keyhchain!";
|
qCInfo(lcWebFlowCredentials()) << "Fetch from keychain!";
|
||||||
fetchFromKeychainHelper();
|
fetchFromKeychainHelper();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void WebFlowCredentials::askFromUser() {
|
void WebFlowCredentials::askFromUser() {
|
||||||
_askDialog = new WebFlowCredentialsDialog();
|
// Determine if the old flow has to be used (GS for now)
|
||||||
|
// Do a DetermineAuthTypeJob to make sure that the server is still using Flow2
|
||||||
|
DetermineAuthTypeJob *job = new DetermineAuthTypeJob(_account->sharedFromThis(), this);
|
||||||
|
connect(job, &DetermineAuthTypeJob::authType, [this](DetermineAuthTypeJob::AuthType type) {
|
||||||
|
// LoginFlowV2 > WebViewFlow > OAuth > Shib > Basic
|
||||||
|
bool useFlow2 = (type != DetermineAuthTypeJob::WebViewFlow);
|
||||||
|
|
||||||
QUrl url = _account->url();
|
_askDialog = new WebFlowCredentialsDialog(_account, useFlow2);
|
||||||
QString path = url.path() + "/index.php/login/flow";
|
|
||||||
url.setPath(path);
|
|
||||||
_askDialog->setUrl(url);
|
|
||||||
|
|
||||||
QString msg = tr("You have been logged out of %1 as user %2. Please login again")
|
if (!useFlow2) {
|
||||||
.arg(_account->displayName(), _user);
|
QUrl url = _account->url();
|
||||||
_askDialog->setInfo(msg);
|
QString path = url.path() + "/index.php/login/flow";
|
||||||
|
url.setPath(path);
|
||||||
|
_askDialog->setUrl(url);
|
||||||
|
}
|
||||||
|
|
||||||
_askDialog->show();
|
QString msg = tr("You have been logged out of %1 as user %2. Please login again")
|
||||||
|
.arg(_account->displayName(), _user);
|
||||||
|
_askDialog->setInfo(msg);
|
||||||
|
|
||||||
connect(_askDialog, &WebFlowCredentialsDialog::urlCatched, this, &WebFlowCredentials::slotAskFromUserCredentialsProvided);
|
_askDialog->show();
|
||||||
|
|
||||||
|
connect(_askDialog, &WebFlowCredentialsDialog::urlCatched, this, &WebFlowCredentials::slotAskFromUserCredentialsProvided);
|
||||||
|
connect(_askDialog, &WebFlowCredentialsDialog::onClose, this, &WebFlowCredentials::slotAskFromUserCancelled);
|
||||||
|
});
|
||||||
|
job->start();
|
||||||
|
|
||||||
qCDebug(lcWebFlowCredentials()) << "User needs to reauth!";
|
qCDebug(lcWebFlowCredentials()) << "User needs to reauth!";
|
||||||
}
|
}
|
||||||
|
|
||||||
void WebFlowCredentials::slotAskFromUserCredentialsProvided(const QString &user, const QString &pass, const QString &host) {
|
void WebFlowCredentials::slotAskFromUserCredentialsProvided(const QString &user, const QString &pass, const QString &host) {
|
||||||
Q_UNUSED(host);
|
Q_UNUSED(host)
|
||||||
|
|
||||||
if (_user != user) {
|
if (_user != user) {
|
||||||
qCInfo(lcWebFlowCredentials()) << "Authed with the wrong user!";
|
qCInfo(lcWebFlowCredentials()) << "Authed with the wrong user!";
|
||||||
@@ -142,10 +190,12 @@ void WebFlowCredentials::slotAskFromUserCredentialsProvided(const QString &user,
|
|||||||
.arg(_user);
|
.arg(_user);
|
||||||
_askDialog->setError(msg);
|
_askDialog->setError(msg);
|
||||||
|
|
||||||
QUrl url = _account->url();
|
if (!_askDialog->isUsingFlow2()) {
|
||||||
QString path = url.path() + "/index.php/login/flow";
|
QUrl url = _account->url();
|
||||||
url.setPath(path);
|
QString path = url.path() + "/index.php/login/flow";
|
||||||
_askDialog->setUrl(url);
|
url.setPath(path);
|
||||||
|
_askDialog->setUrl(url);
|
||||||
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -159,10 +209,18 @@ void WebFlowCredentials::slotAskFromUserCredentialsProvided(const QString &user,
|
|||||||
emit asked();
|
emit asked();
|
||||||
|
|
||||||
_askDialog->close();
|
_askDialog->close();
|
||||||
delete _askDialog;
|
_askDialog->deleteLater();
|
||||||
_askDialog = nullptr;
|
_askDialog = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void WebFlowCredentials::slotAskFromUserCancelled() {
|
||||||
|
qCDebug(lcWebFlowCredentials()) << "User cancelled reauth!";
|
||||||
|
|
||||||
|
emit asked();
|
||||||
|
|
||||||
|
_askDialog->deleteLater();
|
||||||
|
_askDialog = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
bool WebFlowCredentials::stillValid(QNetworkReply *reply) {
|
bool WebFlowCredentials::stillValid(QNetworkReply *reply) {
|
||||||
if (reply->error() != QNetworkReply::NoError) {
|
if (reply->error() != QNetworkReply::NoError) {
|
||||||
@@ -178,17 +236,130 @@ void WebFlowCredentials::persist() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
_account->setCredentialSetting("user", _user);
|
_account->setCredentialSetting(userC, _user);
|
||||||
_account->wantsAccountSaved(_account);
|
_account->wantsAccountSaved(_account);
|
||||||
|
|
||||||
//TODO: Add ssl cert and key storing
|
// write cert if there is one
|
||||||
|
if (!_clientSslCertificate.isNull()) {
|
||||||
|
auto *job = new KeychainChunk::WriteJob(_account,
|
||||||
|
_user + clientCertificatePEMC,
|
||||||
|
_clientSslCertificate.toPem());
|
||||||
|
connect(job, &KeychainChunk::WriteJob::finished, this, &WebFlowCredentials::slotWriteClientCertPEMJobDone);
|
||||||
|
job->start();
|
||||||
|
} else {
|
||||||
|
// no cert, just write credentials
|
||||||
|
slotWriteClientCertPEMJobDone(nullptr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void WebFlowCredentials::slotWriteClientCertPEMJobDone(KeychainChunk::WriteJob *writeJob)
|
||||||
|
{
|
||||||
|
if(writeJob)
|
||||||
|
writeJob->deleteLater();
|
||||||
|
|
||||||
|
// write ssl key if there is one
|
||||||
|
if (!_clientSslKey.isNull()) {
|
||||||
|
auto *job = new KeychainChunk::WriteJob(_account,
|
||||||
|
_user + clientKeyPEMC,
|
||||||
|
_clientSslKey.toPem());
|
||||||
|
connect(job, &KeychainChunk::WriteJob::finished, this, &WebFlowCredentials::slotWriteClientKeyPEMJobDone);
|
||||||
|
job->start();
|
||||||
|
} else {
|
||||||
|
// no key, just write credentials
|
||||||
|
slotWriteClientKeyPEMJobDone(nullptr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void WebFlowCredentials::writeSingleClientCaCertPEM()
|
||||||
|
{
|
||||||
|
// write a ca cert if there is any in the queue
|
||||||
|
if (!_clientSslCaCertificatesWriteQueue.isEmpty()) {
|
||||||
|
// grab and remove the first cert from the queue
|
||||||
|
auto cert = _clientSslCaCertificatesWriteQueue.dequeue();
|
||||||
|
|
||||||
|
auto index = (_clientSslCaCertificates.count() - _clientSslCaCertificatesWriteQueue.count()) - 1;
|
||||||
|
|
||||||
|
// keep the limit
|
||||||
|
if (index > (_clientSslCaCertificatesMaxCount - 1)) {
|
||||||
|
qCWarning(lcWebFlowCredentials) << "Maximum client CA cert count exceeded while writing slot" << QString::number(index) << "cutting off after" << QString::number(_clientSslCaCertificatesMaxCount) << "certs";
|
||||||
|
|
||||||
|
_clientSslCaCertificatesWriteQueue.clear();
|
||||||
|
|
||||||
|
slotWriteClientCaCertsPEMJobDone(nullptr);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
auto *job = new KeychainChunk::WriteJob(_account,
|
||||||
|
_user + clientCaCertificatePEMC + QString::number(index),
|
||||||
|
cert.toPem());
|
||||||
|
connect(job, &KeychainChunk::WriteJob::finished, this, &WebFlowCredentials::slotWriteClientCaCertsPEMJobDone);
|
||||||
|
job->start();
|
||||||
|
} else {
|
||||||
|
slotWriteClientCaCertsPEMJobDone(nullptr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void WebFlowCredentials::slotWriteClientKeyPEMJobDone(KeychainChunk::WriteJob *writeJob)
|
||||||
|
{
|
||||||
|
if(writeJob)
|
||||||
|
writeJob->deleteLater();
|
||||||
|
|
||||||
|
_clientSslCaCertificatesWriteQueue.clear();
|
||||||
|
|
||||||
|
// write ca certs if there are any
|
||||||
|
if (!_clientSslCaCertificates.isEmpty()) {
|
||||||
|
// queue the certs to avoid trouble on Windows (Workaround for CredWriteW used by QtKeychain)
|
||||||
|
_clientSslCaCertificatesWriteQueue.append(_clientSslCaCertificates);
|
||||||
|
|
||||||
|
// first ca cert
|
||||||
|
writeSingleClientCaCertPEM();
|
||||||
|
} else {
|
||||||
|
slotWriteClientCaCertsPEMJobDone(nullptr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void WebFlowCredentials::slotWriteClientCaCertsPEMJobDone(KeychainChunk::WriteJob *writeJob)
|
||||||
|
{
|
||||||
|
// errors / next ca cert?
|
||||||
|
if (writeJob && !_clientSslCaCertificates.isEmpty()) {
|
||||||
|
if (writeJob->error() != NoError) {
|
||||||
|
qCWarning(lcWebFlowCredentials) << "Error while writing client CA cert" << writeJob->errorString();
|
||||||
|
}
|
||||||
|
|
||||||
|
writeJob->deleteLater();
|
||||||
|
|
||||||
|
if (!_clientSslCaCertificatesWriteQueue.isEmpty()) {
|
||||||
|
// next ca cert
|
||||||
|
writeSingleClientCaCertPEM();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// done storing ca certs, time for the password
|
||||||
WritePasswordJob *job = new WritePasswordJob(Theme::instance()->appName());
|
WritePasswordJob *job = new WritePasswordJob(Theme::instance()->appName());
|
||||||
|
#if defined(KEYCHAINCHUNK_ENABLE_INSECURE_FALLBACK)
|
||||||
|
addSettingsToJob(_account, job);
|
||||||
|
#endif
|
||||||
job->setInsecureFallback(false);
|
job->setInsecureFallback(false);
|
||||||
|
connect(job, &Job::finished, this, &WebFlowCredentials::slotWriteJobDone);
|
||||||
job->setKey(keychainKey(_account->url().toString(), _user, _account->id()));
|
job->setKey(keychainKey(_account->url().toString(), _user, _account->id()));
|
||||||
job->setTextData(_password);
|
job->setTextData(_password);
|
||||||
job->start();
|
job->start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void WebFlowCredentials::slotWriteJobDone(QKeychain::Job *job)
|
||||||
|
{
|
||||||
|
delete job->settings();
|
||||||
|
switch (job->error()) {
|
||||||
|
case NoError:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
qCWarning(lcWebFlowCredentials) << "Error while writing password" << job->errorString();
|
||||||
|
}
|
||||||
|
WritePasswordJob *wjob = qobject_cast<WritePasswordJob *>(job);
|
||||||
|
wjob->deleteLater();
|
||||||
|
}
|
||||||
|
|
||||||
void WebFlowCredentials::invalidateToken() {
|
void WebFlowCredentials::invalidateToken() {
|
||||||
// clear the session cookie.
|
// clear the session cookie.
|
||||||
_account->clearCookieJar();
|
_account->clearCookieJar();
|
||||||
@@ -201,12 +372,14 @@ void WebFlowCredentials::invalidateToken() {
|
|||||||
QTimer::singleShot(0, _account, &Account::clearQNAMCache);
|
QTimer::singleShot(0, _account, &Account::clearQNAMCache);
|
||||||
}
|
}
|
||||||
|
|
||||||
void WebFlowCredentials::forgetSensitiveData(){
|
void WebFlowCredentials::forgetSensitiveData() {
|
||||||
_password = QString();
|
_password = QString();
|
||||||
_ready = false;
|
_ready = false;
|
||||||
|
|
||||||
fetchUser();
|
fetchUser();
|
||||||
|
|
||||||
|
_account->deleteAppPassword();
|
||||||
|
|
||||||
const QString kck = keychainKey(_account->url().toString(), _user, _account->id());
|
const QString kck = keychainKey(_account->url().toString(), _user, _account->id());
|
||||||
if (kck.isEmpty()) {
|
if (kck.isEmpty()) {
|
||||||
qCDebug(lcWebFlowCredentials()) << "InvalidateToken: User is empty, bailing out!";
|
qCDebug(lcWebFlowCredentials()) << "InvalidateToken: User is empty, bailing out!";
|
||||||
@@ -216,9 +389,15 @@ void WebFlowCredentials::forgetSensitiveData(){
|
|||||||
DeletePasswordJob *job = new DeletePasswordJob(Theme::instance()->appName());
|
DeletePasswordJob *job = new DeletePasswordJob(Theme::instance()->appName());
|
||||||
job->setInsecureFallback(false);
|
job->setInsecureFallback(false);
|
||||||
job->setKey(kck);
|
job->setKey(kck);
|
||||||
|
connect(job, &Job::finished, this, [](QKeychain::Job *job) {
|
||||||
|
DeletePasswordJob *djob = qobject_cast<DeletePasswordJob *>(job);
|
||||||
|
djob->deleteLater();
|
||||||
|
});
|
||||||
job->start();
|
job->start();
|
||||||
|
|
||||||
invalidateToken();
|
invalidateToken();
|
||||||
|
|
||||||
|
deleteKeychainEntries();
|
||||||
}
|
}
|
||||||
|
|
||||||
void WebFlowCredentials::setAccount(Account *account) {
|
void WebFlowCredentials::setAccount(Account *account) {
|
||||||
@@ -229,12 +408,12 @@ void WebFlowCredentials::setAccount(Account *account) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
QString WebFlowCredentials::fetchUser() {
|
QString WebFlowCredentials::fetchUser() {
|
||||||
_user = _account->credentialSetting("user").toString();
|
_user = _account->credentialSetting(userC).toString();
|
||||||
return _user;
|
return _user;
|
||||||
}
|
}
|
||||||
|
|
||||||
void WebFlowCredentials::slotAuthentication(QNetworkReply *reply, QAuthenticator *authenticator) {
|
void WebFlowCredentials::slotAuthentication(QNetworkReply *reply, QAuthenticator *authenticator) {
|
||||||
Q_UNUSED(reply);
|
Q_UNUSED(reply)
|
||||||
|
|
||||||
if (!_ready) {
|
if (!_ready) {
|
||||||
return;
|
return;
|
||||||
@@ -256,16 +435,136 @@ void WebFlowCredentials::slotFinished(QNetworkReply *reply) {
|
|||||||
|
|
||||||
if (reply->error() == QNetworkReply::NoError) {
|
if (reply->error() == QNetworkReply::NoError) {
|
||||||
_credentialsValid = true;
|
_credentialsValid = true;
|
||||||
|
|
||||||
|
/// Used later for remote wipe
|
||||||
|
_account->writeAppPasswordOnce(_password);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void WebFlowCredentials::fetchFromKeychainHelper() {
|
void WebFlowCredentials::fetchFromKeychainHelper() {
|
||||||
|
// Read client cert from keychain
|
||||||
|
auto *job = new KeychainChunk::ReadJob(_account,
|
||||||
|
_user + clientCertificatePEMC,
|
||||||
|
_keychainMigration);
|
||||||
|
connect(job, &KeychainChunk::ReadJob::finished, this, &WebFlowCredentials::slotReadClientCertPEMJobDone);
|
||||||
|
job->start();
|
||||||
|
}
|
||||||
|
|
||||||
|
void WebFlowCredentials::slotReadClientCertPEMJobDone(KeychainChunk::ReadJob *readJob)
|
||||||
|
{
|
||||||
|
#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
|
||||||
|
Q_ASSERT(!readJob->insecureFallback()); // If insecureFallback is set, the next test would be pointless
|
||||||
|
if (_retryOnKeyChainError && (readJob->error() == QKeychain::NoBackendAvailable
|
||||||
|
|| readJob->error() == QKeychain::OtherError)) {
|
||||||
|
// Could be that the backend was not yet available. Wait some extra seconds.
|
||||||
|
// (Issues #4274 and #6522)
|
||||||
|
// (For kwallet, the error is OtherError instead of NoBackendAvailable, maybe a bug in QtKeychain)
|
||||||
|
qCInfo(lcWebFlowCredentials) << "Backend unavailable (yet?) Retrying in a few seconds." << readJob->errorString();
|
||||||
|
QTimer::singleShot(10000, this, &WebFlowCredentials::fetchFromKeychainHelper);
|
||||||
|
_retryOnKeyChainError = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
_retryOnKeyChainError = false;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Store PEM in memory
|
||||||
|
if (readJob->error() == NoError && readJob->binaryData().length() > 0) {
|
||||||
|
QList<QSslCertificate> sslCertificateList = QSslCertificate::fromData(readJob->binaryData(), QSsl::Pem);
|
||||||
|
if (sslCertificateList.length() >= 1) {
|
||||||
|
_clientSslCertificate = sslCertificateList.at(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
readJob->deleteLater();
|
||||||
|
|
||||||
|
// Load key too
|
||||||
|
auto *job = new KeychainChunk::ReadJob(_account,
|
||||||
|
_user + clientKeyPEMC,
|
||||||
|
_keychainMigration);
|
||||||
|
connect(job, &KeychainChunk::ReadJob::finished, this, &WebFlowCredentials::slotReadClientKeyPEMJobDone);
|
||||||
|
job->start();
|
||||||
|
}
|
||||||
|
|
||||||
|
void WebFlowCredentials::slotReadClientKeyPEMJobDone(KeychainChunk::ReadJob *readJob)
|
||||||
|
{
|
||||||
|
// Store key in memory
|
||||||
|
if (readJob->error() == NoError && readJob->binaryData().length() > 0) {
|
||||||
|
QByteArray clientKeyPEM = readJob->binaryData();
|
||||||
|
// FIXME Unfortunately Qt has a bug and we can't just use QSsl::Opaque to let it
|
||||||
|
// load whatever we have. So we try until it works.
|
||||||
|
_clientSslKey = QSslKey(clientKeyPEM, QSsl::Rsa);
|
||||||
|
if (_clientSslKey.isNull()) {
|
||||||
|
_clientSslKey = QSslKey(clientKeyPEM, QSsl::Dsa);
|
||||||
|
}
|
||||||
|
if (_clientSslKey.isNull()) {
|
||||||
|
_clientSslKey = QSslKey(clientKeyPEM, QSsl::Ec);
|
||||||
|
}
|
||||||
|
if (_clientSslKey.isNull()) {
|
||||||
|
qCWarning(lcWebFlowCredentials) << "Could not load SSL key into Qt!";
|
||||||
|
}
|
||||||
|
clientKeyPEM.clear();
|
||||||
|
} else {
|
||||||
|
qCWarning(lcWebFlowCredentials) << "Unable to read client key" << readJob->errorString();
|
||||||
|
}
|
||||||
|
|
||||||
|
readJob->deleteLater();
|
||||||
|
|
||||||
|
// Start fetching client CA certs
|
||||||
|
_clientSslCaCertificates.clear();
|
||||||
|
|
||||||
|
readSingleClientCaCertPEM();
|
||||||
|
}
|
||||||
|
|
||||||
|
void WebFlowCredentials::readSingleClientCaCertPEM()
|
||||||
|
{
|
||||||
|
// try to fetch a client ca cert
|
||||||
|
if (_clientSslCaCertificates.count() < _clientSslCaCertificatesMaxCount) {
|
||||||
|
auto *job = new KeychainChunk::ReadJob(_account,
|
||||||
|
_user + clientCaCertificatePEMC + QString::number(_clientSslCaCertificates.count()),
|
||||||
|
_keychainMigration);
|
||||||
|
connect(job, &KeychainChunk::ReadJob::finished, this, &WebFlowCredentials::slotReadClientCaCertsPEMJobDone);
|
||||||
|
job->start();
|
||||||
|
} else {
|
||||||
|
qCWarning(lcWebFlowCredentials) << "Maximum client CA cert count exceeded while reading, ignoring after" << _clientSslCaCertificatesMaxCount;
|
||||||
|
|
||||||
|
slotReadClientCaCertsPEMJobDone(nullptr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void WebFlowCredentials::slotReadClientCaCertsPEMJobDone(KeychainChunk::ReadJob *readJob) {
|
||||||
|
// Store cert in memory
|
||||||
|
if (readJob) {
|
||||||
|
if (readJob->error() == NoError && readJob->binaryData().length() > 0) {
|
||||||
|
QList<QSslCertificate> sslCertificateList = QSslCertificate::fromData(readJob->binaryData(), QSsl::Pem);
|
||||||
|
if (sslCertificateList.length() >= 1) {
|
||||||
|
_clientSslCaCertificates.append(sslCertificateList.at(0));
|
||||||
|
}
|
||||||
|
|
||||||
|
readJob->deleteLater();
|
||||||
|
|
||||||
|
// try next cert
|
||||||
|
readSingleClientCaCertPEM();
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
if (readJob->error() != QKeychain::Error::EntryNotFound ||
|
||||||
|
((readJob->error() == QKeychain::Error::EntryNotFound) && _clientSslCaCertificates.count() == 0)) {
|
||||||
|
qCWarning(lcWebFlowCredentials) << "Unable to read client CA cert slot" << QString::number(_clientSslCaCertificates.count()) << readJob->errorString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
readJob->deleteLater();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Now fetch the actual server password
|
||||||
const QString kck = keychainKey(
|
const QString kck = keychainKey(
|
||||||
_account->url().toString(),
|
_account->url().toString(),
|
||||||
_user,
|
_user,
|
||||||
_keychainMigration ? QString() : _account->id());
|
_keychainMigration ? QString() : _account->id());
|
||||||
|
|
||||||
ReadPasswordJob *job = new ReadPasswordJob(Theme::instance()->appName());
|
ReadPasswordJob *job = new ReadPasswordJob(Theme::instance()->appName());
|
||||||
|
#if defined(KEYCHAINCHUNK_ENABLE_INSECURE_FALLBACK)
|
||||||
|
addSettingsToJob(_account, job);
|
||||||
|
#endif
|
||||||
job->setInsecureFallback(false);
|
job->setInsecureFallback(false);
|
||||||
job->setKey(kck);
|
job->setKey(kck);
|
||||||
connect(job, &Job::finished, this, &WebFlowCredentials::slotReadPasswordJobDone);
|
connect(job, &Job::finished, this, &WebFlowCredentials::slotReadPasswordJobDone);
|
||||||
@@ -273,7 +572,7 @@ void WebFlowCredentials::fetchFromKeychainHelper() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void WebFlowCredentials::slotReadPasswordJobDone(Job *incomingJob) {
|
void WebFlowCredentials::slotReadPasswordJobDone(Job *incomingJob) {
|
||||||
QKeychain::ReadPasswordJob *job = static_cast<ReadPasswordJob *>(incomingJob);
|
QKeychain::ReadPasswordJob *job = qobject_cast<ReadPasswordJob *>(incomingJob);
|
||||||
QKeychain::Error error = job->error();
|
QKeychain::Error error = job->error();
|
||||||
|
|
||||||
// If we could not find the entry try the old entries
|
// If we could not find the entry try the old entries
|
||||||
@@ -283,6 +582,10 @@ void WebFlowCredentials::slotReadPasswordJobDone(Job *incomingJob) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (_user.isEmpty()) {
|
||||||
|
qCWarning(lcWebFlowCredentials) << "Strange: User is empty!";
|
||||||
|
}
|
||||||
|
|
||||||
if (error == QKeychain::NoError) {
|
if (error == QKeychain::NoError) {
|
||||||
_password = job->textData();
|
_password = job->textData();
|
||||||
_ready = true;
|
_ready = true;
|
||||||
@@ -292,20 +595,72 @@ void WebFlowCredentials::slotReadPasswordJobDone(Job *incomingJob) {
|
|||||||
}
|
}
|
||||||
emit fetched();
|
emit fetched();
|
||||||
|
|
||||||
|
job->deleteLater();
|
||||||
|
|
||||||
// If keychain data was read from legacy location, wipe these entries and store new ones
|
// If keychain data was read from legacy location, wipe these entries and store new ones
|
||||||
if (_keychainMigration && _ready) {
|
if (_keychainMigration && _ready) {
|
||||||
_keychainMigration = false;
|
_keychainMigration = false;
|
||||||
persist();
|
persist();
|
||||||
deleteOldKeychainEntries();
|
deleteKeychainEntries(true); // true: delete old entries
|
||||||
qCInfo(lcWebFlowCredentials) << "Migrated old keychain entries";
|
qCInfo(lcWebFlowCredentials) << "Migrated old keychain entries";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void WebFlowCredentials::deleteOldKeychainEntries() {
|
void WebFlowCredentials::deleteKeychainEntries(bool oldKeychainEntries) {
|
||||||
DeletePasswordJob *job = new DeletePasswordJob(Theme::instance()->appName());
|
auto startDeleteJob = [this, oldKeychainEntries](QString key) {
|
||||||
job->setInsecureFallback(false);
|
DeletePasswordJob *job = new DeletePasswordJob(Theme::instance()->appName());
|
||||||
job->setKey(keychainKey(_account->url().toString(), _user, QString()));
|
#if defined(KEYCHAINCHUNK_ENABLE_INSECURE_FALLBACK)
|
||||||
job->start();
|
addSettingsToJob(_account, job);
|
||||||
|
#endif
|
||||||
|
job->setInsecureFallback(false);
|
||||||
|
job->setKey(keychainKey(_account->url().toString(),
|
||||||
|
key,
|
||||||
|
oldKeychainEntries ? QString() : _account->id()));
|
||||||
|
|
||||||
|
connect(job, &Job::finished, this, [](QKeychain::Job *job) {
|
||||||
|
DeletePasswordJob *djob = qobject_cast<DeletePasswordJob *>(job);
|
||||||
|
djob->deleteLater();
|
||||||
|
});
|
||||||
|
job->start();
|
||||||
|
};
|
||||||
|
|
||||||
|
startDeleteJob(_user);
|
||||||
|
|
||||||
|
/* IMPORTANT - remove later - FIXME MS@2019-12-07 -->
|
||||||
|
* TODO: For "Log out" & "Remove account": Remove client CA certs and KEY!
|
||||||
|
*
|
||||||
|
* Disabled as long as selecting another cert is not supported by the UI.
|
||||||
|
*
|
||||||
|
* Being able to specify a new certificate is important anyway: expiry etc.
|
||||||
|
*
|
||||||
|
* We introduce this dirty hack here, to allow deleting them upon Remote Wipe.
|
||||||
|
*/
|
||||||
|
if(_account->isRemoteWipeRequested_HACK()) {
|
||||||
|
// <-- FIXME MS@2019-12-07
|
||||||
|
startDeleteJob(_user + clientKeyPEMC);
|
||||||
|
startDeleteJob(_user + clientCertificatePEMC);
|
||||||
|
|
||||||
|
for (auto i = 0; i < _clientSslCaCertificates.count(); i++) {
|
||||||
|
startDeleteJob(_user + clientCaCertificatePEMC + QString::number(i));
|
||||||
|
}
|
||||||
|
|
||||||
|
#if defined(Q_OS_WIN)
|
||||||
|
// Also delete key / cert sub-chunks (Windows workaround)
|
||||||
|
// The first chunk (0) has no suffix, to stay compatible with older versions and non-Windows
|
||||||
|
for (auto chunk = 1; chunk < KeychainChunk::MaxChunks; chunk++) {
|
||||||
|
const QString strChunkSuffix = QString(".") + QString::number(chunk);
|
||||||
|
|
||||||
|
startDeleteJob(_user + clientKeyPEMC + strChunkSuffix);
|
||||||
|
startDeleteJob(_user + clientCertificatePEMC + strChunkSuffix);
|
||||||
|
|
||||||
|
for (auto i = 0; i < _clientSslCaCertificates.count(); i++) {
|
||||||
|
startDeleteJob(_user + clientCaCertificatePEMC + QString::number(i));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
// FIXME MS@2019-12-07 -->
|
||||||
|
}
|
||||||
|
// <-- FIXME MS@2019-12-07
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
} // namespace OCC
|
||||||
|
|||||||
@@ -3,6 +3,8 @@
|
|||||||
|
|
||||||
#include <QSslCertificate>
|
#include <QSslCertificate>
|
||||||
#include <QSslKey>
|
#include <QSslKey>
|
||||||
|
#include <QNetworkRequest>
|
||||||
|
#include <QQueue>
|
||||||
|
|
||||||
#include "creds/abstractcredentials.h"
|
#include "creds/abstractcredentials.h"
|
||||||
|
|
||||||
@@ -17,14 +19,29 @@ namespace QKeychain {
|
|||||||
|
|
||||||
namespace OCC {
|
namespace OCC {
|
||||||
|
|
||||||
|
namespace KeychainChunk {
|
||||||
|
class ReadJob;
|
||||||
|
class WriteJob;
|
||||||
|
}
|
||||||
|
|
||||||
class WebFlowCredentialsDialog;
|
class WebFlowCredentialsDialog;
|
||||||
|
|
||||||
class WebFlowCredentials : public AbstractCredentials
|
class WebFlowCredentials : public AbstractCredentials
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
friend class WebFlowCredentialsAccessManager;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/// Don't add credentials if this is set on a QNetworkRequest
|
||||||
|
static constexpr QNetworkRequest::Attribute DontAddCredentialsAttribute = QNetworkRequest::User;
|
||||||
|
|
||||||
explicit WebFlowCredentials();
|
explicit WebFlowCredentials();
|
||||||
WebFlowCredentials(const QString &user, const QString &password, const QSslCertificate &certificate = QSslCertificate(), const QSslKey &key = QSslKey());
|
WebFlowCredentials(
|
||||||
|
const QString &user,
|
||||||
|
const QString &password,
|
||||||
|
const QSslCertificate &certificate = QSslCertificate(),
|
||||||
|
const QSslKey &key = QSslKey(),
|
||||||
|
const QList<QSslCertificate> &caCertificates = QList<QSslCertificate>());
|
||||||
|
|
||||||
QString authType() const override;
|
QString authType() const override;
|
||||||
QString user() const override;
|
QString user() const override;
|
||||||
@@ -48,12 +65,51 @@ private slots:
|
|||||||
void slotAuthentication(QNetworkReply *reply, QAuthenticator *authenticator);
|
void slotAuthentication(QNetworkReply *reply, QAuthenticator *authenticator);
|
||||||
void slotFinished(QNetworkReply *reply);
|
void slotFinished(QNetworkReply *reply);
|
||||||
|
|
||||||
void slotReadPasswordJobDone(QKeychain::Job *incomingJob);
|
|
||||||
void slotAskFromUserCredentialsProvided(const QString &user, const QString &pass, const QString &host);
|
void slotAskFromUserCredentialsProvided(const QString &user, const QString &pass, const QString &host);
|
||||||
|
void slotAskFromUserCancelled();
|
||||||
|
|
||||||
|
void slotReadClientCertPEMJobDone(KeychainChunk::ReadJob *readJob);
|
||||||
|
void slotReadClientKeyPEMJobDone(KeychainChunk::ReadJob *readJob);
|
||||||
|
void slotReadClientCaCertsPEMJobDone(KeychainChunk::ReadJob *readJob);
|
||||||
|
void slotReadPasswordJobDone(QKeychain::Job *incomingJob);
|
||||||
|
|
||||||
|
void slotWriteClientCertPEMJobDone(KeychainChunk::WriteJob *writeJob);
|
||||||
|
void slotWriteClientKeyPEMJobDone(KeychainChunk::WriteJob *writeJob);
|
||||||
|
void slotWriteClientCaCertsPEMJobDone(KeychainChunk::WriteJob *writeJob);
|
||||||
|
void slotWriteJobDone(QKeychain::Job *);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
/*
|
||||||
|
* Windows: Workaround for CredWriteW used by QtKeychain
|
||||||
|
*
|
||||||
|
* Saving all client CA's within one credential may result in:
|
||||||
|
* Error: "Credential size exceeds maximum size of 2560"
|
||||||
|
*/
|
||||||
|
void readSingleClientCaCertPEM();
|
||||||
|
void writeSingleClientCaCertPEM();
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Since we're limited by Windows limits, we just create our own
|
||||||
|
* limit to avoid evil things happening by endless recursion
|
||||||
|
*
|
||||||
|
* Better than storing the count and relying on maybe-hacked values
|
||||||
|
*/
|
||||||
|
static constexpr int _clientSslCaCertificatesMaxCount = 10;
|
||||||
|
QQueue<QSslCertificate> _clientSslCaCertificatesWriteQueue;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
/** Reads data from keychain locations
|
||||||
|
*
|
||||||
|
* Goes through
|
||||||
|
* slotReadClientCertPEMJobDone to
|
||||||
|
* slotReadClientKeyPEMJobDone to
|
||||||
|
* slotReadClientCaCertsPEMJobDone to
|
||||||
|
* slotReadJobDone
|
||||||
|
*/
|
||||||
void fetchFromKeychainHelper();
|
void fetchFromKeychainHelper();
|
||||||
void deleteOldKeychainEntries();
|
|
||||||
|
/// Wipes legacy keychain locations
|
||||||
|
void deleteKeychainEntries(bool oldKeychainEntries = false);
|
||||||
|
|
||||||
QString fetchUser();
|
QString fetchUser();
|
||||||
|
|
||||||
@@ -61,14 +117,16 @@ private:
|
|||||||
QString _password;
|
QString _password;
|
||||||
QSslKey _clientSslKey;
|
QSslKey _clientSslKey;
|
||||||
QSslCertificate _clientSslCertificate;
|
QSslCertificate _clientSslCertificate;
|
||||||
|
QList<QSslCertificate> _clientSslCaCertificates;
|
||||||
|
|
||||||
bool _ready;
|
bool _ready;
|
||||||
bool _credentialsValid;
|
bool _credentialsValid;
|
||||||
bool _keychainMigration;
|
bool _keychainMigration;
|
||||||
|
bool _retryOnKeyChainError = true; // true if we haven't done yet any reading from keychain
|
||||||
|
|
||||||
WebFlowCredentialsDialog *_askDialog;
|
WebFlowCredentialsDialog *_askDialog;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
} // namespace OCC
|
||||||
|
|
||||||
#endif // WEBFLOWCREDENTIALS_H
|
#endif // WEBFLOWCREDENTIALS_H
|
||||||
|
|||||||