SAX: avoid integer truncation when reporting column and line


We ported the internal implementation to qsizetype, but the public API
of QXmlLocator still reports the column and line as int.

To avoid integer truncation when reporting results, explicitly check
if the reported value is larger than INT_MAX and report -1 if it is.
This is in line with the documentation, which explicitly states that -1
is returned when no column/line number is available.

Task-number: QTBUG-149566
Pick-to: 6.12 6.12.0 6.11 6.11.3 6.8 6.5
Change-Id: I277ab4ed390d63348d426619a7c01a079d2a057f
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
commit0d2c086cb8cfa6833b82abb200b53a51a0321bdf
parent4b72520e50cd04f2c29524f28bf77eefc81956fe
authorIvan Solovev <ivan.solovev@qt.io>
committerIvan Solovev <ivan.solovev@qt.io>
commit timeThu, 17 Sep 2026 09:03:26 +0000