Fix null pointer dereference, keep FileModifyJob metadata and serialize with…

Authored by barchiesi on Oct 1 2019, 11:59 AM.

Description

Fix null pointer dereference, keep FileModifyJob metadata and serialize with options.

Summary:
This patch fixes a couple issues regarding FileAbstractUploadJob and FileModifyJob:

  • Fix null pointer dereference that was causing BUG 411634. This was introduced in D22787: Use mimeType from metadata instead of blindly re-determining it during uploads and in the affected block of code the mime-type must be determined by LibKGAPI as no File metadata was provided.
  • Pass File metadata from FileModifyJob ctor to FileAbstractUploadJob ctor. This was letting KIO GDrive trigger the above bug when trying to specify the modified files mime-type.
  • Use provided serialization options also in FilePtr serialization during building multipart request.

BUG: 411634

Reviewers: dvratil

Reviewed By: dvratil

Subscribers: LibKGAPI, kde-pim

Tags: KDE PIM, LibKGAPI

Differential Revision: https://phabricator.kde.org/D24301

Details

Committed
barchiesiOct 1 2019, 12:01 PM
Reviewer
dvratil
Differential Revision
D24301: Fix null pointer dereference, keep FileModifyJob metadata and serialize with options.
Parents
R477:e4ef79c38490: Fix compilation with Qt 5.14
Branches
Unknown
Tags
Unknown
References
tag: v19.08.2