QQuickImageBase: detect scalable images without a suffix in the URL


Whether an image is loaded for the device pixel ratio depended on the
URL ending with a scalable image format suffix. But if the suffix is
omitted, a local file is still found by trying the supported suffixes
(see existingImageFileForPath()), so such an SVG was always rendered
at DPR 1.

For local files without a suffix, find the file the same way, and
determine the format from its suffix, or from its contents if it has
none. As this touches the file system, determine whether the image is
scalable only once per load and pass it to updateDevicePixelRatio(),
instead of checking it there again.

Fixes: QTBUG-113232
Pick-to: 6.12
Change-Id: I8d9e01a526058c83c079fe2ddac4f9d941983562
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
commit56743c75996110865aa9473362aa718177c99b29
parent8acce25cfabd79b5147fb3f8953b6a2033019099
authorVladimir Belyavsky <belyavskyv@gmail.com>
committerVladimir Belyavsky <belyavskyv@gmail.com>
commit timeWed, 21 Oct 2026 04:18:24 +0000