StyleKit: Use QPointer when caching components to QmlEngine
Use a QPointer instead of a raw pointer to the QmlComponent when caching
them to the engine as it can lead to crashes when the engine is changed.
Also parent the QML components to the engine to avoid leaks and to make
sure they are destroyed when the engine is.
Fixes: QTBUG-146849
Pick-to: 6.12
Change-Id: Ia754f37ee11cee2c479d986e022a52c7f56153a7
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| commit | 48155471cc76cc906c091215b54e9619108a854d |
| parent | 7a9093494cc78c432ecd51af95e0db4c55d57663 |
| author | Doris Verria <doris.verria@qt.io> |
| committer | Doris Verria <doris.verria@qt.io> |
| commit time | Fri, 9 Oct 2026 13:31:14 +0000 |