Make HttpRequestInput safe for future extensions
I treat the class as semi-public. It's used in the client code,
so it should be public, but it's basically a helper class to store
an intermediate state while preparing the request.
As a result, I do not treat it as a regular value type, because
I do not expect the users to interact with this class directly.
The members are moved to a private d_ptr, but I do not use QESDP
to handle it, because one of the members is a unique_ptr, so the
HttpRequestInputPrivate cannot be copied (which is a pre-requisite
for QESDP). I use std::unique_ptr to manage the private d_ptr
instead.
For the same reason, we cannot implement copy SMFs -> explicitly
mark them as deleted.
Since the class is semi-public (see above), I chose a simple
approach of marking the move SMFs as deleted as well.
The same approach was implemented for (in)equality operators
and qHash() overloads.
For now the class only has public getters and setters for the
members that are used in the client code (that is,
in api-body.mustache and api-base-body.mustache).
One of the most heavy users of the class is the
HttpRequestWorker::getNetworkRequest() method, but
since it's implemented in the same cpp file, it uses the static
HttpRequestInputPrivate::get() method to get a pointer to the
private and manipulate it directly instead of using the public API.
Task-number: QTBUG-142312
Pick-to: 6.11
Change-Id: I81d41813caca8e44f03f0f014e591c4e3764c9c7
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>