desktop
desktop copied to clipboard
Replace private API QZipWriter with KArchive
Qt doesn't provide any public utilities for creating ZIP archives, and by using QZipWriter we are at the mercy of this API changing without warning. From qzipwriter.h
:
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists for the convenience
// of the QZipWriter class. This header file may change from
// version to version without notice, or even be removed.
//
// We mean it.
//
KArchive exists as a Qt add-on that should let us easily replace our use of QZipWriter without dragging in any other dependencies. This will likely require a small addition to our build andCI infra to add KArchive to our CMake build, but it should fully eliminate the risk of depending on the private API.
Fixes #3723
Signed-off-by: Claudio Cambra [email protected]
@claucambra This KF5Archive seems to be unavailable on our CI (both drone and Windows).
@claucambra This KF5Archive seems to be unavailable on our CI (both drone and Windows).
A patch do add it to the docker CI is merged, just opened https://github.com/nextcloud/desktop-client-blueprints/pull/4 to add it to our Craft blueprint, merging #4704 should also fix issues
Kudos, SonarCloud Quality Gate passed! Â
Codecov Report
Merging #4768 (de9d8b6) into master (ee513b6) will decrease coverage by
0.35%
. The diff coverage isn/a
.
:exclamation: Current head de9d8b6 differs from pull request most recent head 9a0753d. Consider uploading reports for the commit 9a0753d to get more accurate results
@@ Coverage Diff @@
## master #4768 +/- ##
==========================================
- Coverage 57.15% 56.79% -0.36%
==========================================
Files 138 138
Lines 17135 17143 +8
==========================================
- Hits 9794 9737 -57
- Misses 7341 7406 +65
Impacted Files | Coverage Δ | |
---|---|---|
src/libsync/syncoptions.cpp | 20.00% <0.00%> (-45.72%) |
:arrow_down: |
src/libsync/configfile.cpp | 16.69% <0.00%> (-9.05%) |
:arrow_down: |
src/libsync/owncloudpropagator.h | 73.28% <0.00%> (-1.16%) |
:arrow_down: |
src/libsync/theme.cpp | 12.07% <0.00%> (-0.61%) |
:arrow_down: |
src/libsync/bulkpropagatorjob.cpp | 72.14% <0.00%> (-0.16%) |
:arrow_down: |
src/libsync/owncloudpropagator.cpp | 86.00% <0.00%> (-0.03%) |
:arrow_down: |
src/libsync/syncengine.h | 43.75% <0.00%> (ø) |
|
src/libsync/syncengine.cpp | 87.20% <0.00%> (ø) |
|
src/libsync/vfs/cfapi/cfapiwrapper.cpp | 74.25% <0.00%> (+0.05%) |
:arrow_up: |
src/libsync/propagatedownload.cpp | 65.18% <0.00%> (+0.14%) |
:arrow_up: |
... and 3 more |
Kudos, SonarCloud Quality Gate passed! Â
AppImage file: nextcloud-PR-4768-9a0753dabb061b4e3ac753cbdfd272d9bb256212-x86_64.AppImage
To test this change/fix you can simply download above AppImage file and test it.
Please make sure to quit your existing Nextcloud app and backup your data.