Tests: Avoid memory leaks


Use std::unique_ptr to keep track of owned shapes. Also, output the
error message if QQmlComponent fails to load.

Change-Id: I9d3b783ab11c94cc767b7d715077079c36b9f841
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
commitfccc95ffb1756e94eb89cfb043e65cf2445fb286
parent30bea07e2f097c7abc76023834bdf1743613a4c9
authorUlf Hermann <ulf.hermann@qt.io>
committerUlf Hermann <ulf.hermann@qt.io>
commit timeThu, 8 Jan 2026 11:05:53 +0100