BaseApi: fix memleak when using QSlotObjectBase


The CallerInfo struct was storing a raw pointer that is allocated on
the heap (in QtPrivate::makeCallableObject()).
As a result, we were always leaking these objects.

Similarly to other places that use QSlotObjectBase, update the struct
to hold SlotObjSharedPtr instead.

As a drive-by: wrap the contextObject into QPointer, because it can
go out of scope by the time we try to use it.

Task-number: QTBUG-142907
Pick-to: 6.11
Change-Id: I1374a1b95fb6d07cb9016bafbe4c5bc025d1f898
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
commit2fe9ade04d13d5a843a42de0e6016f2b88ad653c
parent7851815f4cb05c8c7b60e2e7958e67317777a4bf
authorIvan Solovev <ivan.solovev@qt.io>
committerIvan Solovev <ivan.solovev@qt.io>
commit timeTue, 23 Dec 2025 09:16:38 +0100