Clean up QSvgHandler with focus on strings


This patch tries to bring some suggestions from the new QString overview
documentation page to QtSvg.

Focus is on using views instead of owning strings and on the correct
encoding.

Usage of find and replace string functions were adapted to follow a
common style: using slice() instead of mid() where useful (carefully,
because mid checks the length and slice does not). Further reducing the
number of parameters that would be filled by default values (e.g. size()
- pos) for mid. startsWith() replaces mid(0, pos) == "...".

Further the patch contains some fixes to questionable usage of regular
expressions and iterations suggested by reviewers.

Pick-to: 6.10
Task-number: QTBUG-134065
Change-Id: I7c20da6eafb384c89322cece67b0098ad8cd01e0
Reviewed-by: Hatem ElKharashy <hatem.elkharashy@qt.io>
commit74fb2d7f8d034410ab2a2a5007b14235a1c4da72
parent9ad9fa329a6fe20f9fde2cf66fa9ebd9bd4e4460
authorMatthias Rauter <matthias.rauter@qt.io>
committerMatthias Rauter <matthias.rauter@qt.io>
commit timeMon, 2 Jun 2025 07:36:29 +0000