BaseApi: do not use std::shared_ptr for QNetworkRequestFactory


I could come up with only one reason to use a shared_ptr to store the
factory: someone might want to have a common factory and share it among
multiple API classes.

However, each BaseApi class has a couple of setters (namely, setTimeOut()
and setSslConfiguration()), that unconditionally change the state of the
shared factory.

This can be surprising for the other classes that use the same factory,
so I consider it a bad API.
This patch gets rid of the shared pointer and stores the object by value.
The setter is also updated to take the factory by value.
This is cheap since it's a typical Qt value type with a shared d_ptr.

This patch also adds a BaseApi::sslConfiguration() getter, because it is
now required in the PetApiTests::sslConfigurationTest().

Found in API review.

Task-number: QTBUG-142312
Pick-to: 6.11
Change-Id: Ibee91c7d98165843c57fd81931e88bb1fed583f3
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
commit189dd89cde8485be44fc5ec1a946e5f1a99e94c4
parentd69795619fd55bffda9c1b7c4c7b077fa2abb871
authorIvan Solovev <ivan.solovev@qt.io>
committerIvan Solovev <ivan.solovev@qt.io>
commit timeThu, 8 Jan 2026 19:22:28 +0100