Port from QStringRef (deprecated) to QStringView
QXmlStreamAttributes::value() returns a QStringRef in Qt5 and a QStringView in Qt6 (not documented in upstream Qt5 docs...), using auto keyword should work either way.
QStringView::to(U)Int() isn't tuned for performance in Qt5, so make the build conditional.
KF6 task: https://phabricator.kde.org/T13913
Edited by Ahmad Samir