Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace private API QZipWriter with KArchive #4768

Merged
merged 1 commit into from
Sep 7, 2022
Merged

Conversation

claucambra
Copy link
Collaborator

@claucambra claucambra commented Jul 21, 2022

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 claudio.cambra@gmail.com

@allexzander
Copy link
Contributor

@claucambra This KF5Archive seems to be unavailable on our CI (both drone and Windows).

@claucambra
Copy link
Collaborator Author

claucambra commented Aug 2, 2022

@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 nextcloud/desktop-client-blueprints#4 to add it to our Craft blueprint, merging #4704 should also fix issues

@claucambra claucambra force-pushed the bugfix/karchive branch 6 times, most recently from 9200364 to d4a8b7f Compare August 4, 2022 14:19
@sonarcloud
Copy link

sonarcloud bot commented Aug 4, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@codecov
Copy link

codecov bot commented Aug 4, 2022

Codecov Report

Merging #4768 (de9d8b6) into master (ee513b6) will decrease coverage by 0.35%.
The diff coverage is n/a.

❗ 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%) ⬇️
src/libsync/configfile.cpp 16.69% <0.00%> (-9.05%) ⬇️
src/libsync/owncloudpropagator.h 73.28% <0.00%> (-1.16%) ⬇️
src/libsync/theme.cpp 12.07% <0.00%> (-0.61%) ⬇️
src/libsync/bulkpropagatorjob.cpp 72.14% <0.00%> (-0.16%) ⬇️
src/libsync/owncloudpropagator.cpp 86.00% <0.00%> (-0.03%) ⬇️
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%) ⬆️
src/libsync/propagatedownload.cpp 65.18% <0.00%> (+0.14%) ⬆️
... and 3 more

admin/linux/build-appimage.sh Outdated Show resolved Hide resolved
Signed-off-by: Claudio Cambra <claudio.cambra@gmail.com>
@sonarcloud
Copy link

sonarcloud bot commented Sep 7, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@nextcloud-desktop-bot
Copy link

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.

@claucambra claucambra merged commit 1f4d340 into master Sep 7, 2022
@claucambra claucambra deleted the bugfix/karchive branch September 7, 2022 17:42
@mgallien mgallien added this to the 3.7.0 milestone Oct 3, 2022
mdkcore0 added a commit to mdkcore0/void-packages that referenced this pull request Feb 23, 2023
Also:
- Add karchive as dependency [1]
- Add patch to revert mandatory WebEngine dependency [2]

[1] nextcloud/desktop#4768
[2] nextcloud/desktop#4875
mdkcore0 added a commit to mdkcore0/void-packages that referenced this pull request Mar 7, 2023
Also:
- Add karchive as dependency [1]
- Add patch to revert mandatory WebEngine dependency [2]

[1] nextcloud/desktop#4768
[2] nextcloud/desktop#4875
paper42 pushed a commit to void-linux/void-packages that referenced this pull request Mar 9, 2023
Also:
- Add karchive as dependency [1]
- Add patch to revert mandatory WebEngine dependency [2]

[1] nextcloud/desktop#4768
[2] nextcloud/desktop#4875
kaistian pushed a commit to kaistian/void-packages that referenced this pull request Mar 13, 2023
Also:
- Add karchive as dependency [1]
- Add patch to revert mandatory WebEngine dependency [2]

[1] nextcloud/desktop#4768
[2] nextcloud/desktop#4875
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Usage of private Qt class QZipWriter
4 participants