mirror of
https://github.com/chylex/Nextcloud-Desktop.git
synced 2026-04-03 18:11:32 +02:00
Compare commits
307 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
adada8b2ee | ||
|
|
8a38e820a6 | ||
|
|
475267aff4 | ||
|
|
cba879e2af | ||
|
|
05e071bafe | ||
|
|
7e4846eeda | ||
|
|
bc2244679c | ||
|
|
6320c60d77 | ||
|
|
abc3d6a271 | ||
|
|
8cc7fa20d3 | ||
|
|
016d21dead | ||
|
|
68aa9853c9 | ||
|
|
5db65ad6b8 | ||
|
|
6e2e1b3650 | ||
|
|
331778c73b | ||
|
|
2a6a7fb9d3 | ||
|
|
3766f70e43 | ||
|
|
6f33740601 | ||
|
|
03e5fa3d49 | ||
|
|
b36c9e6960 | ||
|
|
7f41805bc4 | ||
|
|
7c0cf20901 | ||
|
|
babc4aaf3d | ||
|
|
91db96267f | ||
|
|
a59e5689cb | ||
|
|
0dde3172e6 | ||
|
|
7212bdc02f | ||
|
|
4584b78b71 | ||
|
|
7033f16014 | ||
|
|
d08485331f | ||
|
|
d4cbbebd37 | ||
|
|
727c1e9e6c | ||
|
|
7a7675379d | ||
|
|
2bf9742504 | ||
|
|
5f1158a8a2 | ||
|
|
43e502778f | ||
|
|
f73a90ce26 | ||
|
|
64b0cab524 | ||
|
|
376522bc34 | ||
|
|
f2006d50ce | ||
|
|
0d6edf1240 | ||
|
|
94d92c73c2 | ||
|
|
ea4ae81c08 | ||
|
|
c6a360238f | ||
|
|
445d4d6892 | ||
|
|
0bc4346f30 | ||
|
|
a505071589 | ||
|
|
cd9de7c340 | ||
|
|
5a6b877695 | ||
|
|
6202df1cd0 | ||
|
|
ae33f10226 | ||
|
|
0181debae0 | ||
|
|
bd17cb0b86 | ||
|
|
be62480d0f | ||
|
|
5234dea356 | ||
|
|
27a453ae1a | ||
|
|
eb55308949 | ||
|
|
9d829b2933 | ||
|
|
456e338363 | ||
|
|
24446977c8 | ||
|
|
3a9e12f8c5 | ||
|
|
bdede5cfc4 | ||
|
|
e39a9ba7ae | ||
|
|
23c3885854 | ||
|
|
a186ac6a29 | ||
|
|
7c7627995e | ||
|
|
f62c0f0c0d | ||
|
|
9a55396cb6 | ||
|
|
24a989532d | ||
|
|
c3a4bccb30 | ||
|
|
0da8951a4a | ||
|
|
ad524e8a61 | ||
|
|
cd9a055053 | ||
|
|
513176ae40 | ||
|
|
74dda92f88 | ||
|
|
e6236d4ef5 | ||
|
|
ac414c4374 | ||
|
|
b4e681d128 | ||
|
|
4572f96745 | ||
|
|
d5b737ab4b | ||
|
|
e06990427b | ||
|
|
4fec80d4de | ||
|
|
6cba316ab5 | ||
|
|
b642574751 | ||
|
|
8f909a0de4 | ||
|
|
43f2826622 | ||
|
|
7b8b9742f4 | ||
|
|
531af5bb31 | ||
|
|
9357fb981e | ||
|
|
115bef589b | ||
|
|
69b9c4715e | ||
|
|
0ff93727b2 | ||
|
|
3b28d9471a | ||
|
|
688512cc8c | ||
|
|
c2bb7446aa | ||
|
|
dd03eddb38 | ||
|
|
3ec89ccc5d | ||
|
|
19f2a43ef4 | ||
|
|
0a791acd10 | ||
|
|
1976471543 | ||
|
|
4419e7fe2a | ||
|
|
92e77a186a | ||
|
|
2eb7ba2eb4 | ||
|
|
cdd1e7b69f | ||
|
|
b972fd9e19 | ||
|
|
fb6f998a7a | ||
|
|
f2a8106a57 | ||
|
|
fb428847af | ||
|
|
2f20530bf1 | ||
|
|
4f988e09ca | ||
|
|
1e12b9dca8 | ||
|
|
ce9fa18976 | ||
|
|
8cd63918a7 | ||
|
|
a87e90a56f | ||
|
|
67276be84f | ||
|
|
d3a71c1f60 | ||
|
|
f48ebfd0ab | ||
|
|
2670fcc0f9 | ||
|
|
822fcad0c2 | ||
|
|
9d0b0cb3b6 | ||
|
|
2173abd23f | ||
|
|
fb01fda0fb | ||
|
|
8a938c4af3 | ||
|
|
992ba0321f | ||
|
|
fb33e8f84b | ||
|
|
ef6f00798f | ||
|
|
eb122ffbec | ||
|
|
815170728e | ||
|
|
d9d14fd091 | ||
|
|
23902944da | ||
|
|
6f57016120 | ||
|
|
cd69585d4a | ||
|
|
0fb0fc2d7e | ||
|
|
40121dd03d | ||
|
|
da9e2250d7 | ||
|
|
6aa087a892 | ||
|
|
a6a9df9720 | ||
|
|
aa71623946 | ||
|
|
03c63721a4 | ||
|
|
f77b706eb1 | ||
|
|
01d47ea60a | ||
|
|
9cb8c52568 | ||
|
|
69ae63ea50 | ||
|
|
acec8a9721 | ||
|
|
6bca361351 | ||
|
|
1130d3941a | ||
|
|
a7ad510e93 | ||
|
|
800624de66 | ||
|
|
9c80cc2603 | ||
|
|
3920f264c4 | ||
|
|
b70243c6ba | ||
|
|
a370d9d9c4 | ||
|
|
0bfe78b8eb | ||
|
|
40b0751db9 | ||
|
|
04404d874f | ||
|
|
e18e38e8b7 | ||
|
|
11c246e052 | ||
|
|
c6764ee7b9 | ||
|
|
90e3a580c4 | ||
|
|
9e72888aa3 | ||
|
|
1c66b08c2b | ||
|
|
f411e6e190 | ||
|
|
71205d6b19 | ||
|
|
23ef3329f8 | ||
|
|
a33465c312 | ||
|
|
8d518f0722 | ||
|
|
c40961dc38 | ||
|
|
8a23380fe1 | ||
|
|
f366fe75b0 | ||
|
|
a7653588ae | ||
|
|
e4694df69b | ||
|
|
1420c080a5 | ||
|
|
051f4c2652 | ||
|
|
e159ba5ab8 | ||
|
|
ff01533581 | ||
|
|
78e3ff0288 | ||
|
|
53a7a10abf | ||
|
|
3a09c9658b | ||
|
|
e117d6d0d3 | ||
|
|
0b7eb9d031 | ||
|
|
1c45d8b0e7 | ||
|
|
9eada70bc8 | ||
|
|
5de080a52f | ||
|
|
3630a5e45b | ||
|
|
f286546435 | ||
|
|
2172586e5b | ||
|
|
9ae02a605c | ||
|
|
5bfd5d2260 | ||
|
|
069fd53cf6 | ||
|
|
04e53c39a1 | ||
|
|
3bc6d468e9 | ||
|
|
b09516f0e9 | ||
|
|
8ff738fd43 | ||
|
|
f382309bdb | ||
|
|
50f2ec2e62 | ||
|
|
07cfbd7670 | ||
|
|
93515deb81 | ||
|
|
112a8ccdf1 | ||
|
|
acc59e466c | ||
|
|
0a501e0469 | ||
|
|
ed6aa3d9b2 | ||
|
|
b4a0d6a97d | ||
|
|
1fd4c01062 | ||
|
|
fb9f0aa84d | ||
|
|
fa85fea347 | ||
|
|
e531bb01ff | ||
|
|
fa4711aeb1 | ||
|
|
a5223c692e | ||
|
|
f9fe5dee1e | ||
|
|
be0944ee7c | ||
|
|
eb9f8460e5 | ||
|
|
8b6e4e5569 | ||
|
|
a6b3a9d024 | ||
|
|
232d4ef0d0 | ||
|
|
f8803e57c6 | ||
|
|
b6487eb4ca | ||
|
|
5e92562a79 | ||
|
|
bf1643d2e7 | ||
|
|
265c6dc73b | ||
|
|
33b3df1596 | ||
|
|
7572ad63e5 | ||
|
|
03b6de183f | ||
|
|
b13a74f03c | ||
|
|
7159ec8472 | ||
|
|
e51deb72f2 | ||
|
|
29ef166f29 | ||
|
|
89660121c1 | ||
|
|
213adb77a0 | ||
|
|
ffafe746e5 | ||
|
|
bb2663ddd6 | ||
|
|
dc84e91c4f | ||
|
|
6bffac198e | ||
|
|
e47250137a | ||
|
|
35b7ffbf12 | ||
|
|
6a05605f59 | ||
|
|
20ab3ccae6 | ||
|
|
b18b8f67a9 | ||
|
|
00659b163b | ||
|
|
2ec68c7c1d | ||
|
|
714f4b199d | ||
|
|
e892c180f6 | ||
|
|
f08a278525 | ||
|
|
9079d40063 | ||
|
|
0ebc47f323 | ||
|
|
af9b44d338 | ||
|
|
197e1b668b | ||
|
|
058bfb2db0 | ||
|
|
45d30623e1 | ||
|
|
a6ff038f7f | ||
|
|
a21ae444e3 | ||
|
|
ab46b647f8 | ||
|
|
1d00bac251 | ||
|
|
63d9f87e18 | ||
|
|
6fd832bf1d | ||
|
|
e0b37fcd58 | ||
|
|
1736de6a9f | ||
|
|
f2414e0ebb | ||
|
|
f2a99f713f | ||
|
|
8c02403aec | ||
|
|
740757f384 | ||
|
|
16c68e19ce | ||
|
|
026f0abb7f | ||
|
|
9058602373 | ||
|
|
a083e0513b | ||
|
|
8a46b96b5d | ||
|
|
dadab48b2b | ||
|
|
16d641d04a | ||
|
|
ea3aa54ae5 | ||
|
|
cf79b91503 | ||
|
|
677e6e24ac | ||
|
|
b45f5fd1a9 | ||
|
|
a4317ca50d | ||
|
|
6c6eeab479 | ||
|
|
7fdbc72991 | ||
|
|
2187c6f4fc | ||
|
|
f3b825f333 | ||
|
|
676d4e1308 | ||
|
|
e03309a05e | ||
|
|
de15f20006 | ||
|
|
7ed1062314 | ||
|
|
80138b1cbf | ||
|
|
93547ced6d | ||
|
|
0aefa58644 | ||
|
|
992bcf56f5 | ||
|
|
35de69f7bc | ||
|
|
1c44909254 | ||
|
|
c3ccb72f2b | ||
|
|
890bd09ce9 | ||
|
|
b5309c47fc | ||
|
|
d24a09e47f | ||
|
|
bdae4a9be7 | ||
|
|
d9ce9814da | ||
|
|
f6d019af21 | ||
|
|
423ee61817 | ||
|
|
4871776a4b | ||
|
|
f4e83891e1 | ||
|
|
d589b524e0 | ||
|
|
de0158e2bb | ||
|
|
62856f9001 | ||
|
|
1313bc573f | ||
|
|
c2838fb8a8 | ||
|
|
ba71bf13f4 | ||
|
|
7e36c7ba59 | ||
|
|
e9641a3b94 | ||
|
|
7ff1911492 | ||
|
|
57f8b866a5 | ||
|
|
883df2f4fa |
16
.drone.yml
16
.drone.yml
@@ -22,7 +22,7 @@ steps:
|
||||
source /opt/qt57/bin/qt57-env.sh &&
|
||||
mkdir build &&
|
||||
cd build &&
|
||||
cmake -D NO_SHIBBOLETH=1 -DCMAKE_BUILD_TYPE=Debug -DUNIT_TESTING=1 ../ &&
|
||||
cmake -D NO_SHIBBOLETH=1 -DBUILD_UPDATER=ON -DCMAKE_BUILD_TYPE=Debug -DUNIT_TESTING=1 -DSANITIZE_ADDRESS=ON ../ &&
|
||||
make &&
|
||||
useradd -m -s /bin/bash test &&
|
||||
chown -R test:test . &&
|
||||
@@ -59,7 +59,7 @@ steps:
|
||||
source /opt/qt58/bin/qt58-env.sh &&
|
||||
mkdir build &&
|
||||
cd build &&
|
||||
cmake -D NO_SHIBBOLETH=1 -DCMAKE_BUILD_TYPE=Debug -DUNIT_TESTING=1 ../ &&
|
||||
cmake -D NO_SHIBBOLETH=1 -DBUILD_UPDATER=ON -DCMAKE_BUILD_TYPE=Debug -DUNIT_TESTING=1 -DSANITIZE_ADDRESS=ON ../ &&
|
||||
make &&
|
||||
useradd -m -s /bin/bash test &&
|
||||
chown -R test:test . &&
|
||||
@@ -96,7 +96,7 @@ steps:
|
||||
source /opt/qt59/bin/qt59-env.sh &&
|
||||
mkdir build &&
|
||||
cd build &&
|
||||
cmake -D NO_SHIBBOLETH=1 -DCMAKE_BUILD_TYPE=Debug -DUNIT_TESTING=1 ../ &&
|
||||
cmake -D NO_SHIBBOLETH=1 -DBUILD_UPDATER=ON -DCMAKE_BUILD_TYPE=Debug -DUNIT_TESTING=1 -DSANITIZE_ADDRESS=ON ../ &&
|
||||
make &&
|
||||
useradd -m -s /bin/bash test &&
|
||||
chown -R test:test . &&
|
||||
@@ -137,7 +137,7 @@ steps:
|
||||
source /opt/qt510/bin/qt510-env.sh &&
|
||||
mkdir build &&
|
||||
cd build &&
|
||||
cmake -D NO_SHIBBOLETH=1 -DCMAKE_BUILD_TYPE=Debug -DUNIT_TESTING=1 ../ &&
|
||||
cmake -D NO_SHIBBOLETH=1 -DBUILD_UPDATER=ON -DCMAKE_BUILD_TYPE=Debug -DUNIT_TESTING=1 -DSANITIZE_ADDRESS=ON ../ &&
|
||||
make &&
|
||||
useradd -m -s /bin/bash test &&
|
||||
chown -R test:test . &&
|
||||
@@ -178,7 +178,7 @@ steps:
|
||||
source /opt/qt511/bin/qt511-env.sh &&
|
||||
mkdir build &&
|
||||
cd build &&
|
||||
cmake -D NO_SHIBBOLETH=1 -DCMAKE_BUILD_TYPE=Debug -DUNIT_TESTING=1 ../ &&
|
||||
cmake -D NO_SHIBBOLETH=1 -DBUILD_UPDATER=ON -DCMAKE_BUILD_TYPE=Debug -DUNIT_TESTING=1 -DSANITIZE_ADDRESS=ON ../ &&
|
||||
make &&
|
||||
useradd -m -s /bin/bash test &&
|
||||
chown -R test:test . &&
|
||||
@@ -219,7 +219,7 @@ steps:
|
||||
source /opt/qt511/bin/qt511-env.sh &&
|
||||
mkdir build &&
|
||||
cd build &&
|
||||
cmake -D NO_SHIBBOLETH=1 -DCMAKE_BUILD_TYPE=Debug -DUNIT_TESTING=1 ../ &&
|
||||
cmake -D NO_SHIBBOLETH=1 -DBUILD_UPDATER=ON -DCMAKE_BUILD_TYPE=Debug -DUNIT_TESTING=1 -DSANITIZE_ADDRESS=ON ../ &&
|
||||
make &&
|
||||
useradd -m -s /bin/bash test &&
|
||||
chown -R test:test . &&
|
||||
@@ -268,7 +268,7 @@ steps:
|
||||
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 ../ &&
|
||||
cmake -D NO_SHIBBOLETH=1 -DBUILD_UPDATER=ON -DCMAKE_BUILD_TYPE=Debug -DUNIT_TESTING=1 -DSANITIZE_ADDRESS=ON ../ &&
|
||||
make &&
|
||||
useradd -m -s /bin/bash test &&
|
||||
chown -R test:test . &&
|
||||
@@ -317,7 +317,7 @@ steps:
|
||||
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 ../ &&
|
||||
cmake -D NO_SHIBBOLETH=1 -DBUILD_UPDATER=ON -DCMAKE_BUILD_TYPE=Debug -DUNIT_TESTING=1 -DSANITIZE_ADDRESS=ON ../ &&
|
||||
make &&
|
||||
useradd -m -s /bin/bash test &&
|
||||
chown -R test:test . &&
|
||||
|
||||
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -1,6 +1,3 @@
|
||||
[submodule "binary"]
|
||||
path = binary
|
||||
url = git://github.com/owncloud/owncloud-client-binary.git
|
||||
[submodule "src/3rdparty/libcrashreporter-qt"]
|
||||
path = src/3rdparty/libcrashreporter-qt
|
||||
url = git://github.com/dschmidt/libcrashreporter-qt.git
|
||||
|
||||
@@ -199,6 +199,6 @@ X-GNOME-Autostart-Delay=3
|
||||
|
||||
# Translations
|
||||
Icon[bg_BG]=@APPLICATION_ICON_NAME@
|
||||
Name[bg_BG]=@APPLICATION_NAME@ клиент за синхронизиране на десктоп
|
||||
Comment[bg_BG]=@APPLICATION_NAME@ клиент за синхронизиране на десктоп
|
||||
Name[bg_BG]=@APPLICATION_NAME@ десктоп клиент за синхронизиране
|
||||
Comment[bg_BG]=@APPLICATION_NAME@ десктоп клиент за синхронизиране
|
||||
GenericName[bg_BG]=Синхронизиране на папка
|
||||
|
||||
204
.tx/nextcloud.client-desktop/br_translation
Normal file
204
.tx/nextcloud.client-desktop/br_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[br]=@APPLICATION_ICON_NAME@
|
||||
Name[br]=@APPLICATION_NAME@ burev kempreet an implijer
|
||||
Comment[br]=@APPLICATION_NAME@ burev kempreet an implijer
|
||||
GenericName[br]=Tuliad kemprenan
|
||||
@@ -199,6 +199,6 @@ X-GNOME-Autostart-Delay=3
|
||||
|
||||
# Translations
|
||||
Icon[ca]=@APPLICATION_ICON_NAME@
|
||||
Name[ca]=@APPLICATION_NAME@ client de sincronització d'escriptori
|
||||
Comment[ca]=@APPLICATION_NAME@ client de sincronització d'escriptori
|
||||
Name[ca]=Client de sincronització d'escriptori del @APPLICATION_NAME@
|
||||
Comment[ca]=Client de sincronització d'escriptori del @APPLICATION_NAME@
|
||||
GenericName[ca]=Directori de sincronització
|
||||
|
||||
@@ -199,6 +199,6 @@ X-GNOME-Autostart-Delay=3
|
||||
|
||||
# Translations
|
||||
Icon[de]=@APPLICATION_ICON_NAME@
|
||||
Name[de]=@APPLICATION_NAME@ Client zur Desktop-Synchronisation
|
||||
Comment[de]=@APPLICATION_NAME@ Client zur Desktop-Synchronisation
|
||||
GenericName[de]=Synchronisationsordner
|
||||
Name[de]=@APPLICATION_NAME@ Client zur Desktop-Synchronisierung
|
||||
Comment[de]=@APPLICATION_NAME@ Client zur Desktop-Synchronisierung
|
||||
GenericName[de]=Synchronisierungsordner
|
||||
|
||||
204
.tx/nextcloud.client-desktop/et_translation
Normal file
204
.tx/nextcloud.client-desktop/et_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[et_EE]=@APPLICATION_ICON_NAME@
|
||||
Name[et_EE]=@APPLICATION_NAME@ töölaua sünkimise klient
|
||||
Comment[et_EE]=@APPLICATION_NAME@ töölaua sünkroniseerimise klient
|
||||
GenericName[et_EE]=Kausta Sünkroonimine
|
||||
204
.tx/nextcloud.client-desktop/fi_translation
Normal file
204
.tx/nextcloud.client-desktop/fi_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[fi_FI]=@APPLICATION_ICON_NAME@
|
||||
Name[fi_FI]=@APPLICATION_NAME@ työpöydän synkronointipääte
|
||||
Comment[fi_FI]=@APPLICATION_NAME@ työpöydän synkronointipääte
|
||||
GenericName[fi_FI]=Kansio synkronointi
|
||||
204
.tx/nextcloud.client-desktop/oc_translation
Normal file
204
.tx/nextcloud.client-desktop/oc_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[oc]=@APPLICATION_ICON_NAME@
|
||||
Name[oc]=@APPLICATION_NAME@ client de sincronizacion
|
||||
Comment[oc]=@APPLICATION_NAME@ client de sincronizacion
|
||||
GenericName[oc]=Sincro. dossièr
|
||||
@@ -201,4 +201,4 @@ X-GNOME-Autostart-Delay=3
|
||||
Icon[uk]=@APPLICATION_ICON_NAME@
|
||||
Name[uk]=@APPLICATION_NAME@ клієнт для ПК
|
||||
Comment[uk]=Клієнт синхронізації @APPLICATION_NAME@ для ПК
|
||||
GenericName[uk]=Синхронізація каталогів
|
||||
GenericName[uk]=Синхронізація тек
|
||||
|
||||
@@ -198,6 +198,7 @@ X-GNOME-Autostart-Delay=3
|
||||
|
||||
|
||||
# Translations
|
||||
Icon[zh_TW]=@APPLICATION_ICON_NAME@
|
||||
Name[zh_TW]=@APPLICATION_NAME@ 桌面同步客戶端
|
||||
Comment[zh_TW]=@APPLICATION_NAME@ 桌面同步客戶端
|
||||
GenericName[zh_TW]=資料夾同步
|
||||
|
||||
@@ -123,6 +123,15 @@ if(NO_MSG_HANDLER)
|
||||
add_definitions(-DNO_MSG_HANDLER=1)
|
||||
endif()
|
||||
|
||||
# this option builds the updater
|
||||
option(BUILD_UPDATER "BUILD_UPDATER" OFF)
|
||||
if(BUILD_UPDATER)
|
||||
message("Compiling with updater")
|
||||
add_definitions(-DBUILD_UPDATER=1)
|
||||
else()
|
||||
message("Compiling without updater")
|
||||
endif()
|
||||
|
||||
# this option builds the shell integration
|
||||
option(BUILD_SHELL_INTEGRATION "BUILD_SHELL_INTEGRATION" ON)
|
||||
|
||||
@@ -172,9 +181,9 @@ if(APPLE)
|
||||
endif()
|
||||
|
||||
if(BUILD_CLIENT)
|
||||
if(APPLE)
|
||||
if(APPLE AND BUILD_UPDATER)
|
||||
find_package(Sparkle)
|
||||
endif(APPLE)
|
||||
endif()
|
||||
|
||||
if(UNIX)
|
||||
find_package(INotify REQUIRED)
|
||||
@@ -219,6 +228,8 @@ if (APPLE)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
|
||||
endif()
|
||||
|
||||
include(SanitizerFlags)
|
||||
|
||||
# Handle Translations, pick all client_* files from trans directory.
|
||||
file( GLOB TRANS_FILES ${CMAKE_SOURCE_DIR}/translations/client_*.ts)
|
||||
set(TRANSLATIONS ${TRANS_FILES})
|
||||
|
||||
124
ChangeLog
124
ChangeLog
@@ -1,3 +1,127 @@
|
||||
ChangeLog
|
||||
====================
|
||||
For details check https://nextcloud.com/blog/category/release.
|
||||
|
||||
2.6 Series ChangeLog
|
||||
====================
|
||||
|
||||
version 2.6.4 (release 2020-03-04)
|
||||
* Fix Explorer pinning: Add fallbacks for Shell commands (fixes #1599)
|
||||
* WebFlowCredentials: Make username comparison case-insensitive (fix #1741)
|
||||
* ActivityListModel: Show full date and time as a Tooltip only
|
||||
* Disable HTTP/2 for now due to Qt bug, allow enabling it via env var
|
||||
* Fix Explorer integration re-save and hide option on non-Windows
|
||||
* l10n: Changes to improve source strings
|
||||
* Updater: Add query-parameter 'updatesegment' to the update check
|
||||
* Allow Desktop translation merging and custom backport branches
|
||||
|
||||
version 2.6.3 (release 2020-02-17)
|
||||
* Add UserInfo class and fetch quota via API instead of PropfindJob
|
||||
* l10n: Changed grammar and triple dots to ellipsis
|
||||
* l10n: Changed spelling of "user name" to "username"
|
||||
* Start the client in background if activated by D-Bus
|
||||
* Do not install files related to cloud providers under Xenial
|
||||
* Make sure that the libcloudprovider integration is using a valid D-Bus path
|
||||
* Changed product name to Nextcloud
|
||||
* Update autoupdate.rst
|
||||
* Use system proxy by default if no config file is present
|
||||
* Install libcloudproviders files by default on debian
|
||||
* Windows 7 is out of support
|
||||
* BugFix: Handle broken shared file error gracefully
|
||||
* Fix Explorer integration on Windows and the crash on other systems
|
||||
* Welcome to 2020
|
||||
* Updated year in legalnotice.cpp
|
||||
* apply http2 qt resend patch from owncloud
|
||||
|
||||
version 2.6.2 (release 2019-12-24)
|
||||
* Revert DEFAULT_REMOTE_POLL_INTERVAL back from 5 seconds to 30 seconds
|
||||
* Use user-provided username in displayName() - Fix #836
|
||||
* Fix typo
|
||||
* Build with libcloudproviders on debian and in the AppImage
|
||||
* Fix tests for Windows platform
|
||||
* Merge the list of ignored files/symlinks into one Activity notification.
|
||||
* Fix clang's variadic macro warnings
|
||||
* Add libdbus-1-dev to the build dependencies
|
||||
* Compare QDateTime objects more efficient
|
||||
* Improve the translation of "Share via …"
|
||||
* Upgrade for Qt 5.12.5 in docker-ci
|
||||
* Bump Qt 5.12.5 image
|
||||
* Add timestamp to Mac installer code signing
|
||||
* MacOS build: Avoid the Get-Task-Allow Entitlement (Notarization)
|
||||
* Build for Debian stable and oldstable
|
||||
* Happy new year
|
||||
* Fall back to old login flow on GS as this is not yet ready
|
||||
* [stable-2.6] macOS build: Avoid the Get-Task-Allow Entitlement (Notarization)
|
||||
* Fix remote wipe keychain storage (issue #1592)
|
||||
* Fix copyright year in MacOSXBundleInfo.plist.in for 2019
|
||||
* Fix macOS GUI (Qt 5.12)
|
||||
* Windows: Workaround for storing >= 4k (4096 bit) client-cert SSL keys
|
||||
* Fix Activity List: Add check to avoid first empty entry
|
||||
* Fix macOS GUI (Qt 5.12) No. 2 (continuation of #1651)
|
||||
* Show date and time in activity log (fixes issue #1683)
|
||||
* Login Flow v2 enhancements
|
||||
* Activity List: Fix crash and folder opening
|
||||
* Fix issue #1237: White text on almost-white background
|
||||
* Heavy refactoring: Windows workaround for >= 4k (4096 bit) client-cert SSL keys and large certs
|
||||
* Fix date in ActivityWidget and remove unnecessary string conversion
|
||||
|
||||
version 2.6.1 (release 2019-11-04)
|
||||
* Changed max GUI bandwidth limits
|
||||
* Add sync date next to "Synchronized with local folder"
|
||||
* Slideshow buttons
|
||||
* Fix qt warning about registering a URL sheme first.
|
||||
* Issue #1216: added sync-exclude entry for emacs recovery files
|
||||
* Race condition in the remote size loading logic
|
||||
* Review of msvc/gcc warnings -> code cleanup, prevention of implicit casts, variadic macros
|
||||
* Fix double slashes
|
||||
* Fixing E2E CSR transmission failure for new connections
|
||||
* Fixed missing 'translatable' exclusions, added missing window titles
|
||||
* Checks if exclude file is empty before creating the regular expressions.
|
||||
* Add server info to menu
|
||||
* Fixed grammar
|
||||
* Prevent jumping of tray menu
|
||||
* Don't run connection wizard when quitting the application
|
||||
* Avoiding copying in range-based loops
|
||||
* Add a 'Content-Length: 0' header to initial POST requests
|
||||
* Remote wipe.
|
||||
* Pick from upstream: Update qtmacgoodies for an OSX crash fix #6930
|
||||
* fix for issue no. #1351
|
||||
* Merge the list of ignored files/symlinks into one Activity notification.
|
||||
* Update submodules for Qt 5.12.5 (qtmacgoodies)
|
||||
* Fix duplicate items in Apps menu (a bug introduced in #1477)
|
||||
* Fix #1182
|
||||
* Fix remote wipe when a proxy is configured.
|
||||
* Fix updater message: Download link instead of "use the system's update
|
||||
|
||||
version 2.6.0 Login flow v2 (release 2019-09-27)
|
||||
* Reinstate Debian build in the new Drone config
|
||||
* Typo
|
||||
* Marking unused strings as unstranslatable
|
||||
* Fixes #607
|
||||
* Fixes issue #878
|
||||
* Fixes issue #1187
|
||||
* Displays FileIgnored activities with an info icon
|
||||
* Minor text change in the link to help in the tab 'General'.
|
||||
* Update Qt 5.5 compatibility patch for Xenial
|
||||
* Remove Ubuntu Cosmic and add Eoan package
|
||||
* Add proper CA to client side certificate connection
|
||||
* Remove dependency on libgnome-keyring0 on Eoan
|
||||
* Read .sync_exclude.lst in each subdirectory
|
||||
* Updates ChangeLog.
|
||||
* Login flow v2
|
||||
* Adds SSL client cert storage to webflow + Login Flow v2
|
||||
* Windows: Workaround for CredWriteW used by QtKeychain
|
||||
* Integrated registry check on windows when hasDarkSystray is called.
|
||||
* Logo update
|
||||
* Updated .gitignore to integrate unwanted files when working with VSC …
|
||||
* Full-Scaled new logo in Windows 10 start menu tile
|
||||
* Qt5.5 compatiblity patch for login flow V2 + UI improvement (Use newer digest algorithms in TLS error dialog)
|
||||
* Fix for #1382 "linux client crashes for no discernable reason"
|
||||
* UI improvement: Message box: Delete / Keep all files
|
||||
* Improve wording of the context menu in the file manager extension.
|
||||
* Changes wording in the share context menu.
|
||||
* Fix White Window issue on Windows by upgrading to Qt 5.12.5
|
||||
|
||||
2.5 Series ChangeLog
|
||||
====================
|
||||
|
||||
|
||||
@@ -7,11 +7,12 @@ set( APPLICATION_UPDATE_URL "https://updates.nextcloud.org/client/" CACHE STRING
|
||||
set( APPLICATION_HELP_URL "" CACHE STRING "URL for the help menu" )
|
||||
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_REV_DOMAIN "com.nextcloud.desktopclient" )
|
||||
|
||||
set( LINUX_PACKAGE_SHORTNAME "nextcloud" )
|
||||
set( LINUX_APPLICATION_ID "${APPLICATION_REV_DOMAIN}.${LINUX_PACKAGE_SHORTNAME}")
|
||||
|
||||
set( THEME_CLASS "NextcloudTheme" )
|
||||
set( APPLICATION_REV_DOMAIN "com.nextcloud.desktopclient" )
|
||||
set( WIN_SETUP_BITMAP_PATH "${CMAKE_SOURCE_DIR}/admin/win/nsi" )
|
||||
|
||||
set( MAC_INSTALLER_BACKGROUND_FILE "${CMAKE_SOURCE_DIR}/admin/osx/installer-background.png" CACHE STRING "The MacOSX installer background image")
|
||||
@@ -23,6 +24,9 @@ option( WITH_CRASHREPORTER "Build crashreporter" OFF )
|
||||
#set( CRASHREPORTER_SUBMIT_URL "https://crash-reports.owncloud.com/submit" CACHE STRING "URL for crash reporter" )
|
||||
#set( CRASHREPORTER_ICON ":/owncloud-icon.png" )
|
||||
|
||||
## Updater options
|
||||
option( BUILD_UPDATER "Build updater" OFF )
|
||||
|
||||
option( WITH_PROVIDERS "Build with providers list" ON )
|
||||
|
||||
|
||||
|
||||
@@ -61,14 +61,14 @@ For more info: [Wiki/Daily Builds](https://github.com/nextcloud/desktop/wiki/Dai
|
||||
### :bomb: Reporting issues
|
||||
|
||||
- If you find any bugs or have any suggestion for improvement, please
|
||||
file an issue at https://github.com/nextcloud/client/issues. Do not
|
||||
file an issue at https://github.com/nextcloud/desktop/issues. Do not
|
||||
contact the authors directly by mail, as this increases the chance
|
||||
of your report being lost. :boom:
|
||||
|
||||
### :smiley: :trophy: Pull requests
|
||||
|
||||
- If you created a patch :heart_eyes:, please submit a [Pull
|
||||
Request](https://github.com/nextcloud/client/pulls).
|
||||
Request](https://github.com/nextcloud/desktop/pulls).
|
||||
- How to create a pull request? This guide will help you get started: [Opening a pull request](https://opensource.guide/how-to-contribute/#opening-a-pull-request) :heart:
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
set( MIRALL_VERSION_MAJOR 2 )
|
||||
set( MIRALL_VERSION_MINOR 6 )
|
||||
set( MIRALL_VERSION_PATCH 3 )
|
||||
set( MIRALL_VERSION_PATCH 5 )
|
||||
set( MIRALL_VERSION_YEAR 2020 )
|
||||
set( MIRALL_SOVERSION 0 )
|
||||
|
||||
|
||||
@@ -6,12 +6,15 @@ mkdir /app
|
||||
mkdir /build
|
||||
|
||||
#Set Qt-5.12
|
||||
export QT_BASE_DIR=/opt/qt5.12.5
|
||||
export QT_BASE_DIR=/opt/qt5.12.8
|
||||
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:$LD_LIBRARY_PATH
|
||||
export PKG_CONFIG_PATH=$QT_BASE_DIR/lib/pkgconfig:$PKG_CONFIG_PATH
|
||||
|
||||
#Set APPID for .desktop file processing
|
||||
export LINUX_APPLICATION_ID=com.nextcloud.desktopclient.nextcloud
|
||||
|
||||
#set defaults
|
||||
export SUFFIX=${DRONE_PULL_REQUEST:=master}
|
||||
if [ $SUFFIX != "master" ]; then
|
||||
@@ -35,6 +38,7 @@ mkdir build-client
|
||||
cd build-client
|
||||
cmake -D CMAKE_INSTALL_PREFIX=/usr \
|
||||
-D NO_SHIBBOLETH=1 \
|
||||
-D BUILD_UPDATER=ON \
|
||||
-D QTKEYCHAIN_LIBRARY=/app/usr/lib/x86_64-linux-gnu/libqt5keychain.so \
|
||||
-D QTKEYCHAIN_INCLUDE_DIR=/app/usr/include/qt5keychain/ \
|
||||
-DMIRALL_VERSION_SUFFIX=PR-$DRONE_PULL_REQUEST \
|
||||
@@ -62,7 +66,7 @@ rm -rf ./usr/share/caja-python/
|
||||
rm -rf ./usr/share/nautilus-python/
|
||||
rm -rf ./usr/share/nemo-python/
|
||||
|
||||
# Move sync exlucde to right location
|
||||
# Move sync exclude to right location
|
||||
mv ./etc/Nextcloud/sync-exclude.lst ./usr/bin/
|
||||
rm -rf ./etc
|
||||
|
||||
|
||||
23
admin/linux/debian/debian.focal/changelog
Normal file
23
admin/linux/debian/debian.focal/changelog
Normal file
@@ -0,0 +1,23 @@
|
||||
nextcloud-client (2.3.3-1.0~focal1) focal; 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~focal1) focal; 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~focal1) focal; 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~focal1) focal; 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
|
||||
90
admin/linux/debian/debian.focal/control
Normal file
90
admin/linux/debian/debian.focal/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,
|
||||
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, python3-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, python3-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.
|
||||
23
admin/linux/debian/debian.groovy/changelog
Normal file
23
admin/linux/debian/debian.groovy/changelog
Normal file
@@ -0,0 +1,23 @@
|
||||
nextcloud-client (2.3.3-1.0~groovy1) groovy; 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~groovy1) groovy; 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~groovy1) groovy; 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~groovy1) groovy; 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
|
||||
90
admin/linux/debian/debian.groovy/control
Normal file
90
admin/linux/debian/debian.groovy/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,
|
||||
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, python3-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, python3-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.
|
||||
@@ -0,0 +1,4 @@
|
||||
usr/bin
|
||||
usr/share/applications
|
||||
usr/share/icons
|
||||
debian/101-sync-inotify.conf etc/sysctl.d
|
||||
@@ -3,12 +3,19 @@
|
||||
set -xe
|
||||
shopt -s extglob
|
||||
|
||||
env
|
||||
|
||||
PPA=ppa:nextcloud-devs/client
|
||||
PPA_ALPHA=ppa:nextcloud-devs/client-alpha
|
||||
PPA_BETA=ppa:nextcloud-devs/client-beta
|
||||
|
||||
OBS_PROJECT=home:ivaradi
|
||||
OBS_PROJECT_ALPHA=home:ivaradi:alpha
|
||||
OBS_PROJECT_BETA=home:ivaradi:beta
|
||||
OBS_PACKAGE=nextcloud-client
|
||||
OBS_PACKAGE=nextcloud-desktop
|
||||
|
||||
UBUNTU_DISTRIBUTIONS="xenial bionic eoan focal groovy"
|
||||
DEBIAN_DISTRIBUTIONS="buster stretch"
|
||||
|
||||
pull_request=${DRONE_PULL_REQUEST:=master}
|
||||
|
||||
@@ -31,13 +38,15 @@ fi
|
||||
set -x
|
||||
|
||||
cd "${DRONE_WORKSPACE}"
|
||||
read basever kind <<<$(admin/linux/debian/scripts/git2changelog.py /tmp/tmpchangelog stable)
|
||||
read basever revdate kind <<<$(admin/linux/debian/scripts/git2changelog.py /tmp/tmpchangelog stable)
|
||||
|
||||
cd "${DRONE_DIR}"
|
||||
|
||||
echo "$kind" > kind
|
||||
|
||||
if test "$kind" = "beta"; then
|
||||
if test "$kind" = "alpha"; then
|
||||
repo=nextcloud-devs/client-alpha
|
||||
elif test "$kind" = "beta"; then
|
||||
repo=nextcloud-devs/client-beta
|
||||
else
|
||||
repo=nextcloud-devs/client
|
||||
@@ -45,79 +54,60 @@ fi
|
||||
|
||||
origsourceopt=""
|
||||
|
||||
if ! wget http://ppa.launchpad.net/${repo}/ubuntu/pool/main/n/nextcloud-client/nextcloud-client_${basever}.orig.tar.bz2; then
|
||||
cp -a ${DRONE_WORKSPACE} nextcloud-client_${basever}
|
||||
tar cjf nextcloud-client_${basever}.orig.tar.bz2 --exclude .git nextcloud-client_${basever}
|
||||
origsourceopt="-sa"
|
||||
fi
|
||||
cp -a ${DRONE_WORKSPACE} nextcloud-desktop_${basever}-${revdate}
|
||||
tar cjf nextcloud-desktop_${basever}-${revdate}.orig.tar.bz2 --exclude .git --exclude binary nextcloud-desktop_${basever}-${revdate}
|
||||
|
||||
for distribution in xenial bionic disco eoan stable oldstable; do
|
||||
rm -rf nextcloud-client_${basever}
|
||||
cp -a ${DRONE_WORKSPACE} nextcloud-client_${basever}
|
||||
cd "${DRONE_WORKSPACE}"
|
||||
git config --global user.email "drone@noemail.invalid"
|
||||
git config --global user.name "Drone User"
|
||||
|
||||
cd nextcloud-client_${basever}
|
||||
for distribution in ${UBUNTU_DISTRIBUTIONS} ${DEBIAN_DISTRIBUTIONS}; do
|
||||
git checkout -- .
|
||||
git clean -xdf
|
||||
|
||||
cp -a admin/linux/debian/debian .
|
||||
if test -d admin/linux/debian/debian.${distribution}; then
|
||||
tar cf - -C admin/linux/debian/debian.${distribution} . | tar xf - -C debian
|
||||
fi
|
||||
git fetch origin debian/dist/${distribution}/${DRONE_TARGET_BRANCH}
|
||||
git checkout origin/debian/dist/${distribution}/${DRONE_TARGET_BRANCH}
|
||||
|
||||
admin/linux/debian/scripts/git2changelog.py /tmp/tmpchangelog ${distribution}
|
||||
cp /tmp/tmpchangelog debian/changelog
|
||||
if test -f admin/linux/debian/debian.${distribution}/changelog; then
|
||||
cat admin/linux/debian/debian.${distribution}/changelog >> debian/changelog
|
||||
else
|
||||
cat admin/linux/debian/debian/changelog >> debian/changelog
|
||||
fi
|
||||
git merge ${DRONE_COMMIT}
|
||||
|
||||
for p in debian/post-patches/*.patch; do
|
||||
if test -f "${p}"; then
|
||||
echo "Applying ${p}"
|
||||
patch -p1 < "${p}"
|
||||
fi
|
||||
done
|
||||
admin/linux/debian/scripts/git2changelog.py /tmp/tmpchangelog ${distribution} ${revdate}
|
||||
cat /tmp/tmpchangelog debian/changelog > debian/changelog.new
|
||||
mv debian/changelog.new debian/changelog
|
||||
|
||||
fullver=`head -1 debian/changelog | sed "s:nextcloud-client (\([^)]*\)).*:\1:"`
|
||||
fullver=`head -1 debian/changelog | sed "s:nextcloud-desktop (\([^)]*\)).*:\1:"`
|
||||
|
||||
EDITOR=true dpkg-source --commit . local-changes
|
||||
|
||||
dpkg-source --build .
|
||||
dpkg-genchanges -S ${origsourceopt} > "../nextcloud-client_${fullver}_source.changes"
|
||||
dpkg-genchanges -S -sa > "../nextcloud-desktop_${fullver}_source.changes"
|
||||
|
||||
if test -f ~/.has_ppa_keys; then
|
||||
debsign -k7D14AA7B -S
|
||||
fi
|
||||
|
||||
cd ..
|
||||
done
|
||||
cd ..
|
||||
ls -al
|
||||
|
||||
if test "${pull_request}" = "master"; then
|
||||
kind=`cat kind`
|
||||
|
||||
if test "$kind" = "beta"; then
|
||||
if test "$kind" = "alpha"; then
|
||||
PPA=$PPA_ALPHA
|
||||
OBS_PROJECT=$OBS_PROJECT_ALPHA
|
||||
elif test "$kind" = "beta"; then
|
||||
PPA=$PPA_BETA
|
||||
OBS_PROJECT=$OBS_PROJECT_BETA
|
||||
fi
|
||||
|
||||
if test -f ~/.has_ppa_keys; then
|
||||
for changes in nextcloud-client_*~+([a-z])1_source.changes; do
|
||||
case "${changes}" in
|
||||
*oldstable1*)
|
||||
;;
|
||||
*)
|
||||
dput $PPA $changes > /dev/null
|
||||
;;
|
||||
esac
|
||||
for distribution in ${UBUNTU_DISTRIBUTIONS}; do
|
||||
changes=$(ls -1 nextcloud-desktop_*~${distribution}1_source.changes)
|
||||
if test -f "${changes}"; then
|
||||
dput $PPA "${changes}" > /dev/null
|
||||
fi
|
||||
done
|
||||
|
||||
for distribution in stable oldstable; do
|
||||
if test "${distribution}" = "oldstable"; then
|
||||
pkgsuffix=".${distribution}"
|
||||
pkgvertag="~${distribution}1"
|
||||
else
|
||||
pkgsuffix=""
|
||||
pkgvertag=""
|
||||
fi
|
||||
for distribution in ${DEBIAN_DISTRIBUTIONS}; do
|
||||
pkgsuffix=".${distribution}"
|
||||
pkgvertag="~${distribution}1"
|
||||
|
||||
package="${OBS_PACKAGE}${pkgsuffix}"
|
||||
OBS_SUBDIR="${OBS_PROJECT}/${package}"
|
||||
@@ -129,10 +119,10 @@ if test "${pull_request}" = "master"; 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}/
|
||||
cp ../nextcloud-desktop*.orig.tar.* ${OBS_SUBDIR}/
|
||||
cp ../nextcloud-desktop_*[0-9.][0-9]${pkgvertag}.dsc ${OBS_SUBDIR}/
|
||||
cp ../nextcloud-desktop_*[0-9.][0-9]${pkgvertag}.debian.tar* ${OBS_SUBDIR}/
|
||||
cp ../nextcloud-desktop_*[0-9.][0-9]${pkgvertag}_source.changes ${OBS_SUBDIR}/
|
||||
osc add ${OBS_SUBDIR}/*
|
||||
|
||||
cd ${OBS_SUBDIR}
|
||||
|
||||
@@ -6,3 +6,7 @@
|
||||
[versionhack]
|
||||
commit = bc7e65b39552ac458b2adacf76cbf98735ec29a0
|
||||
tag = v2.4.0-beta
|
||||
|
||||
[base]
|
||||
commit = b45f5fd1a947dc21eb11c69049a99616a2ec950e
|
||||
version = 2.6.4
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#!//usr/bin/env python2.7
|
||||
|
||||
from __future__ import print_function
|
||||
import subprocess
|
||||
import re
|
||||
import sys
|
||||
@@ -7,6 +8,11 @@ import datetime
|
||||
import os
|
||||
import ConfigParser
|
||||
|
||||
try:
|
||||
long
|
||||
except NameError:
|
||||
long = int
|
||||
|
||||
distribution="yakkety"
|
||||
|
||||
versionTagRE = re.compile("^v([0-9]+((\.[0-9]+)+))(-(.+))?$")
|
||||
@@ -22,39 +28,37 @@ def getCommitVersion(commit):
|
||||
major=None
|
||||
minor=None
|
||||
patch=None
|
||||
for line in subprocess.check_output(["git", "show",
|
||||
commit + ":VERSION.cmake"]).splitlines():
|
||||
m = re.match("set\( MIRALL_VERSION_([A-Z]+) +([0-9])+ *\)", line)
|
||||
if m is not None:
|
||||
kind=m.group(1)
|
||||
version=m.group(2)
|
||||
if kind=="MAJOR":
|
||||
major=version
|
||||
elif kind=="MINOR":
|
||||
minor=version
|
||||
elif kind=="PATCH":
|
||||
patch=version
|
||||
if major and minor and patch:
|
||||
return major + "." + minor + "." + patch
|
||||
else:
|
||||
try:
|
||||
for line in subprocess.check_output(["git", "show",
|
||||
commit + ":VERSION.cmake"]).splitlines():
|
||||
m = re.match("set\( MIRALL_VERSION_([A-Z]+) +([0-9])+ *\)", line)
|
||||
if m is not None:
|
||||
kind=m.group(1)
|
||||
version=m.group(2)
|
||||
if kind=="MAJOR":
|
||||
major=version
|
||||
elif kind=="MINOR":
|
||||
minor=version
|
||||
elif kind=="PATCH":
|
||||
patch=version
|
||||
if major and minor and patch:
|
||||
return major + "." + minor + "." + patch
|
||||
else:
|
||||
return None
|
||||
except:
|
||||
return None
|
||||
|
||||
def collectEntries(baseCommit, baseVersion, kind):
|
||||
scriptdir = os.path.dirname(__file__)
|
||||
configPath = os.path.join(scriptdir, "git2changelog.cfg")
|
||||
def collectEntries(baseCommit, baseVersion, kind, finalRevDate, config):
|
||||
|
||||
newVersionCommit = None
|
||||
newVersionTag = None
|
||||
newVersionOrigTag = None
|
||||
|
||||
if os.path.exists(configPath):
|
||||
config = ConfigParser.SafeConfigParser()
|
||||
config.read(configPath)
|
||||
if config.has_section("versionhack"):
|
||||
if config.has_option("versionhack", "commit") and \
|
||||
config.has_option("versionhack", "tag"):
|
||||
newVersionCommit = config.get("versionhack", "commit")
|
||||
newVersionTag = config.get("versionhack", "tag")
|
||||
if config is not None and config.has_section("versionhack"):
|
||||
if config.has_option("versionhack", "commit") and \
|
||||
config.has_option("versionhack", "tag"):
|
||||
newVersionCommit = config.get("versionhack", "commit")
|
||||
newVersionTag = config.get("versionhack", "tag")
|
||||
|
||||
entries = []
|
||||
|
||||
@@ -73,9 +77,11 @@ def collectEntries(baseCommit, baseVersion, kind):
|
||||
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")
|
||||
|
||||
kind = "beta"
|
||||
revdate = datetime.datetime.utcfromtimestamp(long(revdate)).strftime("%Y%m%d.%H%M%S")
|
||||
revdate += "." + commit
|
||||
|
||||
kind = "alpha"
|
||||
|
||||
if commit==newVersionCommit:
|
||||
result = processVersionTag(newVersionTag)
|
||||
@@ -107,38 +113,63 @@ def collectEntries(baseCommit, baseVersion, kind):
|
||||
entries.append((commit, name, email, date, revdate, subject,
|
||||
baseVersion, kind))
|
||||
|
||||
if entries:
|
||||
(commit, name, email, date, revdate, subject, baseVersion, kind) = entries[-1]
|
||||
if finalRevDate is None:
|
||||
revdate = datetime.datetime.now().strftime("%Y%m%d.%H%M%S")+ "." + commit
|
||||
else:
|
||||
revdate = finalRevDate
|
||||
entries[-1] = (commit, name, email, date, revdate, subject, baseVersion, kind)
|
||||
|
||||
entries.reverse()
|
||||
|
||||
return entries
|
||||
|
||||
def genChangeLogEntries(f, entries, distribution):
|
||||
latestBaseVersion = None
|
||||
latestRevDate = None
|
||||
latestKind = None
|
||||
for (commit, name, email, date, revdate, subject, baseVersion, kind) in entries:
|
||||
if latestBaseVersion is None:
|
||||
latestBaseVersion = baseVersion
|
||||
latestRevDate = revdate
|
||||
latestKind = kind
|
||||
upstreamVersion = baseVersion + "-" + revdate
|
||||
if distribution=="stable":
|
||||
version = upstreamVersion
|
||||
else:
|
||||
version = upstreamVersion + "~" + distribution + "1"
|
||||
print >> f, "nextcloud-client (%s) %s; urgency=medium" % (version, distribution)
|
||||
print >> f
|
||||
print >> f, " * " + subject
|
||||
print >> f
|
||||
print >> f, " -- %s <%s> %s" % (name, email, date)
|
||||
print >> f
|
||||
return (latestBaseVersion, latestKind)
|
||||
version = upstreamVersion + "-1.0~" + distribution + "1"
|
||||
print("nextcloud-desktop (%s) %s; urgency=medium" % (version, distribution), file=f)
|
||||
print(file=f)
|
||||
print(" * " + subject, file=f)
|
||||
print(file=f)
|
||||
print(" -- %s <%s> %s" % (name, email, date), file=f)
|
||||
print(file=f)
|
||||
return (latestBaseVersion, latestRevDate, latestKind)
|
||||
|
||||
if __name__ == "__main__":
|
||||
scriptdir = os.path.dirname(__file__)
|
||||
configPath = os.path.join(scriptdir, "git2changelog.cfg")
|
||||
|
||||
baseCommit = "f9b1c724d6ab5431e0cd56b7cd834f2dd48cebb1"
|
||||
baseVersion = "2.4.0"
|
||||
|
||||
config = None
|
||||
if os.path.exists(configPath):
|
||||
config = ConfigParser.SafeConfigParser()
|
||||
config.read(configPath)
|
||||
|
||||
if config.has_section("base"):
|
||||
if config.has_option("base", "commit") and \
|
||||
config.has_option("base", "version"):
|
||||
baseCommit = config.get("base", "commit")
|
||||
baseVersion = config.get("base", "version")
|
||||
|
||||
distribution = sys.argv[2]
|
||||
finalRevDate = sys.argv[3] if len(sys.argv)>3 else None
|
||||
|
||||
#entries = collectEntries("8aade24147b5313f8241a8b42331442b7f40eef9", "2.2.4", "release")
|
||||
entries = collectEntries("f9b1c724d6ab5431e0cd56b7cd834f2dd48cebb1", "2.4.0", "beta")
|
||||
|
||||
entries = collectEntries(baseCommit, baseVersion, "alpha", finalRevDate, config)
|
||||
|
||||
with open(sys.argv[1], "wt") as f:
|
||||
(baseVersion, kind) = genChangeLogEntries(f, entries, distribution)
|
||||
print baseVersion, kind
|
||||
(baseVersion, revdate, kind) = genChangeLogEntries(f, entries, distribution)
|
||||
print(baseVersion, revdate, kind)
|
||||
|
||||
@@ -1,365 +0,0 @@
|
||||
#!/usr/bin/python
|
||||
# This file is part of ownCloud.
|
||||
# It was inspired in large part by the macdeploy script in Clementine
|
||||
# and Tomahawk
|
||||
#
|
||||
# ownCloud 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.
|
||||
#
|
||||
# ownCLoud is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with ownCloud. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import os
|
||||
import re
|
||||
import subprocess
|
||||
import commands
|
||||
import sys
|
||||
from glob import glob
|
||||
from distutils.version import LooseVersion
|
||||
|
||||
def QueryQMake(attrib):
|
||||
return subprocess.check_output([qmake_path, '-query', attrib]).rstrip('\n')
|
||||
|
||||
FRAMEWORK_SEARCH_PATH=[
|
||||
'/Library/Frameworks',
|
||||
os.path.join(os.environ['HOME'], 'Library/Frameworks')
|
||||
]
|
||||
|
||||
LIBRARY_SEARCH_PATH=['/usr/local/lib', '/usr/local/Qt-5.12.5/lib', '.']
|
||||
|
||||
QT_PLUGINS = [
|
||||
'sqldrivers/libqsqlite.dylib',
|
||||
'platforms/libqcocoa.dylib',
|
||||
'styles/libqmacstyle.dylib',
|
||||
'imageformats/libqgif.dylib',
|
||||
'imageformats/libqico.dylib',
|
||||
'imageformats/libqjpeg.dylib',
|
||||
'imageformats/libqsvg.dylib',
|
||||
]
|
||||
|
||||
QT_PLUGINS_SEARCH_PATH=[
|
||||
# os.path.join(os.environ['QTDIR'], 'plugins'),
|
||||
# '/usr/local/Cellar/qt/5.2.1/plugins',
|
||||
'/usr/local/Qt-5.12.5/plugins',
|
||||
]
|
||||
|
||||
|
||||
class Error(Exception):
|
||||
pass
|
||||
|
||||
|
||||
class CouldNotFindQtPluginErrorFindFrameworkError(Error):
|
||||
pass
|
||||
|
||||
|
||||
class InstallNameToolError(Error):
|
||||
pass
|
||||
|
||||
|
||||
class CouldNotFindQtPluginError(Error):
|
||||
pass
|
||||
|
||||
|
||||
class CouldNotFindScriptPluginError(Error):
|
||||
pass
|
||||
|
||||
class CouldNotFindFrameworkError(Error):
|
||||
pass
|
||||
|
||||
if len(sys.argv) < 3:
|
||||
print 'Usage: %s <bundle.app> <path-to-qmake>' % sys.argv[0]
|
||||
exit()
|
||||
|
||||
def is_exe(fpath):
|
||||
return os.path.isfile(fpath) and os.access(fpath, os.X_OK)
|
||||
|
||||
bundle_dir = sys.argv[1]
|
||||
qmake_path = sys.argv[2]
|
||||
|
||||
bundle_name = os.path.basename(bundle_dir).split('.')[0]
|
||||
|
||||
commands = []
|
||||
|
||||
binary_dir = os.path.join(bundle_dir, 'Contents', 'MacOS')
|
||||
frameworks_dir = os.path.join(bundle_dir, 'Contents', 'Frameworks')
|
||||
commands.append(['mkdir', '-p', frameworks_dir])
|
||||
resources_dir = os.path.join(bundle_dir, 'Contents', 'Resources')
|
||||
commands.append(['mkdir', '-p', resources_dir])
|
||||
plugins_dir = os.path.join(bundle_dir, 'Contents', 'PlugIns')
|
||||
binaries = [i for i in glob(os.path.join(bundle_dir, 'Contents', 'MacOS', "*")) if is_exe(i)];
|
||||
|
||||
qt_version = QueryQMake('QT_VERSION')
|
||||
print "Using Qt", qt_version
|
||||
|
||||
fixed_libraries = []
|
||||
fixed_frameworks = []
|
||||
|
||||
def WriteQtConf():
|
||||
print "Writing qt.conf..."
|
||||
with open(os.path.join(resources_dir, 'qt.conf'), 'w') as f:
|
||||
f.write("[Paths]\nPlugins = PlugIns\n");
|
||||
f.close()
|
||||
|
||||
def GetBrokenLibraries(binary):
|
||||
#print "Checking libs for binary: %s" % binary
|
||||
output = subprocess.Popen(['otool', '-L', binary], stdout=subprocess.PIPE).communicate()[0]
|
||||
broken_libs = {
|
||||
'frameworks': [],
|
||||
'libs': []}
|
||||
for line in [x.split(' ')[0].lstrip() for x in output.split('\n')[1:]]:
|
||||
#print "Checking line: %s" % line
|
||||
if not line: # skip empty lines
|
||||
continue
|
||||
if os.path.basename(binary) == os.path.basename(line):
|
||||
#print "mnope %s-%s" % (os.path.basename(binary), os.path.basename(line))
|
||||
continue
|
||||
if re.match(r'^\s*/System/', line):
|
||||
continue # System framework
|
||||
elif re.match(r'^\s*/usr/lib/', line):
|
||||
#print "unix style system lib"
|
||||
continue # unix style system library
|
||||
elif re.match(r'Breakpad', line):
|
||||
continue # Manually added by cmake.
|
||||
elif re.match(r'^\s*@executable_path', line) or re.match(r'^\s*@loader_path', line):
|
||||
# Potentially already fixed library
|
||||
if '.framework' in line:
|
||||
relative_path = os.path.join(*line.split('/')[3:])
|
||||
if not os.path.exists(os.path.join(frameworks_dir, relative_path)):
|
||||
broken_libs['frameworks'].append(relative_path)
|
||||
else:
|
||||
relative_path = os.path.join(*line.split('/')[1:])
|
||||
#print "RELPATH %s %s" % (relative_path, os.path.join(binary_dir, relative_path))
|
||||
if not os.path.exists(os.path.join(binary_dir, relative_path)):
|
||||
broken_libs['libs'].append(relative_path)
|
||||
elif re.search(r'\w+\.framework', line):
|
||||
broken_libs['frameworks'].append(line)
|
||||
else:
|
||||
broken_libs['libs'].append(line)
|
||||
|
||||
return broken_libs
|
||||
|
||||
def FindFramework(path):
|
||||
search_pathes = FRAMEWORK_SEARCH_PATH
|
||||
search_pathes.insert(0, QueryQMake('QT_INSTALL_LIBS'))
|
||||
for search_path in search_pathes:
|
||||
# The following two lines are needed for a custom built Qt from version 5.5 on, possibly not for the one from the Qt SDK.
|
||||
# Looks like the upstream macdeployqt also had an issue there https://bugreports.qt.io/browse/QTBUG-47868
|
||||
if path.find( "\@rpath/"):
|
||||
path = path.replace("@rpath/", "")
|
||||
abs_path = os.path.join(search_path, path)
|
||||
if os.path.exists(abs_path):
|
||||
return abs_path
|
||||
|
||||
raise CouldNotFindFrameworkError(path)
|
||||
|
||||
def FindLibrary(path):
|
||||
if os.path.exists(path):
|
||||
return path
|
||||
search_pathes = LIBRARY_SEARCH_PATH
|
||||
search_pathes.insert(0, QueryQMake('QT_INSTALL_LIBS'))
|
||||
for search_path in search_pathes:
|
||||
abs_path = os.path.join(search_path, path)
|
||||
if os.path.exists(abs_path):
|
||||
return abs_path
|
||||
else: # try harder---look for lib name in library folders
|
||||
newpath = os.path.join(search_path,os.path.basename(path))
|
||||
if os.path.exists(newpath):
|
||||
return newpath
|
||||
|
||||
return ""
|
||||
#raise CouldNotFindFrameworkError(path)
|
||||
|
||||
def FixAllLibraries(broken_libs):
|
||||
for framework in broken_libs['frameworks']:
|
||||
FixFramework(framework)
|
||||
for lib in broken_libs['libs']:
|
||||
FixLibrary(lib)
|
||||
|
||||
def FixFramework(path):
|
||||
if path in fixed_libraries:
|
||||
return
|
||||
else:
|
||||
fixed_libraries.append(path)
|
||||
abs_path = FindFramework(path)
|
||||
broken_libs = GetBrokenLibraries(abs_path)
|
||||
FixAllLibraries(broken_libs)
|
||||
|
||||
new_path = CopyFramework(abs_path)
|
||||
id = os.sep.join(new_path.split(os.sep)[3:])
|
||||
FixFrameworkId(new_path, id)
|
||||
for framework in broken_libs['frameworks']:
|
||||
FixFrameworkInstallPath(framework, new_path)
|
||||
for library in broken_libs['libs']:
|
||||
FixLibraryInstallPath(library, new_path)
|
||||
|
||||
def FixLibrary(path):
|
||||
if path in fixed_libraries or FindSystemLibrary(os.path.basename(path)) is not None:
|
||||
return
|
||||
else:
|
||||
fixed_libraries.append(path)
|
||||
abs_path = FindLibrary(path)
|
||||
if abs_path == "":
|
||||
print "Could not resolve %s, not fixing!" % path
|
||||
return
|
||||
broken_libs = GetBrokenLibraries(abs_path)
|
||||
FixAllLibraries(broken_libs)
|
||||
|
||||
new_path = CopyLibrary(abs_path)
|
||||
FixLibraryId(new_path)
|
||||
for framework in broken_libs['frameworks']:
|
||||
FixFrameworkInstallPath(framework, new_path)
|
||||
for library in broken_libs['libs']:
|
||||
FixLibraryInstallPath(library, new_path)
|
||||
|
||||
def FixPlugin(abs_path, subdir):
|
||||
broken_libs = GetBrokenLibraries(abs_path)
|
||||
FixAllLibraries(broken_libs)
|
||||
|
||||
new_path = CopyPlugin(abs_path, subdir)
|
||||
for framework in broken_libs['frameworks']:
|
||||
FixFrameworkInstallPath(framework, new_path)
|
||||
for library in broken_libs['libs']:
|
||||
FixLibraryInstallPath(library, new_path)
|
||||
|
||||
def FixBinary(path):
|
||||
broken_libs = GetBrokenLibraries(path)
|
||||
FixAllLibraries(broken_libs)
|
||||
for framework in broken_libs['frameworks']:
|
||||
FixFrameworkInstallPath(framework, path)
|
||||
for library in broken_libs['libs']:
|
||||
FixLibraryInstallPath(library, path)
|
||||
|
||||
def CopyLibrary(path):
|
||||
new_path = os.path.join(binary_dir, os.path.basename(path))
|
||||
args = ['ditto', '--arch=x86_64', path, new_path]
|
||||
commands.append(args)
|
||||
args = ['chmod', 'u+w', new_path]
|
||||
commands.append(args)
|
||||
return new_path
|
||||
|
||||
def CopyPlugin(path, subdir):
|
||||
new_path = os.path.join(plugins_dir, subdir, os.path.basename(path))
|
||||
args = ['mkdir', '-p', os.path.dirname(new_path)]
|
||||
commands.append(args)
|
||||
args = ['ditto', '--arch=x86_64', path, new_path]
|
||||
commands.append(args)
|
||||
args = ['chmod', 'u+w', new_path]
|
||||
commands.append(args)
|
||||
return new_path
|
||||
|
||||
def CopyFramework(source_dylib):
|
||||
parts = source_dylib.split(os.sep)
|
||||
print "CopyFramework:", source_dylib
|
||||
for i, part in enumerate(parts):
|
||||
matchObj = re.match(r'(\w+\.framework)', part)
|
||||
if matchObj:
|
||||
framework = matchObj.group(1)
|
||||
dylib_name = parts[-1]
|
||||
source_path = os.path.join('/', *parts[:i+1])
|
||||
dest_path = os.path.join(frameworks_dir, framework)
|
||||
dest_dylib_path = os.path.join(frameworks_dir, *parts[i:-1])
|
||||
break
|
||||
# if os.path.exists(dest_path):
|
||||
# print dest_path, "already exists, skipping copy..."
|
||||
# return os.path.join(dest_dylib_path, dylib_name)
|
||||
|
||||
args = ['mkdir', '-p', dest_dylib_path]
|
||||
commands.append(args)
|
||||
args = ['ditto', '--arch=x86_64', source_dylib, dest_dylib_path]
|
||||
commands.append(args)
|
||||
args = ['chmod', 'u+w', os.path.join(dest_dylib_path, parts[-1])]
|
||||
commands.append(args)
|
||||
args = ['ln', '-s', '5', os.path.join(dest_path, 'Versions', 'Current')]
|
||||
commands.append(args)
|
||||
args = ['ln', '-s', os.path.join('Versions', 'Current', dylib_name), os.path.join(dest_path, dylib_name)]
|
||||
commands.append(args)
|
||||
args = ['ln', '-s', os.path.join('Versions', 'Current', 'Resources'), os.path.join(dest_path, 'Resources')]
|
||||
commands.append(args)
|
||||
args = ['cp', '-r', os.path.join(source_path, 'Versions', '5', 'Resources'), os.path.join(dest_path, 'Versions', '5')]
|
||||
commands.append(args)
|
||||
args = ['ln', '-s', os.path.join('Versions', 'Current', 'Helpers'), os.path.join(dest_path, 'Helpers')]
|
||||
commands.append(args)
|
||||
args = ['cp', '-r', os.path.join(source_path, 'Versions', '5', 'Helpers'), os.path.join(dest_path, 'Versions', '5')]
|
||||
commands.append(args)
|
||||
|
||||
return os.path.join(dest_dylib_path, dylib_name)
|
||||
|
||||
def FixId(path, library_name):
|
||||
id = '@executable_path/../Frameworks/%s' % library_name
|
||||
args = ['install_name_tool', '-id', id, path]
|
||||
commands.append(args)
|
||||
|
||||
def FixLibraryId(path):
|
||||
library_name = os.path.basename(path)
|
||||
FixId(path, library_name)
|
||||
|
||||
def FixFrameworkId(path, id):
|
||||
FixId(path, id)
|
||||
|
||||
def FixInstallPath(library_path, library, new_path):
|
||||
args = ['install_name_tool', '-change', library_path, new_path, library]
|
||||
commands.append(args)
|
||||
|
||||
def FindSystemLibrary(library_name):
|
||||
for path in ['/lib', '/usr/lib']:
|
||||
full_path = os.path.join(path, library_name)
|
||||
if os.path.exists(full_path):
|
||||
return full_path
|
||||
return None
|
||||
|
||||
def FixLibraryInstallPath(library_path, library):
|
||||
system_library = FindSystemLibrary(os.path.basename(library_path))
|
||||
if system_library is None:
|
||||
new_path = '@executable_path/../MacOS/%s' % os.path.basename(library_path)
|
||||
FixInstallPath(library_path, library, new_path)
|
||||
else:
|
||||
FixInstallPath(library_path, library, system_library)
|
||||
|
||||
def FixFrameworkInstallPath(library_path, library):
|
||||
parts = library_path.split(os.sep)
|
||||
for i, part in enumerate(parts):
|
||||
if re.match(r'\w+\.framework', part):
|
||||
full_path = os.path.join(*parts[i:])
|
||||
break
|
||||
new_path = '@executable_path/../Frameworks/%s' % full_path
|
||||
FixInstallPath(library_path, library, new_path)
|
||||
|
||||
def FindQtPlugin(name):
|
||||
search_path = QT_PLUGINS_SEARCH_PATH
|
||||
search_path.insert(0, QueryQMake('QT_INSTALL_PLUGINS'))
|
||||
for path in search_path:
|
||||
if os.path.exists(path):
|
||||
if os.path.exists(os.path.join(path, name)):
|
||||
return os.path.join(path, name)
|
||||
raise CouldNotFindQtPluginError(name)
|
||||
|
||||
for binary in binaries:
|
||||
FixBinary(binary)
|
||||
|
||||
for plugin in QT_PLUGINS:
|
||||
FixPlugin(FindQtPlugin(plugin), os.path.dirname(plugin))
|
||||
|
||||
if LooseVersion(qt_version) >= LooseVersion("5.10.0"):
|
||||
args = ['plutil', '-insert', 'LSMinimumSystemVersion', '-string', '10.10.0', os.path.join(bundle_dir, 'Contents', 'Info.plist')]
|
||||
commands.append(args)
|
||||
else:
|
||||
args = ['plutil', '-insert', 'LSMinimumSystemVersion', '-string', '10.7.0', os.path.join(bundle_dir, 'Contents', 'Info.plist')]
|
||||
commands.append(args)
|
||||
|
||||
if len(sys.argv) <= 2:
|
||||
print 'Will run %d commands:' % len(commands)
|
||||
for command in commands:
|
||||
print ' '.join(command)
|
||||
|
||||
for command in commands:
|
||||
p = subprocess.Popen(command)
|
||||
os.waitpid(p.pid, 0)
|
||||
|
||||
WriteQtConf()
|
||||
@@ -9,6 +9,11 @@ import os
|
||||
import polib
|
||||
from optparse import OptionParser
|
||||
|
||||
try:
|
||||
unicode
|
||||
except NameError:
|
||||
unicode = str
|
||||
|
||||
parser = OptionParser()
|
||||
parser.add_option("-o", "--output", dest="output",
|
||||
help="Directory for localized output", default="../Shared/installer/nightly_localized.nsi")
|
||||
@@ -126,7 +131,7 @@ for root,dirs,files in os.walk(options.podir):
|
||||
if filename in localeToName:
|
||||
language = localeToName[filename]
|
||||
translationCache[language] = collections.OrderedDict()
|
||||
|
||||
|
||||
po = polib.pofile(os.path.join(root,file))
|
||||
for entry in po.translated_entries():
|
||||
# Loop through all our labels and add translation (each translation may have multiple labels)
|
||||
@@ -165,14 +170,14 @@ for language,translations in translationCache.iteritems():
|
||||
for label,value in translations.iteritems():
|
||||
NSINewLines.append( tostr('StrCpy $%s "%s"\n' % (label,value)) )
|
||||
if language.upper() == options.lang.upper():
|
||||
NSIDeclarations.append( tostr('Var %s\n' % label) )
|
||||
NSIDeclarations.append( tostr('Var %s\n' % label) )
|
||||
|
||||
count += 1
|
||||
NSIWorkingFile = open('%s/%s.nsh' % (options.output, language),"w")
|
||||
NSIWorkingFile.writelines(NSINewLines)
|
||||
NSIWorkingFile.close()
|
||||
print ( "%i translations merged for language '%s'"%(count,language) )
|
||||
|
||||
|
||||
# Finally, let's write languages.nsh and declarations.nsh
|
||||
NSIWorkingFile = open('%s/languages.nsh' % options.output,"w")
|
||||
NSIWorkingFile.writelines(NSILanguages)
|
||||
@@ -181,5 +186,5 @@ NSIWorkingFile.close()
|
||||
NSIWorkingFile = open('%s/declarations.nsh' % options.output,"w")
|
||||
NSIWorkingFile.writelines(NSIDeclarations)
|
||||
NSIWorkingFile.close()
|
||||
|
||||
|
||||
print ( "NSI Localization Operation Complete" )
|
||||
|
||||
1
binary
1
binary
Submodule binary deleted from 09f12de312
@@ -10,7 +10,7 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
|
||||
# Put the include dirs which are in the source or build tree
|
||||
# before all other include dirs, so the headers in the sources
|
||||
# are prefered over the already installed ones
|
||||
# are preferred over the already installed ones
|
||||
# since cmake 2.4.1
|
||||
set(CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE ON)
|
||||
|
||||
|
||||
@@ -30,6 +30,8 @@
|
||||
<string>(C) 2014-2020 @APPLICATION_VENDOR@</string>
|
||||
<key>NSSupportsAutomaticGraphicsSwitching</key>
|
||||
<true/>
|
||||
<key>NSRequiresAquaSystemAppearance</key>
|
||||
<false/>
|
||||
<key>SUShowReleaseNotes</key>
|
||||
<false/>
|
||||
<key>SUPublicDSAKeyFile</key>
|
||||
|
||||
37
cmake/modules/SanitizerFlags.cmake
Normal file
37
cmake/modules/SanitizerFlags.cmake
Normal file
@@ -0,0 +1,37 @@
|
||||
# Enable address sanitizer (gcc/clang only)
|
||||
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
|
||||
set(SANITIZERS)
|
||||
set(SANITIZER_EXTRA_FLAGS " -g")
|
||||
|
||||
macro(add_sanitizer_option variable flag help)
|
||||
option(${variable} "Enable ${help}" OFF)
|
||||
if(${variable})
|
||||
list(APPEND SANITIZERS ${flag})
|
||||
string(REPLACE ";" " " optional_args "${ARGN}")
|
||||
if(optional_args)
|
||||
string(APPEND SANITIZER_EXTRA_FLAGS " ${optional_args}")
|
||||
endif()
|
||||
endif()
|
||||
mark_as_advanced(${variable})
|
||||
endmacro()
|
||||
|
||||
add_sanitizer_option(SANITIZE_ADDRESS "address"
|
||||
"AddressSanitizer (detects memory violations, buffer overflows, memory leaks)")
|
||||
add_sanitizer_option(SANITIZE_LEAK "leak"
|
||||
"standalone LeakSanitizer (detects memory leaks only)")
|
||||
add_sanitizer_option(SANITIZE_MEMORY "memory"
|
||||
"MemorySanitizer (detects reads in uninitialized memory)")
|
||||
add_sanitizer_option(SANITIZE_UNDEFINED "undefined"
|
||||
"UndefinedBehaviorSanitizer (detects undefined behavior)"
|
||||
"-fno-sanitize=vptr")
|
||||
add_sanitizer_option(SANITIZE_THREAD "thread"
|
||||
"ThreadSanitizer (detects data races)")
|
||||
|
||||
if(SANITIZERS)
|
||||
string(REPLACE ";" "," SANITIZER_FLAGS "${SANITIZERS}")
|
||||
set(SANITIZER_FLAGS "-fsanitize=${SANITIZER_FLAGS}${SANITIZER_EXTRA_FLAGS}")
|
||||
string(APPEND CMAKE_CXX_FLAGS " ${SANITIZER_FLAGS}")
|
||||
string(APPEND CMAKE_C_FLAGS " ${SANITIZER_FLAGS}")
|
||||
string(APPEND CMAKE_EXE_LINKER_FLAGS " ${SANITIZER_FLAGS}")
|
||||
endif()
|
||||
endif()
|
||||
@@ -8,12 +8,12 @@
|
||||
#cmakedefine CRASHREPORTER_EXECUTABLE "@CRASHREPORTER_EXECUTABLE@"
|
||||
#define SOCKETAPI_TEAM_IDENTIFIER_PREFIX "@SOCKETAPI_TEAM_IDENTIFIER_PREFIX@"
|
||||
|
||||
#cmakedefine APPLICATION_DOMAIN @APPLICATION_DOMAIN@
|
||||
#cmakedefine THEME_CLASS @THEME_CLASS@
|
||||
#cmakedefine THEME_INCLUDE @THEME_INCLUDE@
|
||||
|
||||
#cmakedefine APPLICATION_NAME "@APPLICATION_NAME@"
|
||||
#cmakedefine APPLICATION_VENDOR "@APPLICATION_VENDOR@"
|
||||
#cmakedefine APPLICATION_DOMAIN "@APPLICATION_DOMAIN@"
|
||||
#cmakedefine APPLICATION_REV_DOMAIN "@APPLICATION_REV_DOMAIN@"
|
||||
#cmakedefine APPLICATION_SHORTNAME "@APPLICATION_SHORTNAME@"
|
||||
#cmakedefine APPLICATION_EXECUTABLE "@APPLICATION_EXECUTABLE@"
|
||||
@@ -21,6 +21,7 @@
|
||||
#cmakedefine APPLICATION_HELP_URL "@APPLICATION_HELP_URL@"
|
||||
#cmakedefine APPLICATION_ICON_NAME "@APPLICATION_ICON_NAME@"
|
||||
#cmakedefine APPLICATION_SERVER_URL "@APPLICATION_SERVER_URL@"
|
||||
#cmakedefine LINUX_APPLICATION_ID "@LINUX_APPLICATION_ID@"
|
||||
#cmakedefine APPLICATION_WIZARD_HEADER_BACKGROUND_COLOR "@APPLICATION_WIZARD_HEADER_BACKGROUND_COLOR@"
|
||||
#cmakedefine APPLICATION_WIZARD_HEADER_TITLE_COLOR "@APPLICATION_WIZARD_HEADER_TITLE_COLOR@"
|
||||
#cmakedefine APPLICATION_WIZARD_USE_CUSTOM_LOGO "@APPLICATION_WIZARD_USE_CUSTOM_LOGO@"
|
||||
|
||||
@@ -36,8 +36,7 @@ System Requirements
|
||||
- openSUSE Leap 42.2 & 42.3
|
||||
|
||||
.. note::
|
||||
For Linux distributions, we support, if technically feasible, the latest 2 versions per platform and the previous `LTS`_.
|
||||
>>>>>>> b2da03441... update supported linux platforms
|
||||
For Linux distributions, we support, if technically feasible, the latest 2 versions per platform and the previous LTS.
|
||||
|
||||
Installation Wizard
|
||||
-------------------
|
||||
|
||||
@@ -93,6 +93,7 @@ public:
|
||||
|
||||
auto menuaction = new QAction(parentWidget);
|
||||
menuaction->setText(helper->contextMenuTitle());
|
||||
menuaction->setIcon(QIcon::fromTheme(helper->contextMenuIconName()));
|
||||
menuaction->setMenu(menu);
|
||||
return { menuaction };
|
||||
}
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
#include <QStandardPaths>
|
||||
#include <QFile>
|
||||
#include "ownclouddolphinpluginhelper.h"
|
||||
#include "config.h"
|
||||
|
||||
OwncloudDolphinPluginHelper* OwncloudDolphinPluginHelper::instance()
|
||||
{
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <QLocalSocket>
|
||||
#include <QRegularExpression>
|
||||
#include "ownclouddolphinpluginhelper_export.h"
|
||||
#include "config.h"
|
||||
|
||||
class OWNCLOUDDOLPHINPLUGINHELPER_EXPORT OwncloudDolphinPluginHelper : public QObject {
|
||||
Q_OBJECT
|
||||
@@ -35,12 +36,16 @@ public:
|
||||
|
||||
QString contextMenuTitle() const
|
||||
{
|
||||
return _strings.value("CONTEXT_MENU_TITLE", "Nextcloud");
|
||||
return _strings.value("CONTEXT_MENU_TITLE", APPLICATION_NAME);
|
||||
}
|
||||
QString shareActionTitle() const
|
||||
{
|
||||
return _strings.value("SHARE_MENU_TITLE", "Share …");
|
||||
}
|
||||
QString contextMenuIconName() const
|
||||
{
|
||||
return _strings.value("CONTEXT_MENU_ICON", APPLICATION_ICON_NAME);
|
||||
}
|
||||
|
||||
QString copyPrivateLinkTitle() const { return _strings["COPY_PRIVATE_LINK_MENU_TITLE"]; }
|
||||
QString emailPrivateLinkTitle() const { return _strings["EMAIL_PRIVATE_LINK_MENU_TITLE"]; }
|
||||
|
||||
@@ -191,11 +191,12 @@ class MenuExtension(GObject.GObject, Nautilus.MenuProvider):
|
||||
def check_registered_paths(self, filename):
|
||||
topLevelFolder = False
|
||||
internalFile = False
|
||||
absfilename = os.path.realpath(filename)
|
||||
for reg_path in socketConnect.registered_paths:
|
||||
if filename == reg_path:
|
||||
if absfilename == reg_path:
|
||||
topLevelFolder = True
|
||||
break
|
||||
if filename.startswith(reg_path):
|
||||
if absfilename.startswith(reg_path):
|
||||
internalFile = True
|
||||
# you can't have a registered path below another so it is save to break here
|
||||
break
|
||||
@@ -208,6 +209,7 @@ class MenuExtension(GObject.GObject, Nautilus.MenuProvider):
|
||||
all_internal_files = True
|
||||
for i, file_uri in enumerate(files):
|
||||
filename = get_local_path(file_uri.get_uri())
|
||||
filename = os.path.realpath(filename)
|
||||
|
||||
# Check if its a folder (ends with an /), if yes add a "/"
|
||||
# otherwise it will not find the entry in the table
|
||||
@@ -296,6 +298,7 @@ class MenuExtension(GObject.GObject, Nautilus.MenuProvider):
|
||||
state = entry['state']
|
||||
state_ok = state.startswith('OK')
|
||||
state_sync = state.startswith('SYNC')
|
||||
isDir = os.path.isdir(filename + os.sep)
|
||||
if state_ok:
|
||||
shareable = True
|
||||
elif state_sync and isDir:
|
||||
@@ -446,6 +449,7 @@ class SyncStateExtension(GObject.GObject, Nautilus.InfoProvider):
|
||||
return
|
||||
|
||||
filename = get_local_path(item.get_uri())
|
||||
filename = os.path.realpath(filename)
|
||||
if item.is_directory():
|
||||
filename += os.sep
|
||||
|
||||
|
||||
@@ -81,14 +81,14 @@ IFACEMETHODIMP OCContextMenu::Initialize(
|
||||
return E_INVALIDARG;
|
||||
}
|
||||
|
||||
FORMATETC fe = { CF_HDROP, NULL, DVASPECT_CONTENT, -1, TYMED_HGLOBAL };
|
||||
FORMATETC fe = { CF_HDROP, nullptr, DVASPECT_CONTENT, -1, TYMED_HGLOBAL };
|
||||
STGMEDIUM stm;
|
||||
|
||||
if (SUCCEEDED(pDataObj->GetData(&fe, &stm))) {
|
||||
// Get an HDROP handle.
|
||||
HDROP hDrop = static_cast<HDROP>(GlobalLock(stm.hGlobal));
|
||||
if (hDrop) {
|
||||
UINT nFiles = DragQueryFile(hDrop, 0xFFFFFFFF, NULL, 0);
|
||||
UINT nFiles = DragQueryFile(hDrop, 0xFFFFFFFF, nullptr, 0);
|
||||
for (UINT i = 0; i < nFiles; ++i) {
|
||||
// Get the path of the file.
|
||||
wchar_t buffer[MAX_PATH];
|
||||
@@ -182,20 +182,38 @@ IFACEMETHODIMP OCContextMenu::InvokeCommand(LPCMINVOKECOMMANDINFO pici)
|
||||
{
|
||||
std::wstring command;
|
||||
|
||||
CMINVOKECOMMANDINFOEX *piciEx = nullptr;
|
||||
if (pici->cbSize == sizeof(CMINVOKECOMMANDINFOEX))
|
||||
piciEx = (CMINVOKECOMMANDINFOEX*)pici;
|
||||
|
||||
// For the Unicode case, if the high-order word is not zero, the
|
||||
// command's verb string is in lpcmi->lpVerbW.
|
||||
if (HIWORD(((CMINVOKECOMMANDINFOEX*)pici)->lpVerbW))
|
||||
{
|
||||
command = ((CMINVOKECOMMANDINFOEX *)pici)->lpVerbW;
|
||||
} else {
|
||||
if (piciEx
|
||||
&& (piciEx->fMask & CMIC_MASK_UNICODE)
|
||||
&& HIWORD(((CMINVOKECOMMANDINFOEX*)pici)->lpVerbW)) {
|
||||
|
||||
command = piciEx->lpVerbW;
|
||||
|
||||
// Verify that we handle the verb
|
||||
bool handled = false;
|
||||
for (auto &item : m_info.menuItems) {
|
||||
if (item.command == command) {
|
||||
handled = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!handled)
|
||||
return E_FAIL;
|
||||
} else if (IS_INTRESOURCE(pici->lpVerb)) {
|
||||
// If the command cannot be identified through the verb string, then
|
||||
// check the identifier offset.
|
||||
|
||||
auto offset = LOWORD(pici->lpVerb);
|
||||
if (offset >= m_info.menuItems.size())
|
||||
return E_FAIL;
|
||||
|
||||
command = m_info.menuItems[offset].command;
|
||||
} else {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
OCClientInterface::SendRequest(command.data(), m_selectedFiles);
|
||||
|
||||
@@ -65,7 +65,7 @@ IFACEMETHODIMP OCContextMenuFactory::CreateInstance(IUnknown *pUnkOuter, REFIID
|
||||
HRESULT hr = CLASS_E_NOAGGREGATION;
|
||||
|
||||
// pUnkOuter is used for aggregation. We do not support it in the sample.
|
||||
if (pUnkOuter == NULL) {
|
||||
if (!pUnkOuter) {
|
||||
hr = E_OUTOFMEMORY;
|
||||
|
||||
// Create the COM component.
|
||||
@@ -88,4 +88,4 @@ IFACEMETHODIMP OCContextMenuFactory::LockServer(BOOL fLock)
|
||||
InterlockedDecrement(&g_cDllRef);
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,16 +24,16 @@ namespace {
|
||||
HRESULT SetHKCRRegistryKeyAndValue(PCWSTR pszSubKey, PCWSTR pszValueName, PCWSTR pszData)
|
||||
{
|
||||
HRESULT hr;
|
||||
HKEY hKey = NULL;
|
||||
HKEY hKey = nullptr;
|
||||
|
||||
// Creates the specified registry key. If the key already exists, the
|
||||
// function opens it.
|
||||
hr = HRESULT_FROM_WIN32(RegCreateKeyEx(HKEY_CLASSES_ROOT, pszSubKey, 0,
|
||||
NULL, REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &hKey, NULL));
|
||||
nullptr, REG_OPTION_NON_VOLATILE, KEY_WRITE, nullptr, &hKey, nullptr));
|
||||
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
if (pszData != NULL)
|
||||
if (pszData)
|
||||
{
|
||||
// Set the specified value of the key.
|
||||
DWORD cbData = lstrlen(pszData) * sizeof(*pszData);
|
||||
@@ -50,7 +50,7 @@ HRESULT SetHKCRRegistryKeyAndValue(PCWSTR pszSubKey, PCWSTR pszValueName, PCWSTR
|
||||
HRESULT GetHKCRRegistryKeyAndValue(PCWSTR pszSubKey, PCWSTR pszValueName, PWSTR pszData, DWORD cbData)
|
||||
{
|
||||
HRESULT hr;
|
||||
HKEY hKey = NULL;
|
||||
HKEY hKey = nullptr;
|
||||
|
||||
// Try to open the specified registry key.
|
||||
hr = HRESULT_FROM_WIN32(RegOpenKeyEx(HKEY_CLASSES_ROOT, pszSubKey, 0,
|
||||
@@ -59,8 +59,8 @@ HRESULT GetHKCRRegistryKeyAndValue(PCWSTR pszSubKey, PCWSTR pszValueName, PWSTR
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
// Get the data for the specified value name.
|
||||
hr = HRESULT_FROM_WIN32(RegQueryValueEx(hKey, pszValueName, NULL,
|
||||
NULL, reinterpret_cast<LPBYTE>(pszData), &cbData));
|
||||
hr = HRESULT_FROM_WIN32(RegQueryValueEx(hKey, pszValueName, nullptr,
|
||||
nullptr, reinterpret_cast<LPBYTE>(pszData), &cbData));
|
||||
|
||||
RegCloseKey(hKey);
|
||||
}
|
||||
@@ -72,7 +72,7 @@ HRESULT GetHKCRRegistryKeyAndValue(PCWSTR pszSubKey, PCWSTR pszValueName, PWSTR
|
||||
|
||||
HRESULT OCContextMenuRegHandler::RegisterInprocServer(PCWSTR pszModule, const CLSID& clsid, PCWSTR pszFriendlyName, PCWSTR pszThreadModel)
|
||||
{
|
||||
if (pszModule == NULL || pszThreadModel == NULL)
|
||||
if (!pszModule || !pszThreadModel)
|
||||
{
|
||||
return E_INVALIDARG;
|
||||
}
|
||||
@@ -88,7 +88,7 @@ HRESULT OCContextMenuRegHandler::RegisterInprocServer(PCWSTR pszModule, const CL
|
||||
hr = StringCchPrintf(szSubkey, ARRAYSIZE(szSubkey), L"CLSID\\%s", szCLSID);
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
hr = SetHKCRRegistryKeyAndValue(szSubkey, NULL, pszFriendlyName);
|
||||
hr = SetHKCRRegistryKeyAndValue(szSubkey, nullptr, pszFriendlyName);
|
||||
|
||||
// Create the HKCR\CLSID\{<CLSID>}\InprocServer32 key.
|
||||
if (SUCCEEDED(hr))
|
||||
@@ -99,7 +99,7 @@ HRESULT OCContextMenuRegHandler::RegisterInprocServer(PCWSTR pszModule, const CL
|
||||
{
|
||||
// Set the default value of the InprocServer32 key to the
|
||||
// path of the COM module.
|
||||
hr = SetHKCRRegistryKeyAndValue(szSubkey, NULL, pszModule);
|
||||
hr = SetHKCRRegistryKeyAndValue(szSubkey, nullptr, pszModule);
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
// Set the threading model of the component.
|
||||
@@ -136,7 +136,7 @@ HRESULT OCContextMenuRegHandler::UnregisterInprocServer(const CLSID& clsid)
|
||||
HRESULT OCContextMenuRegHandler::RegisterShellExtContextMenuHandler(
|
||||
PCWSTR pszFileType, const CLSID& clsid, PCWSTR pszFriendlyName)
|
||||
{
|
||||
if (pszFileType == NULL)
|
||||
if (!pszFileType)
|
||||
{
|
||||
return E_INVALIDARG;
|
||||
}
|
||||
@@ -154,7 +154,7 @@ HRESULT OCContextMenuRegHandler::RegisterShellExtContextMenuHandler(
|
||||
if (*pszFileType == L'.')
|
||||
{
|
||||
wchar_t szDefaultVal[260];
|
||||
hr = GetHKCRRegistryKeyAndValue(pszFileType, NULL, szDefaultVal,
|
||||
hr = GetHKCRRegistryKeyAndValue(pszFileType, nullptr, szDefaultVal,
|
||||
sizeof(szDefaultVal));
|
||||
|
||||
// If the key exists and its default value is not empty, use the
|
||||
@@ -171,7 +171,7 @@ HRESULT OCContextMenuRegHandler::RegisterShellExtContextMenuHandler(
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
// Set the default value of the key.
|
||||
hr = SetHKCRRegistryKeyAndValue(szSubkey, NULL, szCLSID);
|
||||
hr = SetHKCRRegistryKeyAndValue(szSubkey, nullptr, szCLSID);
|
||||
}
|
||||
|
||||
return hr;
|
||||
@@ -180,7 +180,7 @@ HRESULT OCContextMenuRegHandler::RegisterShellExtContextMenuHandler(
|
||||
HRESULT OCContextMenuRegHandler::UnregisterShellExtContextMenuHandler(
|
||||
PCWSTR pszFileType, PCWSTR pszFriendlyName)
|
||||
{
|
||||
if (pszFileType == NULL)
|
||||
if (!pszFileType)
|
||||
{
|
||||
return E_INVALIDARG;
|
||||
}
|
||||
@@ -195,7 +195,7 @@ HRESULT OCContextMenuRegHandler::UnregisterShellExtContextMenuHandler(
|
||||
if (*pszFileType == L'.')
|
||||
{
|
||||
wchar_t szDefaultVal[260];
|
||||
hr = GetHKCRRegistryKeyAndValue(pszFileType, NULL, szDefaultVal,
|
||||
hr = GetHKCRRegistryKeyAndValue(pszFileType, nullptr, szDefaultVal,
|
||||
sizeof(szDefaultVal));
|
||||
|
||||
// If the key exists and its default value is not empty, use the
|
||||
@@ -215,4 +215,4 @@ HRESULT OCContextMenuRegHandler::UnregisterShellExtContextMenuHandler(
|
||||
}
|
||||
|
||||
return hr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,8 +58,8 @@ HRESULT RegDelnodeRecurse(HKEY hKeyRoot, LPTSTR lpSubKey)
|
||||
// Enumerate the keys
|
||||
|
||||
dwSize = MAX_PATH;
|
||||
lResult = RegEnumKeyEx(hKey, 0, szName, &dwSize, NULL,
|
||||
NULL, NULL, &ftWrite);
|
||||
lResult = RegEnumKeyEx(hKey, 0, szName, &dwSize, nullptr,
|
||||
nullptr, nullptr, &ftWrite);
|
||||
|
||||
if (lResult == ERROR_SUCCESS)
|
||||
{
|
||||
@@ -73,8 +73,8 @@ HRESULT RegDelnodeRecurse(HKEY hKeyRoot, LPTSTR lpSubKey)
|
||||
|
||||
dwSize = MAX_PATH;
|
||||
|
||||
lResult = RegEnumKeyEx(hKey, 0, szName, &dwSize, NULL,
|
||||
NULL, NULL, &ftWrite);
|
||||
lResult = RegEnumKeyEx(hKey, 0, szName, &dwSize, nullptr,
|
||||
nullptr, nullptr, &ftWrite);
|
||||
|
||||
} while (lResult == ERROR_SUCCESS);
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
// {841A0AAD-AA11-4B50-84D9-7F8E727D77D7}
|
||||
static const GUID CLSID_FileContextMenuExt = { 0x841a0aad, 0xaa11, 0x4b50, { 0x84, 0xd9, 0x7f, 0x8e, 0x72, 0x7d, 0x77, 0xd7 } };
|
||||
|
||||
HINSTANCE g_hInst = NULL;
|
||||
HINSTANCE g_hInst = nullptr;
|
||||
long g_cDllRef = 0;
|
||||
|
||||
BOOL APIENTRY DllMain(HMODULE hModule, DWORD dwReason, LPVOID lpReserved)
|
||||
@@ -105,4 +105,4 @@ STDAPI DllUnregisterServer(void)
|
||||
}
|
||||
|
||||
return hr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#include "OCOverlayRegistrationHandler.h"
|
||||
#include "OCOverlayFactory.h"
|
||||
|
||||
HINSTANCE instanceHandle = NULL;
|
||||
HINSTANCE instanceHandle = nullptr;
|
||||
|
||||
long dllReferenceCount = 0;
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ IFACEMETHODIMP OCOverlay::QueryInterface(REFIID riid, void **ppv)
|
||||
else
|
||||
{
|
||||
hr = E_NOINTERFACE;
|
||||
*ppv = NULL;
|
||||
*ppv = nullptr;
|
||||
}
|
||||
|
||||
if (*ppv)
|
||||
|
||||
@@ -43,7 +43,7 @@ IFACEMETHODIMP OCOverlayFactory::QueryInterface(REFIID riid, void **ppv)
|
||||
else
|
||||
{
|
||||
hResult = E_NOINTERFACE;
|
||||
*ppv = NULL;
|
||||
*ppv = nullptr;
|
||||
}
|
||||
|
||||
return hResult;
|
||||
@@ -70,7 +70,7 @@ IFACEMETHODIMP OCOverlayFactory::CreateInstance(
|
||||
{
|
||||
HRESULT hResult = CLASS_E_NOAGGREGATION;
|
||||
|
||||
if (pUnkOuter != NULL) { return hResult; }
|
||||
if (pUnkOuter) { return hResult; }
|
||||
|
||||
hResult = E_OUTOFMEMORY;
|
||||
OCOverlay *lrOverlay = new (std::nothrow) OCOverlay(_state);
|
||||
@@ -90,4 +90,4 @@ IFACEMETHODIMP OCOverlayFactory::LockServer(BOOL fLock)
|
||||
InterlockedDecrement(&dllReferenceCount);
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,9 +24,9 @@ using namespace std;
|
||||
HRESULT OCOverlayRegistrationHandler::MakeRegistryEntries(const CLSID& clsid, PCWSTR friendlyName)
|
||||
{
|
||||
HRESULT hResult;
|
||||
HKEY shellOverlayKey = NULL;
|
||||
HKEY shellOverlayKey = nullptr;
|
||||
// the key may not exist yet
|
||||
hResult = HRESULT_FROM_WIN32(RegCreateKeyEx(HKEY_LOCAL_MACHINE, REGISTRY_OVERLAY_KEY, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &shellOverlayKey, NULL));
|
||||
hResult = HRESULT_FROM_WIN32(RegCreateKeyEx(HKEY_LOCAL_MACHINE, REGISTRY_OVERLAY_KEY, 0, nullptr, REG_OPTION_NON_VOLATILE, KEY_WRITE, nullptr, &shellOverlayKey, nullptr));
|
||||
if (!SUCCEEDED(hResult)) {
|
||||
hResult = RegCreateKey(HKEY_LOCAL_MACHINE, REGISTRY_OVERLAY_KEY, &shellOverlayKey);
|
||||
if(!SUCCEEDED(hResult)) {
|
||||
@@ -34,8 +34,8 @@ HRESULT OCOverlayRegistrationHandler::MakeRegistryEntries(const CLSID& clsid, PC
|
||||
}
|
||||
}
|
||||
|
||||
HKEY syncExOverlayKey = NULL;
|
||||
hResult = HRESULT_FROM_WIN32(RegCreateKeyEx(shellOverlayKey, friendlyName, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &syncExOverlayKey, NULL));
|
||||
HKEY syncExOverlayKey = nullptr;
|
||||
hResult = HRESULT_FROM_WIN32(RegCreateKeyEx(shellOverlayKey, friendlyName, 0, nullptr, REG_OPTION_NON_VOLATILE, KEY_WRITE, nullptr, &syncExOverlayKey, nullptr));
|
||||
|
||||
if (!SUCCEEDED(hResult)) {
|
||||
return hResult;
|
||||
@@ -44,7 +44,7 @@ HRESULT OCOverlayRegistrationHandler::MakeRegistryEntries(const CLSID& clsid, PC
|
||||
wchar_t stringCLSID[MAX_PATH];
|
||||
StringFromGUID2(clsid, stringCLSID, ARRAYSIZE(stringCLSID));
|
||||
LPCTSTR value = stringCLSID;
|
||||
hResult = RegSetValueEx(syncExOverlayKey, NULL, 0, REG_SZ, (LPBYTE)value, (DWORD)((wcslen(value)+1) * sizeof(TCHAR)));
|
||||
hResult = RegSetValueEx(syncExOverlayKey, nullptr, 0, REG_SZ, (LPBYTE)value, (DWORD)((wcslen(value)+1) * sizeof(TCHAR)));
|
||||
if (!SUCCEEDED(hResult)) {
|
||||
return hResult;
|
||||
}
|
||||
@@ -55,14 +55,14 @@ HRESULT OCOverlayRegistrationHandler::MakeRegistryEntries(const CLSID& clsid, PC
|
||||
HRESULT OCOverlayRegistrationHandler::RemoveRegistryEntries(PCWSTR friendlyName)
|
||||
{
|
||||
HRESULT hResult;
|
||||
HKEY shellOverlayKey = NULL;
|
||||
HKEY shellOverlayKey = nullptr;
|
||||
hResult = HRESULT_FROM_WIN32(RegOpenKeyEx(HKEY_LOCAL_MACHINE, REGISTRY_OVERLAY_KEY, 0, KEY_WRITE, &shellOverlayKey));
|
||||
|
||||
if (!SUCCEEDED(hResult)) {
|
||||
return hResult;
|
||||
}
|
||||
|
||||
HKEY syncExOverlayKey = NULL;
|
||||
HKEY syncExOverlayKey = nullptr;
|
||||
hResult = HRESULT_FROM_WIN32(RegDeleteKey(shellOverlayKey, friendlyName));
|
||||
if (!SUCCEEDED(hResult)) {
|
||||
return hResult;
|
||||
@@ -73,35 +73,35 @@ HRESULT OCOverlayRegistrationHandler::RemoveRegistryEntries(PCWSTR friendlyName)
|
||||
|
||||
HRESULT OCOverlayRegistrationHandler::RegisterCOMObject(PCWSTR modulePath, PCWSTR friendlyName, const CLSID& clsid)
|
||||
{
|
||||
if (modulePath == NULL) {
|
||||
if (!modulePath) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
wchar_t stringCLSID[MAX_PATH];
|
||||
StringFromGUID2(clsid, stringCLSID, ARRAYSIZE(stringCLSID));
|
||||
HRESULT hResult;
|
||||
HKEY hKey = NULL;
|
||||
HKEY hKey = nullptr;
|
||||
|
||||
hResult = HRESULT_FROM_WIN32(RegOpenKeyEx(HKEY_CLASSES_ROOT, REGISTRY_CLSID, 0, KEY_WRITE, &hKey));
|
||||
if (!SUCCEEDED(hResult)) {
|
||||
return hResult;
|
||||
}
|
||||
|
||||
HKEY clsidKey = NULL;
|
||||
hResult = HRESULT_FROM_WIN32(RegCreateKeyEx(hKey, stringCLSID, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &clsidKey, NULL));
|
||||
HKEY clsidKey = nullptr;
|
||||
hResult = HRESULT_FROM_WIN32(RegCreateKeyEx(hKey, stringCLSID, 0, nullptr, REG_OPTION_NON_VOLATILE, KEY_WRITE, nullptr, &clsidKey, nullptr));
|
||||
if(!SUCCEEDED(hResult)) {
|
||||
return hResult;
|
||||
}
|
||||
|
||||
hResult = HRESULT_FROM_WIN32(RegSetValue(clsidKey, NULL, REG_SZ, friendlyName, (DWORD) wcslen(friendlyName)));
|
||||
hResult = HRESULT_FROM_WIN32(RegSetValue(clsidKey, nullptr, REG_SZ, friendlyName, (DWORD) wcslen(friendlyName)));
|
||||
|
||||
HKEY inprocessKey = NULL;
|
||||
hResult = HRESULT_FROM_WIN32(RegCreateKeyEx(clsidKey, REGISTRY_IN_PROCESS, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &inprocessKey, NULL));
|
||||
HKEY inprocessKey = nullptr;
|
||||
hResult = HRESULT_FROM_WIN32(RegCreateKeyEx(clsidKey, REGISTRY_IN_PROCESS, 0, nullptr, REG_OPTION_NON_VOLATILE, KEY_WRITE, nullptr, &inprocessKey, nullptr));
|
||||
if(!SUCCEEDED(hResult)) {
|
||||
return hResult;
|
||||
}
|
||||
|
||||
hResult = HRESULT_FROM_WIN32(RegSetValue(inprocessKey, NULL, REG_SZ, modulePath, (DWORD) wcslen(modulePath)));
|
||||
hResult = HRESULT_FROM_WIN32(RegSetValue(inprocessKey, nullptr, REG_SZ, modulePath, (DWORD) wcslen(modulePath)));
|
||||
|
||||
if(!SUCCEEDED(hResult)) {
|
||||
return hResult;
|
||||
@@ -126,13 +126,13 @@ HRESULT OCOverlayRegistrationHandler::UnregisterCOMObject(const CLSID& clsid)
|
||||
|
||||
StringFromGUID2(clsid, stringCLSID, ARRAYSIZE(stringCLSID));
|
||||
HRESULT hResult;
|
||||
HKEY hKey = NULL;
|
||||
HKEY hKey = nullptr;
|
||||
hResult = HRESULT_FROM_WIN32(RegOpenKeyEx(HKEY_CLASSES_ROOT, REGISTRY_CLSID, 0, DELETE, &hKey));
|
||||
if (!SUCCEEDED(hResult)) {
|
||||
return hResult;
|
||||
}
|
||||
|
||||
HKEY clsidKey = NULL;
|
||||
HKEY clsidKey = nullptr;
|
||||
hResult = HRESULT_FROM_WIN32(RegOpenKeyEx(hKey, stringCLSID, 0, DELETE, &clsidKey));
|
||||
if(!SUCCEEDED(hResult)) {
|
||||
return hResult;
|
||||
@@ -149,4 +149,4 @@ HRESULT OCOverlayRegistrationHandler::UnregisterCOMObject(const CLSID& clsid)
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ bool CommunicationSocket::Close()
|
||||
|
||||
bool CommunicationSocket::Connect(const std::wstring &pipename)
|
||||
{
|
||||
_pipe = CreateFile(pipename.data(), GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);
|
||||
_pipe = CreateFile(pipename.data(), GENERIC_READ | GENERIC_WRITE, 0, nullptr, OPEN_EXISTING, 0, nullptr);
|
||||
|
||||
if (_pipe == INVALID_HANDLE_VALUE) {
|
||||
return false;
|
||||
@@ -87,7 +87,7 @@ bool CommunicationSocket::SendMsg(const wchar_t* message) const
|
||||
auto utf8_msg = StringUtil::toUtf8(message);
|
||||
|
||||
DWORD numBytesWritten = 0;
|
||||
auto result = WriteFile( _pipe, utf8_msg.c_str(), DWORD(utf8_msg.size()), &numBytesWritten, NULL);
|
||||
auto result = WriteFile( _pipe, utf8_msg.c_str(), DWORD(utf8_msg.size()), &numBytesWritten, nullptr);
|
||||
|
||||
if (result) {
|
||||
return true;
|
||||
@@ -123,7 +123,7 @@ bool CommunicationSocket::ReadLine(wstring* response)
|
||||
DWORD numBytesRead = 0;
|
||||
DWORD totalBytesAvailable = 0;
|
||||
|
||||
if (!PeekNamedPipe(_pipe, NULL, 0, 0, &totalBytesAvailable, 0)) {
|
||||
if (!PeekNamedPipe(_pipe, nullptr, 0, 0, &totalBytesAvailable, 0)) {
|
||||
Close();
|
||||
return false;
|
||||
}
|
||||
@@ -131,7 +131,7 @@ bool CommunicationSocket::ReadLine(wstring* response)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!ReadFile(_pipe, resp_utf8.data(), DWORD(resp_utf8.size()), &numBytesRead, NULL)) {
|
||||
if (!ReadFile(_pipe, resp_utf8.data(), DWORD(resp_utf8.size()), &numBytesRead, nullptr)) {
|
||||
Close();
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -39,9 +39,9 @@ bool FileUtil::IsChildFile(const wchar_t* rootFolder, vector<wstring>* files)
|
||||
|
||||
bool FileUtil::IsChildFile(const wchar_t* rootFolder, const wchar_t* file)
|
||||
{
|
||||
wstring* f = new wstring(file);
|
||||
const wstring f(file);
|
||||
|
||||
size_t found = f->find(rootFolder);
|
||||
size_t found = f.find(rootFolder);
|
||||
|
||||
if(found != string::npos)
|
||||
{
|
||||
@@ -83,4 +83,4 @@ bool FileUtil::IsChildFileOfRoot(const wchar_t* filePath)
|
||||
|
||||
delete rootFolder;
|
||||
return needed;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,9 +38,9 @@ bool RegistryUtil::ReadRegistry(const wchar_t* key, const wchar_t* name, wstring
|
||||
{
|
||||
HRESULT hResult;
|
||||
|
||||
HKEY rootKey = NULL;
|
||||
HKEY rootKey = nullptr;
|
||||
|
||||
hResult = HRESULT_FROM_WIN32(RegOpenKeyEx(HKEY_CURRENT_USER, (LPCWSTR)key, NULL, KEY_READ, &rootKey));
|
||||
hResult = HRESULT_FROM_WIN32(RegOpenKeyEx(HKEY_CURRENT_USER, (LPCWSTR)key, 0, KEY_READ, &rootKey));
|
||||
|
||||
if(!SUCCEEDED(hResult))
|
||||
{
|
||||
@@ -49,8 +49,8 @@ bool RegistryUtil::ReadRegistry(const wchar_t* key, const wchar_t* name, wstring
|
||||
|
||||
wchar_t value[SIZE];
|
||||
DWORD value_length = SIZE;
|
||||
|
||||
hResult = RegQueryValueEx(rootKey, (LPCWSTR)name, NULL, NULL, (LPBYTE)value, &value_length );
|
||||
|
||||
hResult = RegQueryValueEx(rootKey, (LPCWSTR)name, nullptr, nullptr, (LPBYTE)value, &value_length );
|
||||
|
||||
if(!SUCCEEDED(hResult))
|
||||
{
|
||||
|
||||
@@ -83,7 +83,7 @@ void RemotePathChecker::workerThreadLoop()
|
||||
// We don't keep track of all files and can't know which file is currently visible
|
||||
// to the user, but at least reload the root dir so that any shortcut to the root
|
||||
// is updated without the user needing to refresh.
|
||||
SHChangeNotify(SHCNE_UPDATEDIR, SHCNF_PATH | SHCNF_FLUSHNOWAIT, responsePath.data(), NULL);
|
||||
SHChangeNotify(SHCNE_UPDATEDIR, SHCNF_PATH | SHCNF_FLUSHNOWAIT, responsePath.data(), nullptr);
|
||||
} else if (StringUtil::begins_with(response, wstring(L"UNREGISTER_PATH:"))) {
|
||||
wstring responsePath = response.substr(16); // length of UNREGISTER_PATH:
|
||||
|
||||
@@ -107,7 +107,7 @@ void RemotePathChecker::workerThreadLoop()
|
||||
}
|
||||
}
|
||||
for (auto& path : removedPaths)
|
||||
SHChangeNotify(SHCNE_UPDATEITEM, SHCNF_PATH | SHCNF_FLUSHNOWAIT, path.data(), NULL);
|
||||
SHChangeNotify(SHCNE_UPDATEITEM, SHCNF_PATH | SHCNF_FLUSHNOWAIT, path.data(), nullptr);
|
||||
} else if (StringUtil::begins_with(response, wstring(L"STATUS:")) ||
|
||||
StringUtil::begins_with(response, wstring(L"BROADCAST:"))) {
|
||||
|
||||
@@ -135,7 +135,7 @@ void RemotePathChecker::workerThreadLoop()
|
||||
it->second = state;
|
||||
}
|
||||
if (updateView) {
|
||||
SHChangeNotify(SHCNE_UPDATEITEM, SHCNF_PATH | SHCNF_FLUSHNOWAIT, responsePath.data(), NULL);
|
||||
SHChangeNotify(SHCNE_UPDATEITEM, SHCNF_PATH | SHCNF_FLUSHNOWAIT, responsePath.data(), nullptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -151,7 +151,7 @@ void RemotePathChecker::workerThreadLoop()
|
||||
lock.unlock();
|
||||
// Let explorer know about each invalidated cache entry that needs to get its icon removed.
|
||||
for (auto it = cache.begin(); it != cache.end(); ++it) {
|
||||
SHChangeNotify(SHCNE_UPDATEITEM, SHCNF_PATH | SHCNF_FLUSHNOWAIT, it->first.data(), NULL);
|
||||
SHChangeNotify(SHCNE_UPDATEITEM, SHCNF_PATH | SHCNF_FLUSHNOWAIT, it->first.data(), nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -168,7 +168,7 @@ RemotePathChecker::RemotePathChecker()
|
||||
: _stop(false)
|
||||
, _watchedDirectories(make_shared<const vector<wstring>>())
|
||||
, _connected(false)
|
||||
, _newQueries(CreateEvent(NULL, FALSE, FALSE, NULL))
|
||||
, _newQueries(CreateEvent(nullptr, FALSE, FALSE, nullptr))
|
||||
, _thread([this]{ this->workerThreadLoop(); })
|
||||
{
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ void QProgressIndicator::setColor(const QColor & color)
|
||||
|
||||
QSize QProgressIndicator::sizeHint() const
|
||||
{
|
||||
return QSize(20,20);
|
||||
return {20, 20};
|
||||
}
|
||||
|
||||
int QProgressIndicator::heightForWidth(int w) const
|
||||
|
||||
@@ -94,7 +94,7 @@ bool QtLockedFile::lock(LockMode mode, bool block)
|
||||
QString mut_name = QString::fromLatin1(MUTEX_PREFIX)
|
||||
+ fi.absoluteFilePath().toLower();
|
||||
|
||||
m_mutex_hnd = CreateMutexW(NULL, FALSE, (TCHAR*)mut_name.utf16());
|
||||
m_mutex_hnd = CreateMutexW(nullptr, FALSE, (TCHAR*)mut_name.utf16());
|
||||
|
||||
if (m_mutex_hnd == 0) {
|
||||
qWarning("QtLockedFile::lock(): CreateMutex: %s",
|
||||
@@ -118,7 +118,7 @@ bool QtLockedFile::lock(LockMode mode, bool block)
|
||||
if (res == WAIT_TIMEOUT) {
|
||||
if (i) {
|
||||
// A failed nonblocking rw locking. Undo changes to semaphore.
|
||||
if (ReleaseSemaphore(m_semaphore_hnd, i, NULL) == 0) {
|
||||
if (ReleaseSemaphore(m_semaphore_hnd, i, nullptr) == 0) {
|
||||
qWarning("QtLockedFile::unlock(): ReleaseSemaphore: %s",
|
||||
errorCodeToString(GetLastError()).toLatin1().constData());
|
||||
// Fall through
|
||||
|
||||
@@ -123,7 +123,7 @@ bool QtLocalPeer::sendMessage(const QString &message, int timeout, bool block)
|
||||
Sleep(DWORD(ms));
|
||||
#else
|
||||
struct timespec ts = { ms / 1000, (ms % 1000) * 1000 * 1000 };
|
||||
nanosleep(&ts, NULL);
|
||||
nanosleep(&ts, nullptr);
|
||||
#endif
|
||||
}
|
||||
if (!connOk)
|
||||
|
||||
@@ -53,7 +53,7 @@ static QString instancesLockFilename(const QString &appSessionId)
|
||||
QtSingleApplication::QtSingleApplication(const QString &appId, int &argc, char **argv)
|
||||
: QApplication(argc, argv),
|
||||
firstPeer(-1),
|
||||
pidPeer(0)
|
||||
pidPeer(nullptr)
|
||||
{
|
||||
this->appId = appId;
|
||||
|
||||
@@ -61,7 +61,7 @@ QtSingleApplication::QtSingleApplication(const QString &appId, int &argc, char *
|
||||
|
||||
// This shared memory holds a zero-terminated array of active (or crashed) instances
|
||||
instances = new QSharedMemory(appSessionId, this);
|
||||
actWin = 0;
|
||||
actWin = nullptr;
|
||||
block = false;
|
||||
|
||||
// First instance creates the shared memory, later instances attach to it
|
||||
@@ -71,7 +71,7 @@ QtSingleApplication::QtSingleApplication(const QString &appId, int &argc, char *
|
||||
qWarning() << "Failed to initialize instances shared memory: "
|
||||
<< instances->errorString();
|
||||
delete instances;
|
||||
instances = 0;
|
||||
instances = nullptr;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
4
src/3rdparty/sqlite3/sqlite3.c
vendored
4
src/3rdparty/sqlite3/sqlite3.c
vendored
@@ -70201,7 +70201,7 @@ static int btreeOverwriteContent(
|
||||
){
|
||||
int nData = pX->nData - iOffset;
|
||||
if( nData<=0 ){
|
||||
/* Overwritting with zeros */
|
||||
/* Overwriting with zeros */
|
||||
int i;
|
||||
for(i=0; i<iAmt && pDest[i]==0; i++){}
|
||||
if( i<iAmt ){
|
||||
@@ -91521,7 +91521,7 @@ static int vdbeSorterFlushPMA(VdbeSorter *pSorter){
|
||||
** the background thread from a sub-tasks previous turn is still running,
|
||||
** skip it. If the first (pSorter->nTask-1) sub-tasks are all still busy,
|
||||
** fall back to using the final sub-task. The first (pSorter->nTask-1)
|
||||
** sub-tasks are prefered as they use background threads - the final
|
||||
** sub-tasks are preferred as they use background threads - the final
|
||||
** sub-task uses the main thread. */
|
||||
for(i=0; i<nWorker; i++){
|
||||
int iTest = (pSorter->iPrev + i + 1) % nWorker;
|
||||
|
||||
@@ -52,8 +52,8 @@ include_directories(
|
||||
add_subdirectory(csync)
|
||||
add_subdirectory(libsync)
|
||||
if (NOT BUILD_LIBRARIES_ONLY)
|
||||
add_subdirectory(gui)
|
||||
add_subdirectory(cmd)
|
||||
add_subdirectory(gui)
|
||||
|
||||
if (WITH_CRASHREPORTER)
|
||||
add_subdirectory(3rdparty/libcrashreporter-qt)
|
||||
|
||||
@@ -32,24 +32,17 @@ if(NOT BUILD_LIBRARIES_ONLY)
|
||||
target_include_directories(${cmd_NAME} PRIVATE ${CMAKE_SOURCE_DIR}/src/3rdparty/qtokenizer)
|
||||
endif()
|
||||
|
||||
# OSX: Copy nextcloudcmd to app bundle, src/gui will run macdeployqt
|
||||
if(BUILD_OWNCLOUD_OSX_BUNDLE)
|
||||
install(TARGETS ${cmd_NAME} DESTINATION ${OWNCLOUD_OSX_BUNDLE}/Contents/MacOS)
|
||||
add_custom_command(TARGET ${cmd_NAME} POST_BUILD
|
||||
COMMAND "cp"
|
||||
"$<TARGET_FILE:${cmd_NAME}>"
|
||||
"${BIN_OUTPUT_DIRECTORY}/${OWNCLOUD_OSX_BUNDLE}/Contents/MacOS"
|
||||
COMMENT "Copying nextcloudcmd..."
|
||||
)
|
||||
elseif(NOT BUILD_LIBRARIES_ONLY)
|
||||
install(TARGETS ${cmd_NAME}
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
endif()
|
||||
|
||||
# FIXME: The following lines are dup in src/gui and src/cmd because it needs to be done after both are installed
|
||||
#FIXME: find a nice solution to make the second if(BUILD_OWNCLOUD_OSX_BUNDLE) unnecessary
|
||||
# currently it needs to be done because the code right above needs to be executed no matter
|
||||
# if building a bundle or not and the install_qt4_executable needs to be called afterwards
|
||||
if(BUILD_OWNCLOUD_OSX_BUNDLE AND NOT BUILD_LIBRARIES_ONLY)
|
||||
get_target_property (QT_QMAKE_EXECUTABLE Qt5::qmake IMPORTED_LOCATION)
|
||||
install(CODE "
|
||||
message(STATUS \"Deploying (Qt) dependencies and fixing library paths...\")
|
||||
execute_process(COMMAND \"${CMAKE_SOURCE_DIR}/admin/osx/macdeployqt.py\" ${CMAKE_INSTALL_PREFIX}/${OWNCLOUD_OSX_BUNDLE} ${QT_QMAKE_EXECUTABLE})
|
||||
execute_process(COMMAND \"${CMAKE_SOURCE_DIR}/admin/osx/macdeployqt.py\" ${CMAKE_INSTALL_PREFIX}/${OWNCLOUD_OSX_BUNDLE}/Contents/Frameworks/QtWebEngineCore.framework/Helpers/QtWebEngineProcess.app ${QT_QMAKE_EXECUTABLE})
|
||||
" COMPONENT RUNTIME)
|
||||
endif()
|
||||
|
||||
@@ -80,7 +80,7 @@ struct CmdOptions
|
||||
|
||||
// we can't use csync_set_userdata because the SyncEngine sets it already.
|
||||
// So we have to use a global variable
|
||||
CmdOptions *opts = 0;
|
||||
CmdOptions *opts = nullptr;
|
||||
|
||||
class EchoDisabler
|
||||
{
|
||||
|
||||
@@ -150,7 +150,7 @@ QByteArray contentChecksumType()
|
||||
|
||||
static bool checksumComputationEnabled()
|
||||
{
|
||||
static bool enabled = qgetenv("OWNCLOUD_DISABLE_CHECKSUM_COMPUTATIONS").isEmpty();
|
||||
static bool enabled = qEnvironmentVariableIsEmpty("OWNCLOUD_DISABLE_CHECKSUM_COMPUTATIONS");
|
||||
return enabled;
|
||||
}
|
||||
|
||||
@@ -255,21 +255,19 @@ void ValidateChecksumHeader::slotChecksumCalculated(const QByteArray &checksumTy
|
||||
emit validated(checksumType, checksum);
|
||||
}
|
||||
|
||||
CSyncChecksumHook::CSyncChecksumHook()
|
||||
{
|
||||
}
|
||||
CSyncChecksumHook::CSyncChecksumHook() = default;
|
||||
|
||||
QByteArray CSyncChecksumHook::hook(const QByteArray &path, const QByteArray &otherChecksumHeader, void * /*this_obj*/)
|
||||
{
|
||||
QByteArray type = parseChecksumHeaderType(QByteArray(otherChecksumHeader));
|
||||
if (type.isEmpty())
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
qCInfo(lcChecksums) << "Computing" << type << "checksum of" << path << "in the csync hook";
|
||||
QByteArray checksum = ComputeChecksum::computeNow(QString::fromUtf8(path), type);
|
||||
if (checksum.isNull()) {
|
||||
qCWarning(lcChecksums) << "Failed to compute checksum" << type << "for" << path;
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return makeChecksumHeader(type, checksum);
|
||||
|
||||
@@ -147,8 +147,8 @@ bool FileSystem::rename(const QString &originFileName,
|
||||
if (!success) {
|
||||
wchar_t *string = 0;
|
||||
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
|
||||
NULL, ::GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
|
||||
(LPWSTR)&string, 0, NULL);
|
||||
nullptr, ::GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
|
||||
(LPWSTR)&string, 0, nullptr);
|
||||
|
||||
error = QString::fromWCharArray(string);
|
||||
LocalFree((HLOCAL)string);
|
||||
@@ -216,8 +216,8 @@ bool FileSystem::uncheckedRenameReplace(const QString &originFileName,
|
||||
if (!ok) {
|
||||
wchar_t *string = 0;
|
||||
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
|
||||
NULL, ::GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
|
||||
(LPWSTR)&string, 0, NULL);
|
||||
nullptr, ::GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
|
||||
(LPWSTR)&string, 0, nullptr);
|
||||
|
||||
*errorString = QString::fromWCharArray(string);
|
||||
qCWarning(lcFileSystem) << "Renaming temp file to final failed: " << *errorString;
|
||||
@@ -248,7 +248,7 @@ bool FileSystem::openAndSeekFileSharedRead(QFile *file, QString *errorOrNull, qi
|
||||
DWORD creationDisp = OPEN_EXISTING;
|
||||
|
||||
// Create the file handle.
|
||||
SECURITY_ATTRIBUTES securityAtts = { sizeof(SECURITY_ATTRIBUTES), NULL, FALSE };
|
||||
SECURITY_ATTRIBUTES securityAtts = { sizeof(SECURITY_ATTRIBUTES), nullptr, FALSE };
|
||||
QString fName = longWinPath(file->fileName());
|
||||
|
||||
HANDLE fileHandle = CreateFileW(
|
||||
@@ -258,7 +258,7 @@ bool FileSystem::openAndSeekFileSharedRead(QFile *file, QString *errorOrNull, qi
|
||||
&securityAtts,
|
||||
creationDisp,
|
||||
FILE_ATTRIBUTE_NORMAL,
|
||||
NULL);
|
||||
nullptr);
|
||||
|
||||
// Bail out on error.
|
||||
if (fileHandle == INVALID_HANDLE_VALUE) {
|
||||
@@ -352,8 +352,8 @@ QString FileSystem::fileSystemForPath(const QString &path)
|
||||
|
||||
if (!GetVolumeInformationW(
|
||||
reinterpret_cast<LPCWSTR>(drive.utf16()),
|
||||
NULL, 0,
|
||||
NULL, NULL, NULL,
|
||||
nullptr, 0,
|
||||
nullptr, nullptr, nullptr,
|
||||
fileSystemBuffer, fileSystemBufferSize)) {
|
||||
return QString();
|
||||
}
|
||||
@@ -516,9 +516,9 @@ bool FileSystem::isFileLocked(const QString &fileName)
|
||||
wuri,
|
||||
GENERIC_READ | GENERIC_WRITE,
|
||||
FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
|
||||
NULL, OPEN_EXISTING,
|
||||
nullptr, OPEN_EXISTING,
|
||||
FILE_ATTRIBUTE_NORMAL | FILE_FLAG_BACKUP_SEMANTICS,
|
||||
NULL);
|
||||
nullptr);
|
||||
|
||||
if (win_h == INVALID_HANDLE_VALUE) {
|
||||
/* could not be opened, so locked? */
|
||||
@@ -543,7 +543,7 @@ bool FileSystem::isJunction(const QString &filename)
|
||||
{
|
||||
#ifdef Q_OS_WIN
|
||||
WIN32_FIND_DATA findData;
|
||||
HANDLE hFind = FindFirstFileEx((const wchar_t *)filename.utf16(), FindExInfoBasic, &findData, FindExSearchNameMatch, NULL, 0);
|
||||
HANDLE hFind = FindFirstFileEx((const wchar_t *)filename.utf16(), FindExInfoBasic, &findData, FindExSearchNameMatch, nullptr, 0);
|
||||
if (hFind != INVALID_HANDLE_VALUE) {
|
||||
FindClose(hFind);
|
||||
return false;
|
||||
|
||||
@@ -91,7 +91,7 @@ namespace FileSystem {
|
||||
*/
|
||||
bool OCSYNC_EXPORT rename(const QString &originFileName,
|
||||
const QString &destinationFileName,
|
||||
QString *errorString = NULL);
|
||||
QString *errorString = nullptr);
|
||||
|
||||
/**
|
||||
* Rename the file \a originFileName to \a destinationFileName, and
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace OCC {
|
||||
Q_LOGGING_CATEGORY(lcSql, "nextcloud.sync.database.sql", QtInfoMsg)
|
||||
|
||||
SqlDatabase::SqlDatabase()
|
||||
: _db(0)
|
||||
: _db(nullptr)
|
||||
, _errId(0)
|
||||
{
|
||||
}
|
||||
@@ -57,7 +57,7 @@ SqlDatabase::~SqlDatabase()
|
||||
|
||||
bool SqlDatabase::isOpen()
|
||||
{
|
||||
return _db != 0;
|
||||
return _db != nullptr;
|
||||
}
|
||||
|
||||
bool SqlDatabase::openHelper(const QString &filename, int sqliteFlags)
|
||||
@@ -68,7 +68,7 @@ bool SqlDatabase::openHelper(const QString &filename, int sqliteFlags)
|
||||
|
||||
sqliteFlags |= SQLITE_OPEN_NOMUTEX;
|
||||
|
||||
SQLITE_DO(sqlite3_open_v2(filename.toUtf8().constData(), &_db, sqliteFlags, 0));
|
||||
SQLITE_DO(sqlite3_open_v2(filename.toUtf8().constData(), &_db, sqliteFlags, nullptr));
|
||||
|
||||
if (_errId != SQLITE_OK) {
|
||||
qCWarning(lcSql) << "Error:" << _error << "for" << filename;
|
||||
@@ -196,7 +196,7 @@ void SqlDatabase::close()
|
||||
SQLITE_DO(sqlite3_close(_db));
|
||||
if (_errId != SQLITE_OK)
|
||||
qCWarning(lcSql) << "Closing database failed" << _error;
|
||||
_db = 0;
|
||||
_db = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -205,7 +205,7 @@ bool SqlDatabase::transaction()
|
||||
if (!_db) {
|
||||
return false;
|
||||
}
|
||||
SQLITE_DO(sqlite3_exec(_db, "BEGIN", 0, 0, 0));
|
||||
SQLITE_DO(sqlite3_exec(_db, "BEGIN", nullptr, nullptr, nullptr));
|
||||
return _errId == SQLITE_OK;
|
||||
}
|
||||
|
||||
@@ -214,7 +214,7 @@ bool SqlDatabase::commit()
|
||||
if (!_db) {
|
||||
return false;
|
||||
}
|
||||
SQLITE_DO(sqlite3_exec(_db, "COMMIT", 0, 0, 0));
|
||||
SQLITE_DO(sqlite3_exec(_db, "COMMIT", nullptr, nullptr, nullptr));
|
||||
return _errId == SQLITE_OK;
|
||||
}
|
||||
|
||||
@@ -255,7 +255,7 @@ int SqlQuery::prepare(const QByteArray &sql, bool allow_failure)
|
||||
int n = 0;
|
||||
int rc;
|
||||
do {
|
||||
rc = sqlite3_prepare_v2(_db, _sql.constData(), -1, &_stmt, 0);
|
||||
rc = sqlite3_prepare_v2(_db, _sql.constData(), -1, &_stmt, nullptr);
|
||||
if ((rc == SQLITE_BUSY) || (rc == SQLITE_LOCKED)) {
|
||||
n++;
|
||||
OCC::Utility::usleep(SQLITE_SLEEP_TIME_USEC);
|
||||
@@ -462,7 +462,7 @@ void SqlQuery::finish()
|
||||
if (!_stmt)
|
||||
return;
|
||||
SQLITE_DO(sqlite3_finalize(_stmt));
|
||||
_stmt = 0;
|
||||
_stmt = nullptr;
|
||||
if (_sqldb) {
|
||||
_sqldb->_queries.remove(this);
|
||||
}
|
||||
|
||||
@@ -661,7 +661,7 @@ bool SyncJournalDb::updateMetadataTableStructure()
|
||||
commitInternal("update database structure: add filesize col");
|
||||
}
|
||||
|
||||
if (1) {
|
||||
if (true) {
|
||||
SqlQuery query(_db);
|
||||
query.prepare("CREATE INDEX IF NOT EXISTS metadata_inode ON metadata(inode);");
|
||||
if (!query.exec()) {
|
||||
@@ -671,7 +671,7 @@ bool SyncJournalDb::updateMetadataTableStructure()
|
||||
commitInternal("update database structure: add inode index");
|
||||
}
|
||||
|
||||
if (1) {
|
||||
if (true) {
|
||||
SqlQuery query(_db);
|
||||
query.prepare("CREATE INDEX IF NOT EXISTS metadata_path ON metadata(path);");
|
||||
if (!query.exec()) {
|
||||
@@ -1857,12 +1857,12 @@ QByteArray SyncJournalDb::getChecksumType(int checksumTypeId)
|
||||
return {};
|
||||
query.bindValue(1, checksumTypeId);
|
||||
if (!query.exec()) {
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (!query.next()) {
|
||||
qCWarning(lcDb) << "No checksum type mapping found for" << checksumTypeId;
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
return query.baValue(0);
|
||||
}
|
||||
|
||||
@@ -87,33 +87,19 @@ public:
|
||||
|
||||
struct DownloadInfo
|
||||
{
|
||||
DownloadInfo()
|
||||
: _errorCount(0)
|
||||
, _valid(false)
|
||||
{
|
||||
}
|
||||
QString _tmpfile;
|
||||
QByteArray _etag;
|
||||
int _errorCount;
|
||||
bool _valid;
|
||||
int _errorCount = 0;
|
||||
bool _valid = false;
|
||||
};
|
||||
struct UploadInfo
|
||||
{
|
||||
UploadInfo()
|
||||
: _chunk(0)
|
||||
, _transferid(0)
|
||||
, _size(0)
|
||||
, _modtime(0)
|
||||
, _errorCount(0)
|
||||
, _valid(false)
|
||||
{
|
||||
}
|
||||
int _chunk;
|
||||
int _transferid;
|
||||
quint64 _size; //currently unused
|
||||
qint64 _modtime;
|
||||
int _errorCount;
|
||||
bool _valid;
|
||||
int _chunk = 0;
|
||||
int _transferid = 0;
|
||||
quint64 _size = 0; //currently unused
|
||||
qint64 _modtime = 0;
|
||||
int _errorCount = 0;
|
||||
bool _valid = false;
|
||||
QByteArray _contentChecksum;
|
||||
/**
|
||||
* Returns true if this entry refers to a chunked upload that can be continued.
|
||||
|
||||
@@ -81,31 +81,22 @@ public:
|
||||
InsufficientRemoteStorage
|
||||
};
|
||||
|
||||
SyncJournalErrorBlacklistRecord()
|
||||
: _retryCount(0)
|
||||
, _errorCategory(Category::Normal)
|
||||
, _lastTryModtime(0)
|
||||
, _lastTryTime(0)
|
||||
, _ignoreDuration(0)
|
||||
{
|
||||
}
|
||||
|
||||
/// The number of times the operation was unsuccessful so far.
|
||||
int _retryCount;
|
||||
int _retryCount = 0;
|
||||
|
||||
/// The last error string.
|
||||
QString _errorString;
|
||||
/// The error category. Sometimes used for special actions.
|
||||
Category _errorCategory;
|
||||
Category _errorCategory = Category::Normal;
|
||||
|
||||
qint64 _lastTryModtime;
|
||||
qint64 _lastTryModtime = 0;
|
||||
QByteArray _lastTryEtag;
|
||||
|
||||
/// The last time the operation was attempted (in s since epoch).
|
||||
qint64 _lastTryTime;
|
||||
qint64 _lastTryTime = 0;
|
||||
|
||||
/// The number of seconds the file shall be ignored.
|
||||
qint64 _ignoreDuration;
|
||||
qint64 _ignoreDuration = 0;
|
||||
|
||||
QString _file;
|
||||
QString _renameTarget;
|
||||
|
||||
@@ -215,7 +215,7 @@ qint64 Utility::freeDiskSpace(const QString &path)
|
||||
#elif defined(Q_OS_WIN)
|
||||
ULARGE_INTEGER freeBytes;
|
||||
freeBytes.QuadPart = 0L;
|
||||
if (GetDiskFreeSpaceEx(reinterpret_cast<const wchar_t *>(path.utf16()), &freeBytes, NULL, NULL)) {
|
||||
if (GetDiskFreeSpaceEx(reinterpret_cast<const wchar_t *>(path.utf16()), &freeBytes, nullptr, nullptr)) {
|
||||
return freeBytes.QuadPart;
|
||||
}
|
||||
#endif
|
||||
@@ -298,7 +298,7 @@ namespace {
|
||||
|
||||
QString description(quint64 value) const
|
||||
{
|
||||
return QCoreApplication::translate("Utility", name, 0, value);
|
||||
return QCoreApplication::translate("Utility", name, nullptr, value);
|
||||
}
|
||||
};
|
||||
// QTBUG-3945 and issue #4855: QT_TRANSLATE_NOOP does not work with plural form because lupdate
|
||||
@@ -313,7 +313,7 @@ namespace {
|
||||
{ QT_TRANSLATE_NOOP("Utility", "%n hour(s)", 0, _), 3600 * 1000LL },
|
||||
{ QT_TRANSLATE_NOOP("Utility", "%n minute(s)", 0, _), 60 * 1000LL },
|
||||
{ QT_TRANSLATE_NOOP("Utility", "%n second(s)", 0, _), 1000LL },
|
||||
{ 0, 0 }
|
||||
{ nullptr, 0 }
|
||||
};
|
||||
} // anonymous namespace
|
||||
|
||||
@@ -392,7 +392,7 @@ QString Utility::platformName()
|
||||
|
||||
void Utility::crash()
|
||||
{
|
||||
volatile int *a = (int *)(NULL);
|
||||
volatile int *a = (int *)nullptr;
|
||||
*a = 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -56,9 +56,9 @@ bool hasLaunchOnStartup_private(const QString &)
|
||||
CFStringRef appUrlRefString = CFURLGetString(urlRef); // no need for release
|
||||
for (int i = 0; i < CFArrayGetCount(itemsArray); i++) {
|
||||
LSSharedFileListItemRef item = (LSSharedFileListItemRef)CFArrayGetValueAtIndex(itemsArray, i);
|
||||
CFURLRef itemUrlRef = NULL;
|
||||
CFURLRef itemUrlRef = nullptr;
|
||||
|
||||
if (LSSharedFileListItemResolve(item, 0, &itemUrlRef, NULL) == noErr && itemUrlRef) {
|
||||
if (LSSharedFileListItemResolve(item, 0, &itemUrlRef, nullptr) == noErr && itemUrlRef) {
|
||||
CFStringRef itemUrlString = CFURLGetString(itemUrlRef);
|
||||
if (CFStringCompare(itemUrlString, appUrlRefString, 0) == kCFCompareEqualTo) {
|
||||
returnValue = true;
|
||||
@@ -98,9 +98,9 @@ void setLaunchOnStartup_private(const QString &appName, const QString &guiName,
|
||||
CFStringRef appUrlRefString = CFURLGetString(urlRef);
|
||||
for (int i = 0; i < CFArrayGetCount(itemsArray); i++) {
|
||||
LSSharedFileListItemRef item = (LSSharedFileListItemRef)CFArrayGetValueAtIndex(itemsArray, i);
|
||||
CFURLRef itemUrlRef = NULL;
|
||||
CFURLRef itemUrlRef = nullptr;
|
||||
|
||||
if (LSSharedFileListItemResolve(item, 0, &itemUrlRef, NULL) == noErr && itemUrlRef) {
|
||||
if (LSSharedFileListItemResolve(item, 0, &itemUrlRef, nullptr) == noErr && itemUrlRef) {
|
||||
CFStringRef itemUrlString = CFURLGetString(itemUrlRef);
|
||||
if (CFStringCompare(itemUrlString, appUrlRefString, 0) == kCFCompareEqualTo) {
|
||||
LSSharedFileListItemRemove(loginItems, item); // remove it!
|
||||
@@ -120,11 +120,11 @@ static bool hasDarkSystray_private()
|
||||
{
|
||||
bool returnValue = false;
|
||||
CFStringRef interfaceStyleKey = CFSTR("AppleInterfaceStyle");
|
||||
CFStringRef interfaceStyle = NULL;
|
||||
CFStringRef interfaceStyle = nullptr;
|
||||
CFStringRef darkInterfaceStyle = CFSTR("Dark");
|
||||
interfaceStyle = (CFStringRef)CFPreferencesCopyAppValue(interfaceStyleKey,
|
||||
kCFPreferencesCurrentApplication);
|
||||
if (interfaceStyle != NULL) {
|
||||
if (interfaceStyle) {
|
||||
returnValue = (kCFCompareEqualTo == CFStringCompare(interfaceStyle, darkInterfaceStyle, 0));
|
||||
CFRelease(interfaceStyle);
|
||||
}
|
||||
|
||||
@@ -47,14 +47,18 @@ QString getUserAutostartDir_private()
|
||||
|
||||
bool hasLaunchOnStartup_private(const QString &appName)
|
||||
{
|
||||
QString desktopFileLocation = getUserAutostartDir_private() + appName + QLatin1String(".desktop");
|
||||
QString desktopFileLocation = getUserAutostartDir_private()
|
||||
+ QLatin1String(LINUX_APPLICATION_ID)
|
||||
+ QLatin1String(".desktop");
|
||||
return QFile::exists(desktopFileLocation);
|
||||
}
|
||||
|
||||
void setLaunchOnStartup_private(const QString &appName, const QString &guiName, bool enable)
|
||||
{
|
||||
QString userAutoStartPath = getUserAutostartDir_private();
|
||||
QString desktopFileLocation = userAutoStartPath + appName + QLatin1String(".desktop");
|
||||
QString desktopFileLocation = userAutoStartPath
|
||||
+ QLatin1String(LINUX_APPLICATION_ID)
|
||||
+ QLatin1String(".desktop");
|
||||
if (enable) {
|
||||
if (!QDir().exists(userAutoStartPath) && !QDir().mkpath(userAutoStartPath)) {
|
||||
qCWarning(lcUtility) << "Could not create autostart folder" << userAutoStartPath;
|
||||
@@ -72,7 +76,7 @@ void setLaunchOnStartup_private(const QString &appName, const QString &guiName,
|
||||
<< QLatin1String("GenericName=") << QLatin1String("File Synchronizer") << endl
|
||||
<< QLatin1String("Exec=") << QCoreApplication::applicationFilePath() << endl
|
||||
<< QLatin1String("Terminal=") << "false" << endl
|
||||
<< QLatin1String("Icon=") << appName.toLower() << endl // always use lowercase for icons
|
||||
<< QLatin1String("Icon=") << APPLICATION_ICON_NAME << endl
|
||||
<< QLatin1String("Categories=") << QLatin1String("Network") << endl
|
||||
<< QLatin1String("Type=") << QLatin1String("Application") << endl
|
||||
<< QLatin1String("StartupNotify=") << "false" << endl
|
||||
|
||||
@@ -57,7 +57,7 @@ static void setupFavLink_private(const QString &folder)
|
||||
/* Use new WINAPI functions */
|
||||
PWSTR path;
|
||||
|
||||
if (SHGetKnownFolderPath(FOLDERID_Links, 0, NULL, &path) == S_OK) {
|
||||
if (SHGetKnownFolderPath(FOLDERID_Links, 0, nullptr, &path) == S_OK) {
|
||||
QString links = QDir::fromNativeSeparators(QString::fromWCharArray(path));
|
||||
linkName = QDir(links).filePath(folderDir.dirName() + QLatin1String(".lnk"));
|
||||
CoTaskMemFree(path);
|
||||
|
||||
@@ -49,11 +49,15 @@ if(NOT BUILD_LIBRARIES_ONLY)
|
||||
# currently it needs to be done because the code right above needs to be executed no matter
|
||||
# if building a bundle or not and the install_qt4_executable needs to be called afterwards
|
||||
if(BUILD_OWNCLOUD_OSX_BUNDLE)
|
||||
get_target_property (QT_QMAKE_EXECUTABLE Qt5::qmake IMPORTED_LOCATION)
|
||||
install(CODE "
|
||||
message(STATUS \"Deploying (Qt) dependencies and fixing library paths...\")
|
||||
execute_process(COMMAND \"${CMAKE_SOURCE_DIR}/admin/osx/macdeployqt.py\" ${CMAKE_INSTALL_PREFIX}/${OWNCLOUD_OSX_BUNDLE} ${QT_QMAKE_EXECUTABLE})
|
||||
execute_process(COMMAND \"${CMAKE_SOURCE_DIR}/admin/osx/macdeployqt.py\" ${CMAKE_INSTALL_PREFIX}/${OWNCLOUD_OSX_BUNDLE}/Contents/Frameworks/QtWebEngineCore.framework/Helpers/QtWebEngineProcess.app ${QT_QMAKE_EXECUTABLE})
|
||||
" COMPONENT RUNTIME)
|
||||
get_target_property (QT_QMAKE_EXECUTABLE Qt5::qmake IMPORTED_LOCATION)
|
||||
get_filename_component(QT_BIN_DIR "${QT_QMAKE_EXECUTABLE}" DIRECTORY)
|
||||
find_program(MACDEPLOYQT_EXECUTABLE macdeployqt HINTS "${QT_BIN_DIR}")
|
||||
|
||||
add_custom_command(TARGET ${CRASHREPORTER_EXECUTABLE} POST_BUILD
|
||||
COMMAND "${MACDEPLOYQT_EXECUTABLE}"
|
||||
"$<TARGET_FILE_DIR:${CRASHREPORTER_EXECUTABLE}>/../.."
|
||||
-always-overwrite
|
||||
COMMENT "Running macdeployqt..."
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
#include "common/c_jhash.h"
|
||||
#include "common/syncjournalfilerecord.h"
|
||||
|
||||
Q_LOGGING_CATEGORY(lcCSync, "sync.csync.csync", QtInfoMsg)
|
||||
Q_LOGGING_CATEGORY(lcCSync, "nextcloud.sync.csync.csync", QtInfoMsg)
|
||||
|
||||
|
||||
csync_s::csync_s(const char *localUri, OCC::SyncJournalDb *statedb)
|
||||
@@ -67,7 +67,7 @@ csync_s::csync_s(const char *localUri, OCC::SyncJournalDb *statedb)
|
||||
int csync_update(CSYNC *ctx) {
|
||||
int rc = -1;
|
||||
|
||||
if (ctx == NULL) {
|
||||
if (!ctx) {
|
||||
errno = EBADF;
|
||||
return -1;
|
||||
}
|
||||
@@ -188,7 +188,7 @@ static int _csync_treewalk_visitor(csync_file_stat_t *cur, CSYNC * ctx, const cs
|
||||
other_file_it = other_tree->find(renamed_path);
|
||||
}
|
||||
|
||||
csync_file_stat_t *other = (other_file_it != other_tree->cend()) ? other_file_it->second.get() : NULL;
|
||||
csync_file_stat_t *other = (other_file_it != other_tree->cend()) ? other_file_it->second.get() : nullptr;
|
||||
|
||||
ctx->status_code = CSYNC_STATUS_OK;
|
||||
|
||||
@@ -234,7 +234,7 @@ int csync_s::reinitialize() {
|
||||
|
||||
status_code = CSYNC_STATUS_OK;
|
||||
|
||||
remote.read_from_db = 0;
|
||||
remote.read_from_db = false;
|
||||
read_remote_from_db = true;
|
||||
|
||||
local.files.clear();
|
||||
@@ -256,14 +256,14 @@ csync_s::~csync_s() {
|
||||
}
|
||||
|
||||
void *csync_get_userdata(CSYNC *ctx) {
|
||||
if (ctx == NULL) {
|
||||
return NULL;
|
||||
if (!ctx) {
|
||||
return nullptr;
|
||||
}
|
||||
return ctx->callbacks.userdata;
|
||||
}
|
||||
|
||||
int csync_set_userdata(CSYNC *ctx, void *userdata) {
|
||||
if (ctx == NULL) {
|
||||
if (!ctx) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -273,15 +273,15 @@ int csync_set_userdata(CSYNC *ctx, void *userdata) {
|
||||
}
|
||||
|
||||
csync_auth_callback csync_get_auth_callback(CSYNC *ctx) {
|
||||
if (ctx == NULL) {
|
||||
return NULL;
|
||||
if (!ctx) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return ctx->callbacks.auth_function;
|
||||
}
|
||||
|
||||
int csync_set_status(CSYNC *ctx, int status) {
|
||||
if (ctx == NULL || status < 0) {
|
||||
if (!ctx || status < 0) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -291,7 +291,7 @@ int csync_set_status(CSYNC *ctx, int status) {
|
||||
}
|
||||
|
||||
CSYNC_STATUS csync_get_status(CSYNC *ctx) {
|
||||
if (ctx == NULL) {
|
||||
if (!ctx) {
|
||||
return CSYNC_STATUS_ERROR;
|
||||
}
|
||||
|
||||
@@ -305,21 +305,21 @@ const char *csync_get_status_string(CSYNC *ctx)
|
||||
|
||||
void csync_request_abort(CSYNC *ctx)
|
||||
{
|
||||
if (ctx != NULL) {
|
||||
if (ctx) {
|
||||
ctx->abort = true;
|
||||
}
|
||||
}
|
||||
|
||||
void csync_resume(CSYNC *ctx)
|
||||
{
|
||||
if (ctx != NULL) {
|
||||
if (ctx) {
|
||||
ctx->abort = false;
|
||||
}
|
||||
}
|
||||
|
||||
int csync_abort_requested(CSYNC *ctx)
|
||||
{
|
||||
if (ctx != NULL) {
|
||||
if (ctx) {
|
||||
return ctx->abort;
|
||||
} else {
|
||||
return (1 == 0);
|
||||
|
||||
@@ -240,7 +240,7 @@ int OCSYNC_EXPORT csync_reconcile(CSYNC *ctx);
|
||||
*
|
||||
* @param ctx The csync context.
|
||||
*
|
||||
* @return The userdata saved in the context, NULL if an error
|
||||
* @return The userdata saved in the context, \c nullptr if an error
|
||||
* occurred.
|
||||
*/
|
||||
void *csync_get_userdata(CSYNC *ctx);
|
||||
@@ -262,7 +262,7 @@ int OCSYNC_EXPORT csync_set_userdata(CSYNC *ctx, void *userdata);
|
||||
*
|
||||
* @param ctx The csync context.
|
||||
*
|
||||
* @return The authentication callback set or NULL if an error
|
||||
* @return The authentication callback set or \c nullptr if an error
|
||||
* occurred.
|
||||
*/
|
||||
csync_auth_callback OCSYNC_EXPORT csync_get_auth_callback(CSYNC *ctx);
|
||||
|
||||
@@ -133,7 +133,7 @@ bool csync_is_windows_reserved_word(const char *filename)
|
||||
|
||||
static CSYNC_EXCLUDE_TYPE _csync_excluded_common(const char *path, bool excludeConflictFiles)
|
||||
{
|
||||
const char *bname = NULL;
|
||||
const char *bname = nullptr;
|
||||
size_t blen = 0;
|
||||
int rc = -1;
|
||||
CSYNC_EXCLUDE_TYPE match = CSYNC_NOT_EXCLUDED;
|
||||
@@ -261,9 +261,7 @@ ExcludedFiles::ExcludedFiles(QString localPath)
|
||||
addInTreeExcludeFilePath(fi.absoluteFilePath());
|
||||
}
|
||||
|
||||
ExcludedFiles::~ExcludedFiles()
|
||||
{
|
||||
}
|
||||
ExcludedFiles::~ExcludedFiles() = default;
|
||||
|
||||
void ExcludedFiles::addExcludeFilePath(const QString &path)
|
||||
{
|
||||
@@ -346,7 +344,8 @@ bool ExcludedFiles::reloadExcludeFiles()
|
||||
_fullRegexDir.clear();
|
||||
|
||||
bool success = true;
|
||||
for (const auto& basePath : _excludeFiles.keys()) {
|
||||
const auto keys = _excludeFiles.keys();
|
||||
for (const auto& basePath : keys) {
|
||||
for (const auto& file : _excludeFiles.value(basePath)) {
|
||||
success = loadExcludeFile(basePath, file);
|
||||
}
|
||||
@@ -667,7 +666,8 @@ void ExcludedFiles::prepare()
|
||||
_fullRegexFile.clear();
|
||||
_fullRegexDir.clear();
|
||||
|
||||
for (auto const & basePath : _allExcludes.keys())
|
||||
const auto keys = _allExcludes.keys();
|
||||
for (auto const & basePath : keys)
|
||||
prepare(basePath);
|
||||
}
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ Q_LOGGING_CATEGORY(lcReconcile, "nextcloud.sync.csync.reconciler", QtInfoMsg)
|
||||
#include "inttypes.h"
|
||||
|
||||
/* Check if a file is ignored because one parent is ignored.
|
||||
* return the node of the ignored directoy if it's the case, or NULL if it is not ignored */
|
||||
* return the node of the ignored directoy if it's the case, or \c nullptr if it is not ignored */
|
||||
static csync_file_stat_t *_csync_check_ignored(csync_s::FileMap *tree, const ByteArrayRef &path)
|
||||
{
|
||||
/* compute the size of the parent directory */
|
||||
|
||||
@@ -63,8 +63,8 @@ static bool _csync_sameextension(const char *p1, const char *p2) {
|
||||
|
||||
/* If the found extension contains a '/', it is because the . was in the folder name
|
||||
* => no extensions */
|
||||
if (e1 && strchr(e1, '/')) e1 = NULL;
|
||||
if (e2 && strchr(e2, '/')) e2 = NULL;
|
||||
if (e1 && strchr(e1, '/')) e1 = nullptr;
|
||||
if (e2 && strchr(e2, '/')) e2 = nullptr;
|
||||
|
||||
/* If none have extension, it is the same extension */
|
||||
if (!e1 && !e2)
|
||||
@@ -590,9 +590,9 @@ int csync_ftw(CSYNC *ctx, const char *uri, csync_walker_fn fn,
|
||||
unsigned int depth) {
|
||||
QByteArray filename;
|
||||
QByteArray fullpath;
|
||||
csync_vio_handle_t *dh = NULL;
|
||||
csync_vio_handle_t *dh = nullptr;
|
||||
std::unique_ptr<csync_file_stat_t> dirent;
|
||||
csync_file_stat_t *previous_fs = NULL;
|
||||
csync_file_stat_t *previous_fs = nullptr;
|
||||
int read_from_db = 0;
|
||||
int rc = 0;
|
||||
|
||||
@@ -617,7 +617,7 @@ int csync_ftw(CSYNC *ctx, const char *uri, csync_walker_fn fn,
|
||||
// if the etag of this dir is still the same, its content is restored from the
|
||||
// database.
|
||||
if( do_read_from_db ) {
|
||||
if( ! fill_tree_from_db(ctx, db_uri) ) {
|
||||
if(!fill_tree_from_db(ctx, db_uri)) {
|
||||
errno = ENOENT;
|
||||
ctx->status_code = CSYNC_STATUS_OPENDIR_ERROR;
|
||||
goto error;
|
||||
@@ -625,7 +625,7 @@ int csync_ftw(CSYNC *ctx, const char *uri, csync_walker_fn fn,
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ((dh = csync_vio_opendir(ctx, uri)) == NULL) {
|
||||
if (!(dh = csync_vio_opendir(ctx, uri))) {
|
||||
if (ctx->abort) {
|
||||
qCDebug(lcUpdate, "Aborted!");
|
||||
ctx->status_code = CSYNC_STATUS_ABORTED;
|
||||
@@ -783,7 +783,7 @@ int csync_ftw(CSYNC *ctx, const char *uri, csync_walker_fn fn,
|
||||
|
||||
error:
|
||||
ctx->remote.read_from_db = read_from_db;
|
||||
if (dh != NULL) {
|
||||
if (dh) {
|
||||
csync_vio_closedir(ctx, dh);
|
||||
}
|
||||
return -1;
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
#include "csync_util.h"
|
||||
#include "vio/csync_vio.h"
|
||||
|
||||
Q_LOGGING_CATEGORY(lcCSyncUtils, "sync.csync.utils", QtInfoMsg)
|
||||
Q_LOGGING_CATEGORY(lcCSyncUtils, "nextcloud.sync.csync.utils", QtInfoMsg)
|
||||
|
||||
|
||||
typedef struct {
|
||||
@@ -57,7 +57,7 @@ static const _instr_code_struct _instr[] =
|
||||
{ "INSTRUCTION_ERROR", CSYNC_INSTRUCTION_ERROR },
|
||||
{ "INSTRUCTION_TYPE_CHANGE", CSYNC_INSTRUCTION_TYPE_CHANGE },
|
||||
{ "INSTRUCTION_UPDATE_METADATA", CSYNC_INSTRUCTION_UPDATE_METADATA },
|
||||
{ NULL, CSYNC_INSTRUCTION_ERROR }
|
||||
{ nullptr, CSYNC_INSTRUCTION_ERROR }
|
||||
};
|
||||
|
||||
struct csync_memstat_s {
|
||||
@@ -74,7 +74,7 @@ const char *csync_instruction_str(enum csync_instructions_e instr)
|
||||
{
|
||||
int idx = 0;
|
||||
|
||||
while (_instr[idx].instr_str != NULL) {
|
||||
while (_instr[idx].instr_str) {
|
||||
if (_instr[idx].instr_code == instr) {
|
||||
return _instr[idx].instr_str;
|
||||
}
|
||||
@@ -85,14 +85,14 @@ const char *csync_instruction_str(enum csync_instructions_e instr)
|
||||
}
|
||||
|
||||
|
||||
void csync_memstat_check(void) {
|
||||
void csync_memstat_check() {
|
||||
int s = 0;
|
||||
struct csync_memstat_s m;
|
||||
FILE* fp;
|
||||
|
||||
/* get process memory stats */
|
||||
fp = fopen("/proc/self/statm","r");
|
||||
if (fp == NULL) {
|
||||
if (!fp) {
|
||||
return;
|
||||
}
|
||||
s = fscanf(fp, "%d%d%d%d%d%d%d", &m.size, &m.resident, &m.shared, &m.trs,
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
/* Convert a locale String to UTF8 */
|
||||
QByteArray c_utf8_from_locale(const mbchar_t *wstr)
|
||||
{
|
||||
if (wstr == NULL) {
|
||||
if (!wstr) {
|
||||
return QByteArray();
|
||||
}
|
||||
|
||||
@@ -53,10 +53,10 @@ QByteArray c_utf8_from_locale(const mbchar_t *wstr)
|
||||
size_t len;
|
||||
len = wcslen(wstr);
|
||||
/* Call once to get the required size. */
|
||||
size_needed = WideCharToMultiByte(CP_UTF8, 0, wstr, OCC::Utility::convertSizeToInt(len), NULL, 0, NULL, NULL);
|
||||
size_needed = WideCharToMultiByte(CP_UTF8, 0, wstr, OCC::Utility::convertSizeToInt(len), nullptr, 0, nullptr, nullptr);
|
||||
if (size_needed > 0) {
|
||||
dst.resize(size_needed);
|
||||
WideCharToMultiByte(CP_UTF8, 0, wstr, OCC::Utility::convertSizeToInt(len), dst.data(), size_needed, NULL, NULL);
|
||||
WideCharToMultiByte(CP_UTF8, 0, wstr, OCC::Utility::convertSizeToInt(len), dst.data(), size_needed, nullptr, nullptr);
|
||||
}
|
||||
return dst;
|
||||
#else
|
||||
@@ -87,16 +87,16 @@ extern "C" {
|
||||
/* Convert a an UTF8 string to locale */
|
||||
mbchar_t* c_utf8_string_to_locale(const char *str)
|
||||
{
|
||||
if (str == NULL ) {
|
||||
return NULL;
|
||||
if (!str) {
|
||||
return nullptr;
|
||||
}
|
||||
#ifdef _WIN32
|
||||
mbchar_t *dst = NULL;
|
||||
mbchar_t *dst = nullptr;
|
||||
size_t len;
|
||||
int size_needed;
|
||||
|
||||
len = strlen(str);
|
||||
size_needed = MultiByteToWideChar(CP_UTF8, 0, str, OCC::Utility::convertSizeToInt(len), NULL, 0);
|
||||
size_needed = MultiByteToWideChar(CP_UTF8, 0, str, OCC::Utility::convertSizeToInt(len), nullptr, 0);
|
||||
if (size_needed > 0) {
|
||||
int size_char = (size_needed + 1) * sizeof(mbchar_t);
|
||||
dst = (mbchar_t*)c_malloc(size_char);
|
||||
@@ -111,8 +111,8 @@ mbchar_t* c_utf8_string_to_locale(const char *str)
|
||||
|
||||
mbchar_t* c_utf8_path_to_locale(const char *str)
|
||||
{
|
||||
if( str == NULL ) {
|
||||
return NULL;
|
||||
if(!str) {
|
||||
return nullptr;
|
||||
} else {
|
||||
#ifdef _WIN32
|
||||
size_t strLength = strlen(str);
|
||||
|
||||
@@ -83,7 +83,7 @@ extern "C" {
|
||||
*
|
||||
* @param str The utf8 string to convert.
|
||||
*
|
||||
* @return The malloced converted multibyte string or NULL on error.
|
||||
* @return The malloced converted multibyte string or \c nullptr on error.
|
||||
*
|
||||
* @see c_free_locale_string()
|
||||
* @see c_utf8_from_locale()
|
||||
|
||||
@@ -47,13 +47,13 @@ csync_vio_handle_t *csync_vio_opendir(CSYNC *ctx, const char *name) {
|
||||
default:
|
||||
ASSERT(false);
|
||||
}
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
int csync_vio_closedir(CSYNC *ctx, csync_vio_handle_t *dhandle) {
|
||||
int rc = -1;
|
||||
|
||||
if (dhandle == NULL) {
|
||||
if (!dhandle) {
|
||||
errno = EBADF;
|
||||
return -1;
|
||||
}
|
||||
@@ -87,12 +87,12 @@ std::unique_ptr<csync_file_stat_t> csync_vio_readdir(CSYNC *ctx, csync_vio_handl
|
||||
ASSERT(false);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
char *csync_vio_get_status_string(CSYNC *ctx) {
|
||||
if(ctx->error_string) {
|
||||
return ctx->error_string;
|
||||
}
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -26,6 +26,8 @@
|
||||
#include <dirent.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "c_private.h"
|
||||
#include "c_lib.h"
|
||||
#include "c_string.h"
|
||||
@@ -35,7 +37,7 @@
|
||||
|
||||
#include "vio/csync_vio_local.h"
|
||||
|
||||
Q_LOGGING_CATEGORY(lcCSyncVIOLocal, "sync.csync.vio_local", QtInfoMsg)
|
||||
Q_LOGGING_CATEGORY(lcCSyncVIOLocal, "nextcloud.sync.csync.vio_local", QtInfoMsg)
|
||||
|
||||
/*
|
||||
* directory functions
|
||||
@@ -49,18 +51,18 @@ typedef struct dhandle_s {
|
||||
static int _csync_vio_local_stat_mb(const mbchar_t *wuri, csync_file_stat_t *buf);
|
||||
|
||||
csync_vio_handle_t *csync_vio_local_opendir(const char *name) {
|
||||
dhandle_t *handle = NULL;
|
||||
mbchar_t *dirname = NULL;
|
||||
dhandle_t *handle = nullptr;
|
||||
mbchar_t *dirname = nullptr;
|
||||
|
||||
handle = (dhandle_t*)c_malloc(sizeof(dhandle_t));
|
||||
|
||||
dirname = c_utf8_path_to_locale(name);
|
||||
|
||||
handle->dh = _topendir( dirname );
|
||||
if (handle->dh == NULL) {
|
||||
if (!handle->dh) {
|
||||
c_free_locale_string(dirname);
|
||||
SAFE_FREE(handle);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
handle->path = c_strdup(name);
|
||||
@@ -70,10 +72,10 @@ csync_vio_handle_t *csync_vio_local_opendir(const char *name) {
|
||||
}
|
||||
|
||||
int csync_vio_local_closedir(csync_vio_handle_t *dhandle) {
|
||||
dhandle_t *handle = NULL;
|
||||
dhandle_t *handle = nullptr;
|
||||
int rc = -1;
|
||||
|
||||
if (dhandle == NULL) {
|
||||
if (!dhandle) {
|
||||
errno = EBADF;
|
||||
return -1;
|
||||
}
|
||||
@@ -89,19 +91,19 @@ int csync_vio_local_closedir(csync_vio_handle_t *dhandle) {
|
||||
|
||||
std::unique_ptr<csync_file_stat_t> csync_vio_local_readdir(csync_vio_handle_t *dhandle) {
|
||||
|
||||
dhandle_t *handle = NULL;
|
||||
dhandle_t *handle = nullptr;
|
||||
|
||||
handle = (dhandle_t *) dhandle;
|
||||
struct _tdirent *dirent = NULL;
|
||||
struct _tdirent *dirent = nullptr;
|
||||
std::unique_ptr<csync_file_stat_t> file_stat;
|
||||
|
||||
do {
|
||||
dirent = _treaddir(handle->dh);
|
||||
if (dirent == NULL)
|
||||
if (!dirent)
|
||||
return {};
|
||||
} while (qstrcmp(dirent->d_name, ".") == 0 || qstrcmp(dirent->d_name, "..") == 0);
|
||||
|
||||
file_stat.reset(new csync_file_stat_t);
|
||||
file_stat = std::make_unique<csync_file_stat_t>();
|
||||
file_stat->path = c_utf8_from_locale(dirent->d_name);
|
||||
QByteArray fullPath = QByteArray() % const_cast<const char *>(handle->path) % '/' % QByteArray() % const_cast<const char *>(dirent->d_name);
|
||||
if (file_stat->path.isNull()) {
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "windows.h"
|
||||
|
||||
#include "c_private.h"
|
||||
@@ -35,7 +37,7 @@
|
||||
|
||||
#include "vio/csync_vio_local.h"
|
||||
|
||||
Q_LOGGING_CATEGORY(lcCSyncVIOLocal, "sync.csync.vio_local", QtInfoMsg)
|
||||
Q_LOGGING_CATEGORY(lcCSyncVIOLocal, "nextcloud.sync.csync.vio_local", QtInfoMsg)
|
||||
|
||||
/*
|
||||
* directory functions
|
||||
@@ -51,15 +53,15 @@ typedef struct dhandle_s {
|
||||
static int _csync_vio_local_stat_mb(const mbchar_t *uri, csync_file_stat_t *buf);
|
||||
|
||||
csync_vio_handle_t *csync_vio_local_opendir(const char *name) {
|
||||
dhandle_t *handle = NULL;
|
||||
mbchar_t *dirname = NULL;
|
||||
dhandle_t *handle = nullptr;
|
||||
mbchar_t *dirname = nullptr;
|
||||
|
||||
handle = (dhandle_t*)c_malloc(sizeof(dhandle_t));
|
||||
|
||||
// the file wildcard has to be attached
|
||||
size_t len_name = strlen(name);
|
||||
if( len_name ) {
|
||||
char *h = NULL;
|
||||
char *h = nullptr;
|
||||
|
||||
// alloc an enough large buffer to take the name + '/*' + the closing zero.
|
||||
h = (char*)c_malloc(len_name+3);
|
||||
@@ -83,7 +85,7 @@ csync_vio_handle_t *csync_vio_local_opendir(const char *name) {
|
||||
errno = EACCES;
|
||||
}
|
||||
SAFE_FREE(handle);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
handle->firstFind = 1; // Set a flag that there first fileinfo is available.
|
||||
@@ -95,10 +97,10 @@ csync_vio_handle_t *csync_vio_local_opendir(const char *name) {
|
||||
}
|
||||
|
||||
int csync_vio_local_closedir(csync_vio_handle_t *dhandle) {
|
||||
dhandle_t *handle = NULL;
|
||||
dhandle_t *handle = nullptr;
|
||||
int rc = -1;
|
||||
|
||||
if (dhandle == NULL) {
|
||||
if (!dhandle) {
|
||||
errno = EBADF;
|
||||
return -1;
|
||||
}
|
||||
@@ -139,7 +141,7 @@ static time_t FileTimeToUnixTime(FILETIME *filetime, DWORD *remainder)
|
||||
|
||||
std::unique_ptr<csync_file_stat_t> csync_vio_local_readdir(csync_vio_handle_t *dhandle) {
|
||||
|
||||
dhandle_t *handle = NULL;
|
||||
dhandle_t *handle = nullptr;
|
||||
std::unique_ptr<csync_file_stat_t> file_stat;
|
||||
DWORD rem;
|
||||
|
||||
@@ -166,7 +168,7 @@ std::unique_ptr<csync_file_stat_t> csync_vio_local_readdir(csync_vio_handle_t *d
|
||||
if (path == "." || path == "..")
|
||||
return csync_vio_local_readdir(dhandle);
|
||||
|
||||
file_stat.reset(new csync_file_stat_t);
|
||||
file_stat = std::make_unique<csync_file_stat_t>();
|
||||
file_stat->path = path;
|
||||
|
||||
if (handle->ffd.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) {
|
||||
@@ -232,9 +234,9 @@ static int _csync_vio_local_stat_mb(const mbchar_t *wuri, csync_file_stat_t *buf
|
||||
ULARGE_INTEGER FileIndex;
|
||||
|
||||
h = CreateFileW( wuri, 0, FILE_SHARE_WRITE | FILE_SHARE_READ | FILE_SHARE_DELETE,
|
||||
NULL, OPEN_EXISTING,
|
||||
nullptr, OPEN_EXISTING,
|
||||
FILE_ATTRIBUTE_NORMAL | FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OPEN_REPARSE_POINT,
|
||||
NULL );
|
||||
nullptr );
|
||||
if( h == INVALID_HANDLE_VALUE ) {
|
||||
qCCritical(lcCSyncVIOLocal, "CreateFileW failed on %ls", wuri);
|
||||
errno = GetLastError();
|
||||
|
||||
@@ -3,7 +3,10 @@ find_package(Qt5 REQUIRED COMPONENTS Widgets)
|
||||
set(CMAKE_AUTOMOC TRUE)
|
||||
set(CMAKE_AUTOUIC TRUE)
|
||||
set(CMAKE_AUTORCC TRUE)
|
||||
add_subdirectory(updater)
|
||||
|
||||
IF(BUILD_UPDATER)
|
||||
add_subdirectory(updater)
|
||||
endif()
|
||||
|
||||
#TODO Move resources files
|
||||
set(MIRALL_RC_SRC ../../client.qrc)
|
||||
@@ -49,7 +52,6 @@ set(client_SRCS
|
||||
accountmanager.cpp
|
||||
accountsettings.cpp
|
||||
application.cpp
|
||||
clientproxy.cpp
|
||||
connectionvalidator.cpp
|
||||
folder.cpp
|
||||
folderman.cpp
|
||||
@@ -109,7 +111,6 @@ set(client_SRCS
|
||||
creds/httpcredentialsgui.cpp
|
||||
creds/oauth.cpp
|
||||
creds/flow2auth.cpp
|
||||
creds/keychainchunk.cpp
|
||||
creds/webflowcredentials.cpp
|
||||
creds/webflowcredentialsdialog.cpp
|
||||
wizard/postfixlineedit.cpp
|
||||
@@ -138,18 +139,20 @@ IF(NOT NO_SHIBBOLETH)
|
||||
)
|
||||
endif()
|
||||
|
||||
set(updater_SRCS
|
||||
updater/ocupdater.cpp
|
||||
updater/updateinfo.cpp
|
||||
updater/updater.cpp
|
||||
)
|
||||
IF(BUILD_UPDATER)
|
||||
set(updater_SRCS
|
||||
updater/ocupdater.cpp
|
||||
updater/updateinfo.cpp
|
||||
updater/updater.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
IF( APPLE )
|
||||
list(APPEND client_SRCS cocoainitializer_mac.mm)
|
||||
list(APPEND client_SRCS socketapisocket_mac.mm)
|
||||
list(APPEND client_SRCS systray.mm)
|
||||
|
||||
if(SPARKLE_FOUND)
|
||||
if(SPARKLE_FOUND AND BUILD_UPDATER)
|
||||
# Define this, we need to check in updater.cpp
|
||||
add_definitions( -DHAVE_SPARKLE )
|
||||
list(APPEND updater_SRCS updater/sparkleupdater_mac.mm)
|
||||
@@ -297,9 +300,11 @@ else()
|
||||
install(FILES ${qtkeychain_I18N} DESTINATION ${QM_DIR})
|
||||
endif()
|
||||
|
||||
add_library(updater STATIC ${updater_SRCS})
|
||||
target_link_libraries(updater ${synclib_NAME} Qt5::Widgets Qt5::Network Qt5::Xml Qt5::WebEngineWidgets)
|
||||
target_include_directories(updater PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
IF(BUILD_UPDATER)
|
||||
add_library(updater STATIC ${updater_SRCS})
|
||||
target_link_libraries(updater ${synclib_NAME} Qt5::Widgets Qt5::Network Qt5::Xml)
|
||||
target_include_directories(updater PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
endif()
|
||||
|
||||
set_target_properties( ${APPLICATION_EXECUTABLE} PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY ${BIN_OUTPUT_DIRECTORY}
|
||||
@@ -308,9 +313,11 @@ set_target_properties( ${APPLICATION_EXECUTABLE} PROPERTIES
|
||||
set_target_properties( ${APPLICATION_EXECUTABLE} PROPERTIES
|
||||
INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}/${APPLICATION_EXECUTABLE};${CMAKE_INSTALL_RPATH}" )
|
||||
|
||||
target_link_libraries( ${APPLICATION_EXECUTABLE} Qt5::Widgets Qt5::Network Qt5::Xml)
|
||||
target_link_libraries( ${APPLICATION_EXECUTABLE} Qt5::Widgets Qt5::Network Qt5::Xml Qt5::WebEngineWidgets)
|
||||
target_link_libraries( ${APPLICATION_EXECUTABLE} ${synclib_NAME} )
|
||||
target_link_libraries( ${APPLICATION_EXECUTABLE} updater )
|
||||
IF(BUILD_UPDATER)
|
||||
target_link_libraries( ${APPLICATION_EXECUTABLE} updater )
|
||||
endif()
|
||||
target_link_libraries( ${APPLICATION_EXECUTABLE} ${OS_SPECIFIC_LINK_LIBRARIES} )
|
||||
IF( LIBCLOUDPROVIDERS_FOUND )
|
||||
string(TOLOWER "${APPLICATION_VENDOR}" DBUS_VENDOR)
|
||||
@@ -333,6 +340,7 @@ target_include_directories(${APPLICATION_EXECUTABLE} PRIVATE
|
||||
${CMAKE_SOURCE_DIR}/src/3rdparty/qtsingleapplication
|
||||
${CMAKE_SOURCE_DIR}/src/3rdparty/kmessagewidget
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
||||
## handle DBUS for Fdo notifications
|
||||
@@ -377,18 +385,27 @@ install(TARGETS ${APPLICATION_EXECUTABLE}
|
||||
#FIXME: find a nice solution to make the second if(BUILD_OWNCLOUD_OSX_BUNDLE) unnecessary
|
||||
# currently it needs to be done because the code right above needs to be executed no matter
|
||||
# if building a bundle or not and the install_qt4_executable needs to be called afterwards
|
||||
#
|
||||
# OSX: Run macdeployqt for src/gui and for src/cmd using the -executable option
|
||||
if(BUILD_OWNCLOUD_OSX_BUNDLE AND NOT BUILD_LIBRARIES_ONLY)
|
||||
get_target_property (QT_QMAKE_EXECUTABLE Qt5::qmake IMPORTED_LOCATION)
|
||||
install(CODE "
|
||||
message(STATUS \"Deploying (Qt) dependencies and fixing library paths...\")
|
||||
execute_process(COMMAND \"${CMAKE_SOURCE_DIR}/admin/osx/macdeployqt.py\" ${CMAKE_INSTALL_PREFIX}/${OWNCLOUD_OSX_BUNDLE} ${QT_QMAKE_EXECUTABLE})
|
||||
execute_process(COMMAND \"${CMAKE_SOURCE_DIR}/admin/osx/macdeployqt.py\" ${CMAKE_INSTALL_PREFIX}/${OWNCLOUD_OSX_BUNDLE}/Contents/Frameworks/QtWebEngineCore.framework/Helpers/QtWebEngineProcess.app ${QT_QMAKE_EXECUTABLE})
|
||||
" COMPONENT RUNTIME)
|
||||
get_target_property (QT_QMAKE_EXECUTABLE Qt5::qmake IMPORTED_LOCATION)
|
||||
get_filename_component(QT_BIN_DIR "${QT_QMAKE_EXECUTABLE}" DIRECTORY)
|
||||
find_program(MACDEPLOYQT_EXECUTABLE macdeployqt HINTS "${QT_BIN_DIR}")
|
||||
|
||||
set(cmd_NAME ${APPLICATION_EXECUTABLE}cmd)
|
||||
|
||||
add_custom_command(TARGET ${APPLICATION_EXECUTABLE} POST_BUILD
|
||||
COMMAND "${MACDEPLOYQT_EXECUTABLE}"
|
||||
"$<TARGET_FILE_DIR:${APPLICATION_EXECUTABLE}>/../.."
|
||||
-always-overwrite
|
||||
-executable="$<TARGET_FILE_DIR:${APPLICATION_EXECUTABLE}>/${cmd_NAME}"
|
||||
COMMENT "Running macdeployqt..."
|
||||
)
|
||||
endif()
|
||||
|
||||
if(NOT BUILD_OWNCLOUD_OSX_BUNDLE AND NOT WIN32)
|
||||
configure_file(${CMAKE_SOURCE_DIR}/mirall.desktop.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${APPLICATION_EXECUTABLE}.desktop)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${APPLICATION_EXECUTABLE}.desktop DESTINATION ${DATADIR}/applications )
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${LINUX_APPLICATION_ID}.desktop)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${LINUX_APPLICATION_ID}.desktop DESTINATION ${DATADIR}/applications )
|
||||
endif()
|
||||
|
||||
|
||||
@@ -539,7 +539,7 @@ void AccountSettings::slotLockForDecryptionError(const QByteArray& fileId, int h
|
||||
void AccountSettings::slotEditCurrentIgnoredFiles()
|
||||
{
|
||||
Folder *f = FolderMan::instance()->folder(selectedFolderAlias());
|
||||
if (f == nullptr)
|
||||
if (!f)
|
||||
return;
|
||||
openIgnoredFilesDialog(f->path());
|
||||
}
|
||||
@@ -969,7 +969,7 @@ void AccountSettings::slotUpdateQuota(qint64 total, qint64 used)
|
||||
_ui->quotaProgressBar->setVisible(false);
|
||||
_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 (#owncloud/client/issues/3940)*/
|
||||
if (total == 0 || total == -1) {
|
||||
_ui->quotaInfoLabel->setText(tr("Currently there is no storage usage information available."));
|
||||
} else {
|
||||
|
||||
@@ -68,7 +68,7 @@ signals:
|
||||
|
||||
public slots:
|
||||
void slotOpenOC();
|
||||
void slotUpdateQuota(qint64, qint64);
|
||||
void slotUpdateQuota(qint64 total, qint64 used);
|
||||
void slotAccountStateChanged();
|
||||
void slotStyleChanged();
|
||||
|
||||
|
||||
@@ -55,9 +55,7 @@ AccountState::AccountState(AccountPtr account)
|
||||
_timeSinceLastETagCheck.invalidate();
|
||||
}
|
||||
|
||||
AccountState::~AccountState()
|
||||
{
|
||||
}
|
||||
AccountState::~AccountState() = default;
|
||||
|
||||
AccountState *AccountState::loadFromSettings(AccountPtr account, QSettings & /*settings*/)
|
||||
{
|
||||
|
||||
@@ -139,7 +139,9 @@ QVariant ActivityListModel::data(const QModelIndex &index, int role) const
|
||||
case ActivityItemDelegate::AccountRole:
|
||||
return a._accName;
|
||||
case ActivityItemDelegate::PointInTimeRole:
|
||||
return QString("%1 (%2)").arg(a._dateTime.toLocalTime().toString(Qt::DefaultLocaleShortDate), Utility::timeAgoInWords(a._dateTime.toLocalTime()));
|
||||
return Utility::timeAgoInWords(a._dateTime.toLocalTime());
|
||||
case Qt::ToolTipRole:
|
||||
return a._dateTime.toLocalTime().toString(Qt::DefaultLocaleShortDate);
|
||||
case ActivityItemDelegate::AccountConnectedRole:
|
||||
return (ast && ast->isConnected());
|
||||
default:
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="labelPWDCertificate">
|
||||
<property name="text">
|
||||
<string>Certificate password :</string>
|
||||
<string>Certificate password:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
@@ -34,7 +34,11 @@
|
||||
#include "sharedialog.h"
|
||||
#include "accountmanager.h"
|
||||
#include "creds/abstractcredentials.h"
|
||||
|
||||
#if defined(BUILD_UPDATER)
|
||||
#include "updater/ocupdater.h"
|
||||
#endif
|
||||
|
||||
#include "owncloudsetupwizard.h"
|
||||
#include "version.h"
|
||||
|
||||
@@ -52,6 +56,7 @@
|
||||
#include <QMenu>
|
||||
#include <QMessageBox>
|
||||
#include <QDesktopServices>
|
||||
#include <QGuiApplication>
|
||||
|
||||
class QSocket;
|
||||
|
||||
@@ -63,8 +68,9 @@ namespace {
|
||||
|
||||
static const char optionsC[] =
|
||||
"Options:\n"
|
||||
" -h --help : show this help screen.\n"
|
||||
" --logwindow : open a window to show log output.\n"
|
||||
" --help, -h : show this help screen.\n"
|
||||
" --version, -v : show version information.\n"
|
||||
" --logwindow, -l : open a window to show log output.\n"
|
||||
" --logfile <filename> : write log output to file <filename>.\n"
|
||||
" --logdir <name> : write each sync log output in a new file\n"
|
||||
" in folder <name>.\n"
|
||||
@@ -123,6 +129,15 @@ Application::Application(int &argc, char **argv)
|
||||
// TODO: Can't set this without breaking current config paths
|
||||
// setOrganizationName(QLatin1String(APPLICATION_VENDOR));
|
||||
setOrganizationDomain(QLatin1String(APPLICATION_REV_DOMAIN));
|
||||
|
||||
// setDesktopFilename to provide wayland compatibility (in general: conformance with naming standards)
|
||||
// but only on Qt >= 5.7, where setDesktopFilename was introduced
|
||||
#if (QT_VERSION >= 0x050700)
|
||||
QString desktopFileName = QString(QLatin1String(LINUX_APPLICATION_ID)
|
||||
+ QLatin1String(".desktop"));
|
||||
setDesktopFileName(desktopFileName);
|
||||
#endif
|
||||
|
||||
setApplicationName(_theme->appName());
|
||||
setWindowIcon(_theme->applicationIcon());
|
||||
setAttribute(Qt::AA_UseHighDpiPixmaps, true);
|
||||
@@ -245,12 +260,14 @@ Application::Application(int &argc, char **argv)
|
||||
connect(&_networkConfigurationManager, &QNetworkConfigurationManager::configurationChanged,
|
||||
this, &Application::slotSystemOnlineConfigurationChanged);
|
||||
|
||||
#if defined(BUILD_UPDATER)
|
||||
// Update checks
|
||||
UpdaterScheduler *updaterScheduler = new UpdaterScheduler(this);
|
||||
connect(updaterScheduler, &UpdaterScheduler::updaterAnnouncement,
|
||||
_gui.data(), &ownCloudGui::slotShowTrayMessage);
|
||||
connect(updaterScheduler, &UpdaterScheduler::requestRestart,
|
||||
_folderManager.data(), &FolderMan::slotScheduleAppRestart);
|
||||
#endif
|
||||
|
||||
// Cleanup at Quit.
|
||||
connect(this, &QCoreApplication::aboutToQuit, this, &Application::slotCleanup);
|
||||
@@ -392,10 +409,10 @@ void Application::setupLogging()
|
||||
// might be called from second instance
|
||||
auto logger = Logger::instance();
|
||||
logger->setLogFile(_logFile);
|
||||
logger->setLogDir(_logDir);
|
||||
logger->setLogExpire(_logExpire);
|
||||
logger->setLogFlush(_logFlush);
|
||||
logger->setLogDebug(_logDebug);
|
||||
logger->setLogDir(!_logDir.isEmpty() ? _logDir : ConfigFile().logDir());
|
||||
logger->setLogExpire(_logExpire > 0 ? _logExpire : ConfigFile().logExpire());
|
||||
logger->setLogFlush(_logFlush || ConfigFile().logFlush());
|
||||
logger->setLogDebug(_logDebug || ConfigFile().logDebug());
|
||||
if (!logger->isLoggingToFile() && ConfigFile().automaticLogDir()) {
|
||||
logger->setupTemporaryFolderLogDir();
|
||||
}
|
||||
@@ -479,7 +496,7 @@ void Application::parseOptions(const QStringList &options)
|
||||
_debugMode = true;
|
||||
} else if (option == QLatin1String("--background")) {
|
||||
_backgroundMode = true;
|
||||
} else if (option == QLatin1String("--version")) {
|
||||
} else if (option == QLatin1String("--version") || option == QLatin1String("-v")) {
|
||||
_versionOnly = true;
|
||||
} else {
|
||||
showHint("Unrecognized option '" + option.toStdString() + "'");
|
||||
|
||||
@@ -51,29 +51,28 @@ void CloudProviderManager::registerSignals()
|
||||
|
||||
CloudProviderManager::CloudProviderManager(QObject *parent) : QObject(parent)
|
||||
{
|
||||
_map = new QMap<QString, CloudProviderWrapper*>();
|
||||
_folder_index = 0;
|
||||
g_bus_own_name (G_BUS_TYPE_SESSION, LIBCLOUDPROVIDERS_DBUS_BUS_NAME, G_BUS_NAME_OWNER_FLAGS_NONE, nullptr, on_name_acquired, nullptr, this, nullptr);
|
||||
}
|
||||
|
||||
void CloudProviderManager::slotFolderListChanged(const Folder::Map &folderMap)
|
||||
{
|
||||
QMapIterator<QString, CloudProviderWrapper*> i(*_map);
|
||||
QMapIterator<QString, CloudProviderWrapper*> i(_map);
|
||||
while (i.hasNext()) {
|
||||
i.next();
|
||||
if (!folderMap.contains(i.key())) {
|
||||
cloud_providers_provider_exporter_remove_account(_providerExporter, i.value()->accountExporter());
|
||||
delete _map->find(i.key()).value();
|
||||
_map->remove(i.key());
|
||||
delete _map.find(i.key()).value();
|
||||
_map.remove(i.key());
|
||||
}
|
||||
}
|
||||
|
||||
Folder::MapIterator j(folderMap);
|
||||
while (j.hasNext()) {
|
||||
j.next();
|
||||
if (!_map->contains(j.key())) {
|
||||
if (!_map.contains(j.key())) {
|
||||
auto *cpo = new CloudProviderWrapper(this, j.value(), _folder_index++, _providerExporter);
|
||||
_map->insert(j.key(), cpo);
|
||||
_map.insert(j.key(), cpo);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ public slots:
|
||||
void slotFolderListChanged(const Folder::Map &folderMap);
|
||||
|
||||
private:
|
||||
QMap<QString, CloudProviderWrapper*> *_map;
|
||||
QMap<QString, CloudProviderWrapper*> _map;
|
||||
unsigned int _folder_index;
|
||||
};
|
||||
|
||||
|
||||
@@ -38,7 +38,6 @@ CloudProviderWrapper::CloudProviderWrapper(QObject *parent, Folder *folder, int
|
||||
{
|
||||
GMenuModel *model;
|
||||
GActionGroup *action_group;
|
||||
_recentlyChanged = new QList<QPair<QString, QString>>();
|
||||
QString accountName = QString("Folder/%1").arg(folderId);
|
||||
|
||||
_cloudProvider = CLOUD_PROVIDERS_PROVIDER_EXPORTER(cloudprovider);
|
||||
@@ -108,11 +107,11 @@ void CloudProviderWrapper::slotUpdateProgress(const QString &folder, const Progr
|
||||
if (f) {
|
||||
QString fullPath = f->path() + '/' + progress._lastCompletedItem._file;
|
||||
if (QFile(fullPath).exists()) {
|
||||
if (_recentlyChanged->length() > 5)
|
||||
_recentlyChanged->removeFirst();
|
||||
_recentlyChanged->append(qMakePair(actionText, fullPath));
|
||||
if (_recentlyChanged.length() > 5)
|
||||
_recentlyChanged.removeFirst();
|
||||
_recentlyChanged.append(qMakePair(actionText, fullPath));
|
||||
} else {
|
||||
_recentlyChanged->append(qMakePair(actionText, QString("")));
|
||||
_recentlyChanged.append(qMakePair(actionText, QString("")));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -151,9 +150,9 @@ void CloudProviderWrapper::slotUpdateProgress(const QString &folder, const Progr
|
||||
&& shouldShowInRecentsMenu(progress._lastCompletedItem)) {
|
||||
GMenuItem* item;
|
||||
g_menu_remove_all (G_MENU(_recentMenu));
|
||||
if(!_recentlyChanged->isEmpty()) {
|
||||
if(!_recentlyChanged.isEmpty()) {
|
||||
QList<QPair<QString, QString>>::iterator i;
|
||||
for (i = _recentlyChanged->begin(); i != _recentlyChanged->end(); i++) {
|
||||
for (i = _recentlyChanged.begin(); i != _recentlyChanged.end(); i++) {
|
||||
QString label = i->first;
|
||||
QString fullPath = i->second;
|
||||
item = menu_item_new(label, "cloudprovider.showfile");
|
||||
@@ -287,7 +286,7 @@ activate_action_open (GSimpleAction *action, GVariant *parameter, gpointer user_
|
||||
}
|
||||
|
||||
if(g_str_equal(name, "showfile")) {
|
||||
const gchar *path = g_variant_get_string (parameter, NULL);
|
||||
const gchar *path = g_variant_get_string(parameter, nullptr);
|
||||
g_print("showfile => %s\n", path);
|
||||
showInFileManager(QString(path));
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ private:
|
||||
Folder *_folder;
|
||||
CloudProvidersProviderExporter *_cloudProvider;
|
||||
CloudProvidersAccountExporter *_cloudProviderAccount;
|
||||
QList<QPair<QString, QString>> *_recentlyChanged;
|
||||
QList<QPair<QString, QString>> _recentlyChanged;
|
||||
bool _paused;
|
||||
GMenu* _mainMenu = nullptr;
|
||||
GMenu* _recentMenu = nullptr;
|
||||
|
||||
@@ -76,7 +76,7 @@ void ConnectionValidator::systemProxyLookupDone(const QNetworkProxy &proxy)
|
||||
}
|
||||
|
||||
if (proxy.type() != QNetworkProxy::NoProxy) {
|
||||
qCInfo(lcConnectionValidator) << "Setting QNAM proxy to be system proxy" << printQNetworkProxy(proxy);
|
||||
qCInfo(lcConnectionValidator) << "Setting QNAM proxy to be system proxy" << ClientProxy::printQNetworkProxy(proxy);
|
||||
} else {
|
||||
qCInfo(lcConnectionValidator) << "No system proxy set by OS";
|
||||
}
|
||||
|
||||
@@ -41,9 +41,7 @@ Flow2Auth::Flow2Auth(Account *account, QObject *parent)
|
||||
QObject::connect(&_pollTimer, &QTimer::timeout, this, &Flow2Auth::slotPollTimerTimeout);
|
||||
}
|
||||
|
||||
Flow2Auth::~Flow2Auth()
|
||||
{
|
||||
}
|
||||
Flow2Auth::~Flow2Auth() = default;
|
||||
|
||||
void Flow2Auth::start()
|
||||
{
|
||||
|
||||
@@ -1,221 +0,0 @@
|
||||
/*
|
||||
* 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
|
||||
@@ -1,120 +0,0 @@
|
||||
/*
|
||||
* 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
|
||||
@@ -27,9 +27,7 @@ namespace OCC {
|
||||
|
||||
Q_LOGGING_CATEGORY(lcOauth, "nextcloud.sync.credentials.oauth", QtInfoMsg)
|
||||
|
||||
OAuth::~OAuth()
|
||||
{
|
||||
}
|
||||
OAuth::~OAuth() = default;
|
||||
|
||||
static void httpReplyAndClose(QTcpSocket *socket, const char *code, const char *html,
|
||||
const char *moreHeaders = nullptr)
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
#include "webflowcredentials.h"
|
||||
|
||||
#include "creds/httpcredentials.h"
|
||||
#include "creds/keychainchunk.h"
|
||||
|
||||
#include <QAuthenticator>
|
||||
#include <QNetworkAccessManager>
|
||||
#include <QNetworkReply>
|
||||
#include <QPointer>
|
||||
#include <QTimer>
|
||||
#include <keychain.h>
|
||||
#include <QDialog>
|
||||
#include <QVBoxLayout>
|
||||
#include <QLabel>
|
||||
@@ -18,13 +18,12 @@
|
||||
#include "theme.h"
|
||||
#include "wizard/webview.h"
|
||||
#include "webflowcredentialsdialog.h"
|
||||
#include "keychainchunk.h"
|
||||
|
||||
using namespace QKeychain;
|
||||
|
||||
namespace OCC {
|
||||
|
||||
Q_LOGGING_CATEGORY(lcWebFlowCredentials, "sync.credentials.webflow", QtInfoMsg)
|
||||
Q_LOGGING_CATEGORY(lcWebFlowCredentials, "nextcloud.sync.credentials.webflow", QtInfoMsg)
|
||||
|
||||
namespace {
|
||||
const char userC[] = "user";
|
||||
@@ -87,10 +86,6 @@ static void addSettingsToJob(Account *account, QKeychain::Job *job)
|
||||
#endif
|
||||
|
||||
WebFlowCredentials::WebFlowCredentials()
|
||||
: _ready(false)
|
||||
, _credentialsValid(false)
|
||||
, _keychainMigration(false)
|
||||
, _retryOnKeyChainError(false)
|
||||
{
|
||||
|
||||
}
|
||||
@@ -103,8 +98,6 @@ WebFlowCredentials::WebFlowCredentials(const QString &user, const QString &passw
|
||||
, _clientSslCaCertificates(caCertificates)
|
||||
, _ready(true)
|
||||
, _credentialsValid(true)
|
||||
, _keychainMigration(false)
|
||||
, _retryOnKeyChainError(false)
|
||||
{
|
||||
|
||||
}
|
||||
@@ -152,7 +145,7 @@ void WebFlowCredentials::fetchFromKeychain() {
|
||||
void WebFlowCredentials::askFromUser() {
|
||||
// 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);
|
||||
auto job = new DetermineAuthTypeJob(_account->sharedFromThis(), this);
|
||||
connect(job, &DetermineAuthTypeJob::authType, [this](DetermineAuthTypeJob::AuthType type) {
|
||||
// LoginFlowV2 > WebViewFlow > OAuth > Shib > Basic
|
||||
bool useFlow2 = (type != DetermineAuthTypeJob::WebViewFlow);
|
||||
@@ -183,7 +176,11 @@ void WebFlowCredentials::askFromUser() {
|
||||
void WebFlowCredentials::slotAskFromUserCredentialsProvided(const QString &user, const QString &pass, const QString &host) {
|
||||
Q_UNUSED(host)
|
||||
|
||||
if (_user != user) {
|
||||
// Compare the re-entered username case-insensitive and save the new value (avoid breaking the account)
|
||||
// See issue: https://github.com/nextcloud/desktop/issues/1741
|
||||
if (QString::compare(_user, user, Qt::CaseInsensitive) == 0) {
|
||||
_user = user;
|
||||
} else {
|
||||
qCInfo(lcWebFlowCredentials()) << "Authed with the wrong user!";
|
||||
|
||||
QString msg = tr("Please login with the user: %1")
|
||||
@@ -241,9 +238,10 @@ void WebFlowCredentials::persist() {
|
||||
|
||||
// write cert if there is one
|
||||
if (!_clientSslCertificate.isNull()) {
|
||||
auto *job = new KeychainChunk::WriteJob(_account,
|
||||
_user + clientCertificatePEMC,
|
||||
_clientSslCertificate.toPem());
|
||||
auto job = new KeychainChunk::WriteJob(_account,
|
||||
_user + clientCertificatePEMC,
|
||||
_clientSslCertificate.toPem(),
|
||||
this);
|
||||
connect(job, &KeychainChunk::WriteJob::finished, this, &WebFlowCredentials::slotWriteClientCertPEMJobDone);
|
||||
job->start();
|
||||
} else {
|
||||
@@ -254,14 +252,12 @@ void WebFlowCredentials::persist() {
|
||||
|
||||
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());
|
||||
auto job = new KeychainChunk::WriteJob(_account,
|
||||
_user + clientKeyPEMC,
|
||||
_clientSslKey.toPem(),
|
||||
this);
|
||||
connect(job, &KeychainChunk::WriteJob::finished, this, &WebFlowCredentials::slotWriteClientKeyPEMJobDone);
|
||||
job->start();
|
||||
} else {
|
||||
@@ -289,9 +285,10 @@ void WebFlowCredentials::writeSingleClientCaCertPEM()
|
||||
return;
|
||||
}
|
||||
|
||||
auto *job = new KeychainChunk::WriteJob(_account,
|
||||
_user + clientCaCertificatePEMC + QString::number(index),
|
||||
cert.toPem());
|
||||
auto job = new KeychainChunk::WriteJob(_account,
|
||||
_user + clientCaCertificatePEMC + QString::number(index),
|
||||
cert.toPem(),
|
||||
this);
|
||||
connect(job, &KeychainChunk::WriteJob::finished, this, &WebFlowCredentials::slotWriteClientCaCertsPEMJobDone);
|
||||
job->start();
|
||||
} else {
|
||||
@@ -301,9 +298,6 @@ void WebFlowCredentials::writeSingleClientCaCertPEM()
|
||||
|
||||
void WebFlowCredentials::slotWriteClientKeyPEMJobDone(KeychainChunk::WriteJob *writeJob)
|
||||
{
|
||||
if(writeJob)
|
||||
writeJob->deleteLater();
|
||||
|
||||
_clientSslCaCertificatesWriteQueue.clear();
|
||||
|
||||
// write ca certs if there are any
|
||||
@@ -326,8 +320,6 @@ void WebFlowCredentials::slotWriteClientCaCertsPEMJobDone(KeychainChunk::WriteJo
|
||||
qCWarning(lcWebFlowCredentials) << "Error while writing client CA cert" << writeJob->errorString();
|
||||
}
|
||||
|
||||
writeJob->deleteLater();
|
||||
|
||||
if (!_clientSslCaCertificatesWriteQueue.isEmpty()) {
|
||||
// next ca cert
|
||||
writeSingleClientCaCertPEM();
|
||||
@@ -336,7 +328,7 @@ void WebFlowCredentials::slotWriteClientCaCertsPEMJobDone(KeychainChunk::WriteJo
|
||||
}
|
||||
|
||||
// done storing ca certs, time for the password
|
||||
WritePasswordJob *job = new WritePasswordJob(Theme::instance()->appName());
|
||||
auto job = new WritePasswordJob(Theme::instance()->appName(), this);
|
||||
#if defined(KEYCHAINCHUNK_ENABLE_INSECURE_FALLBACK)
|
||||
addSettingsToJob(_account, job);
|
||||
#endif
|
||||
@@ -356,8 +348,6 @@ void WebFlowCredentials::slotWriteJobDone(QKeychain::Job *job)
|
||||
default:
|
||||
qCWarning(lcWebFlowCredentials) << "Error while writing password" << job->errorString();
|
||||
}
|
||||
WritePasswordJob *wjob = qobject_cast<WritePasswordJob *>(job);
|
||||
wjob->deleteLater();
|
||||
}
|
||||
|
||||
void WebFlowCredentials::invalidateToken() {
|
||||
@@ -386,13 +376,9 @@ void WebFlowCredentials::forgetSensitiveData() {
|
||||
return;
|
||||
}
|
||||
|
||||
DeletePasswordJob *job = new DeletePasswordJob(Theme::instance()->appName());
|
||||
auto job = new DeletePasswordJob(Theme::instance()->appName(), this);
|
||||
job->setInsecureFallback(false);
|
||||
job->setKey(kck);
|
||||
connect(job, &Job::finished, this, [](QKeychain::Job *job) {
|
||||
DeletePasswordJob *djob = qobject_cast<DeletePasswordJob *>(job);
|
||||
djob->deleteLater();
|
||||
});
|
||||
job->start();
|
||||
|
||||
invalidateToken();
|
||||
@@ -443,30 +429,16 @@ void WebFlowCredentials::slotFinished(QNetworkReply *reply) {
|
||||
|
||||
void WebFlowCredentials::fetchFromKeychainHelper() {
|
||||
// Read client cert from keychain
|
||||
auto *job = new KeychainChunk::ReadJob(_account,
|
||||
_user + clientCertificatePEMC,
|
||||
_keychainMigration);
|
||||
auto job = new KeychainChunk::ReadJob(_account,
|
||||
_user + clientCertificatePEMC,
|
||||
_keychainMigration,
|
||||
this);
|
||||
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);
|
||||
@@ -475,12 +447,11 @@ void WebFlowCredentials::slotReadClientCertPEMJobDone(KeychainChunk::ReadJob *re
|
||||
}
|
||||
}
|
||||
|
||||
readJob->deleteLater();
|
||||
|
||||
// Load key too
|
||||
auto *job = new KeychainChunk::ReadJob(_account,
|
||||
_user + clientKeyPEMC,
|
||||
_keychainMigration);
|
||||
auto job = new KeychainChunk::ReadJob(_account,
|
||||
_user + clientKeyPEMC,
|
||||
_keychainMigration,
|
||||
this);
|
||||
connect(job, &KeychainChunk::ReadJob::finished, this, &WebFlowCredentials::slotReadClientKeyPEMJobDone);
|
||||
job->start();
|
||||
}
|
||||
@@ -507,8 +478,6 @@ void WebFlowCredentials::slotReadClientKeyPEMJobDone(KeychainChunk::ReadJob *rea
|
||||
qCWarning(lcWebFlowCredentials) << "Unable to read client key" << readJob->errorString();
|
||||
}
|
||||
|
||||
readJob->deleteLater();
|
||||
|
||||
// Start fetching client CA certs
|
||||
_clientSslCaCertificates.clear();
|
||||
|
||||
@@ -519,9 +488,10 @@ 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);
|
||||
auto job = new KeychainChunk::ReadJob(_account,
|
||||
_user + clientCaCertificatePEMC + QString::number(_clientSslCaCertificates.count()),
|
||||
_keychainMigration,
|
||||
this);
|
||||
connect(job, &KeychainChunk::ReadJob::finished, this, &WebFlowCredentials::slotReadClientCaCertsPEMJobDone);
|
||||
job->start();
|
||||
} else {
|
||||
@@ -540,8 +510,6 @@ void WebFlowCredentials::slotReadClientCaCertsPEMJobDone(KeychainChunk::ReadJob
|
||||
_clientSslCaCertificates.append(sslCertificateList.at(0));
|
||||
}
|
||||
|
||||
readJob->deleteLater();
|
||||
|
||||
// try next cert
|
||||
readSingleClientCaCertPEM();
|
||||
return;
|
||||
@@ -551,8 +519,6 @@ void WebFlowCredentials::slotReadClientCaCertsPEMJobDone(KeychainChunk::ReadJob
|
||||
qCWarning(lcWebFlowCredentials) << "Unable to read client CA cert slot" << QString::number(_clientSslCaCertificates.count()) << readJob->errorString();
|
||||
}
|
||||
}
|
||||
|
||||
readJob->deleteLater();
|
||||
}
|
||||
|
||||
// Now fetch the actual server password
|
||||
@@ -561,7 +527,7 @@ void WebFlowCredentials::slotReadClientCaCertsPEMJobDone(KeychainChunk::ReadJob
|
||||
_user,
|
||||
_keychainMigration ? QString() : _account->id());
|
||||
|
||||
ReadPasswordJob *job = new ReadPasswordJob(Theme::instance()->appName());
|
||||
auto job = new ReadPasswordJob(Theme::instance()->appName(), this);
|
||||
#if defined(KEYCHAINCHUNK_ENABLE_INSECURE_FALLBACK)
|
||||
addSettingsToJob(_account, job);
|
||||
#endif
|
||||
@@ -572,7 +538,7 @@ void WebFlowCredentials::slotReadClientCaCertsPEMJobDone(KeychainChunk::ReadJob
|
||||
}
|
||||
|
||||
void WebFlowCredentials::slotReadPasswordJobDone(Job *incomingJob) {
|
||||
QKeychain::ReadPasswordJob *job = qobject_cast<ReadPasswordJob *>(incomingJob);
|
||||
auto job = qobject_cast<ReadPasswordJob *>(incomingJob);
|
||||
QKeychain::Error error = job->error();
|
||||
|
||||
// If we could not find the entry try the old entries
|
||||
@@ -595,8 +561,6 @@ void WebFlowCredentials::slotReadPasswordJobDone(Job *incomingJob) {
|
||||
}
|
||||
emit fetched();
|
||||
|
||||
job->deleteLater();
|
||||
|
||||
// If keychain data was read from legacy location, wipe these entries and store new ones
|
||||
if (_keychainMigration && _ready) {
|
||||
_keychainMigration = false;
|
||||
@@ -608,19 +572,7 @@ void WebFlowCredentials::slotReadPasswordJobDone(Job *incomingJob) {
|
||||
|
||||
void WebFlowCredentials::deleteKeychainEntries(bool oldKeychainEntries) {
|
||||
auto startDeleteJob = [this, oldKeychainEntries](QString key) {
|
||||
DeletePasswordJob *job = new DeletePasswordJob(Theme::instance()->appName());
|
||||
#if defined(KEYCHAINCHUNK_ENABLE_INSECURE_FALLBACK)
|
||||
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();
|
||||
});
|
||||
auto job = new KeychainChunk::DeleteJob(_account, key, oldKeychainEntries, this);
|
||||
job->start();
|
||||
};
|
||||
|
||||
@@ -637,27 +589,17 @@ void WebFlowCredentials::deleteKeychainEntries(bool oldKeychainEntries) {
|
||||
*/
|
||||
if(_account->isRemoteWipeRequested_HACK()) {
|
||||
// <-- FIXME MS@2019-12-07
|
||||
|
||||
// Also delete key / cert sub-chunks (KeychainChunk takes care of the Windows workaround)
|
||||
// The first chunk (0) has no suffix, to stay compatible with older versions and non-Windows
|
||||
startDeleteJob(_user + clientKeyPEMC);
|
||||
startDeleteJob(_user + clientCertificatePEMC);
|
||||
|
||||
// CA cert slots
|
||||
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
|
||||
|
||||
@@ -119,12 +119,11 @@ protected:
|
||||
QSslCertificate _clientSslCertificate;
|
||||
QList<QSslCertificate> _clientSslCaCertificates;
|
||||
|
||||
bool _ready;
|
||||
bool _credentialsValid;
|
||||
bool _keychainMigration;
|
||||
bool _retryOnKeyChainError = true; // true if we haven't done yet any reading from keychain
|
||||
bool _ready = false;
|
||||
bool _credentialsValid = false;
|
||||
bool _keychainMigration = false;
|
||||
|
||||
WebFlowCredentialsDialog *_askDialog;
|
||||
WebFlowCredentialsDialog *_askDialog = nullptr;
|
||||
};
|
||||
|
||||
} // namespace OCC
|
||||
|
||||
@@ -82,7 +82,7 @@ Folder::Folder(const FolderDefinition &definition,
|
||||
qCWarning(lcFolder, "Could not read system exclude file");
|
||||
|
||||
connect(_accountState.data(), &AccountState::isConnectedChanged, this, &Folder::canSyncChanged);
|
||||
connect(_engine.data(), &SyncEngine::rootEtag, this, &Folder::etagRetreivedFromSyncEngine);
|
||||
connect(_engine.data(), &SyncEngine::rootEtag, this, &Folder::etagRetrievedFromSyncEngine);
|
||||
|
||||
connect(_engine.data(), &SyncEngine::started, this, &Folder::slotSyncStarted, Qt::QueuedConnection);
|
||||
connect(_engine.data(), &SyncEngine::finished, this, &Folder::slotSyncFinished, Qt::QueuedConnection);
|
||||
@@ -293,12 +293,12 @@ void Folder::slotRunEtagJob()
|
||||
_requestEtagJob = new RequestEtagJob(account, remotePath(), this);
|
||||
_requestEtagJob->setTimeout(60 * 1000);
|
||||
// check if the etag is different when retrieved
|
||||
QObject::connect(_requestEtagJob.data(), &RequestEtagJob::etagRetreived, this, &Folder::etagRetreived);
|
||||
QObject::connect(_requestEtagJob.data(), &RequestEtagJob::etagRetrieved, this, &Folder::etagRetrieved);
|
||||
FolderMan::instance()->slotScheduleETagJob(alias(), _requestEtagJob);
|
||||
// The _requestEtagJob is auto deleting itself on finish. Our guard pointer _requestEtagJob will then be null.
|
||||
}
|
||||
|
||||
void Folder::etagRetreived(const QString &etag)
|
||||
void Folder::etagRetrieved(const QString &etag)
|
||||
{
|
||||
// re-enable sync if it was disabled because network was down
|
||||
FolderMan::instance()->setSyncEnabled(true);
|
||||
@@ -312,7 +312,7 @@ void Folder::etagRetreived(const QString &etag)
|
||||
_accountState->tagLastSuccessfullETagRequest();
|
||||
}
|
||||
|
||||
void Folder::etagRetreivedFromSyncEngine(const QString &etag)
|
||||
void Folder::etagRetrievedFromSyncEngine(const QString &etag)
|
||||
{
|
||||
qCInfo(lcFolder) << "Root etag from during sync:" << etag;
|
||||
accountState()->tagLastSuccessfullETagRequest();
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user