QStringRef: take qsizetype position and size in the c-tor


Use REMOVED_SINCE to remove the old c-tor and add a new one that takes
qsizetype.

This is required to prevent silent truncation to int when using this
constructor with the Qt 6 APIs.
The new constructor simply adds Q_PRE() to assert that the inputs are
smaller than INT_MAX.

The documentation is also updated to use qsizetype, but explicitly
mentions that passing values above INT_MAX is UB.

Task-number: QTBUG-149430
Pick-to: 6.12
Change-Id: I2eb5803df6a349f19de7078bd683e7436d6d4c94
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
commita9a0c95c0fd7cf0c2e9a0a01101d221425e7c48d
parent8631aea33f3de13c23fcd740d8900c775c18ac00
authorIvan Solovev <ivan.solovev@qt.io>
committerIvan Solovev <ivan.solovev@qt.io>
commit timeWed, 2 Sep 2026 07:34:25 +0000