QSvgHandler: Copy xml->name() when passing it to startElement()


It is just a QStringView to QXmlStreamReader's internal data and that
may be freed when using the reader, resulting in dangling pointers.

Since 696599659ebd90753888240573e5c5ca5c90b053,
QXmlStreamReader::readNext() is called from startElement(). At the
moment, the QStringView localName isn't used anymore after that call but
that might change accidentally. Copying the data to a QString avoids
this risk.

Pick-to: 6.12
Change-Id: If676504d333ea447b61bffbe83fb10fbd9a4d4bd
Reviewed-by: Hatem ElKharashy <hatem.elkharashy@qt.io>
commit902515ae8e7fc19cc3b47c9cdb475a902fb4d720
parent51a53d7492d5ac925ebcd4820ca42208b77224fb
authorRobert Löhning <robert.loehning@qt.io>
committerRobert Löhning <robert.loehning@qt.io>
commit timeThu, 17 Sep 2026 07:39:27 +0000