Set afterRequest callback with a context object and remove rvalue


Use QtPrivate::makeCallableObject() and a context object instead
of std::function() when calling afterRequest(). It's signature is
now constrained to take both request and response in that particular
order.

The rvalue was exchanged with a reference in the callback signature
because QMetaObject::invokeMethod is not prepared to handle rvalues.

The function is renamed to addAfterRequestHander() to clarify
its function.

Pick-to: 6.8
Task-Id: QTBUG-128113
Change-Id: If3af3b811f54fe4be2b14d5c768b3a61b4f32bb6
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
commit6acb3ccf221923a19118b3f3b15ffbebb3f33d4c
parent172e2d992daebdbc56d3fab03f4deb94124ffd0f
authorMatthias Rauter <matthias.rauter@qt.io>
committerMatthias Rauter <matthias.rauter@qt.io>
commit timeMon, 2 Sep 2024 08:05:04 +0200