Refactor: Start using unique pointers if possible


The module uses raw pointers everywhere and some of these pointers
are never deleted causing memory leaks or deleted then accessed later
causing crashes. This can be checked by using a sanitizer, but it
requires compiling the code with the sanitizer enabled and sometimes
the sanitizer does not catch everything. So it is better to use
unique pointers if possible.

This is the beginning of a series of refactoring that will replace
raw pointers with unique pointers if possible. If a node has full
ownership, unique pointers will be used and if a node is just observing
the pointer, then an access to a raw pointer can be allowed.

This commit starts with the basics. It replaces the raw pointers
used by QSvgRenderer and the raw pointers returned by the static
load functions with unique pointers and making the required changes
for it. Other commits will follow to replace other raw pointers in
the module.

Pick-to: 6.11
Change-Id: I78b6cf01c999650874b27551927e8a7bc0be409d
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
commit4f7e67247fc13919c35c2ffac9d4748db74e0ef0
parent4310fb100fe41c0aa9f851c543fe187d07dd021e
authorHatem ElKharashy <hatem.elkharashy@qt.io>
committerHatem ElKharashy <hatem.elkharashy@qt.io>
commit timeWed, 14 Jan 2026 15:13:53 +0200