QtQml: Allow type lookups to be rebased onto new scope objects


The types present at a specific source location in a compilation unit
that's bound to an engine can't change. We never need to re-do a cached
type lookup. What may change is the scope object we're dealing with, but
that is only one member of QQmlTypeWrapper. We can simply create a new
QQmlTypeWrapper with that one member changed where the need arises.

Pick-to: 6.12
Fixes: QTBUG-151376
Change-Id: I7c73dcc5dd196a4011a11510cafd3b5144a5a44a
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
commit55b016ab0054fef50f29243868a649e4dbc3a695
parentac3352d15b436aedf63881d65a92a3265371f23e
authorUlf Hermann <ulf.hermann@qt.io>
committerUlf Hermann <ulf.hermann@qt.io>
commit timeTue, 20 Oct 2026 13:18:41 +0000