QXmlHandler: replace manual with automatic memory management


The old code made Coverity complain about a BAD_FREE, because the tool
didn't understand m_ownsReader. The report was thus marked as as False
Positive in Coverity UI.

We can do better than that, though: Following the guideline that if
the tool doesn't understand it, a human won't, either, replace the
bool with a unique_ptr to own the reader. The `xml` data member then
becomes a non-owning view on either unique_ptr::get(), or, if the
reader is owned by the caller, that.

As a consequence, ~QSvgHandler() is now empty and can be defaulted,
and Coverity should no longer claim BAD_FREE.

Amends that start of the public history in this module.

Pick-to: 6.12 6.8
Coverity-Id: 218722
Change-Id: Ie409d7b54d2e5d1110e52a8ea363d3131ddcff59
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
Reviewed-by: Hatem ElKharashy <hatem.elkharashy@qt.io>
commitd3c0f4bb78d6e205a4497060d478eb341f3040e1
parenta98ff82c43362dab69db134315a1a0b957981592
authorMarc Mutz <marc.mutz@qt.io>
committerMarc Mutz <marc.mutz@qt.io>
commit timeWed, 30 Sep 2026 11:23:15 +0000