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
Differential Revision: https://phabricator.kde.org/D24301