Set missinghandler callback with a context object and remove rvalue


Use QtPrivate::makeCallableObject() and a context object instead
of std::function() when calling setMissingHandler(). Also added
clearMissingHandler() to set the handler back to the default behavior.

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

Pick-to: 6.8
Task-Id: QTBUG-128113
Change-Id: If02c67a0ee200b458d9f8051a23a9307fce6e59a
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
commit76e55a052f25e2fe074cba9856be8a92c8a54207
parent23e09012f39d30967e5fe86c2f5d6a33ac1f8356
authorMatthias Rauter <matthias.rauter@qt.io>
committerMatthias Rauter <matthias.rauter@qt.io>
commit timeFri, 30 Aug 2024 17:57:37 +0200