BaseApi: do not use smart pointers for network managers


Both QNetworkAccessManager and QRestAccessManager are QObject-based
classes, which means that storing them in smart pointers can lead
to double free problems due to using both ref-counting and QObject
parent-child relation to manage the lifetime.

This commit chooses the traditional way of storing QObject-based
members as raw pointers.

When using the setter, it's the user's responsibility to make sure
that the provided pointers outlive the object.

The tricky part in the setter is that we need to delete the old
objects only if they were created by us. So, check the parent()
before deleting the old objects.

Found in API review.

Task-number: QTBUG-142312
Pick-to: 6.11
Change-Id: Icac5e1a207124e3737e792a15e4c7fd592570521
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
commit94df8b57a0a352443706099557468e43d799837a
parent4b5b46acacb90916d4b8f8e7f192957179b6edcb
authorIvan Solovev <ivan.solovev@qt.io>
committerIvan Solovev <ivan.solovev@qt.io>
commit timeMon, 22 Dec 2025 13:38:22 +0100