Don't render QSvgPattern for calculating viewBox


Instead of the pattern rendered into a QImage just return a default
QImage of the same size. For calculating the bounds, the image's
contents don't matter.

While this speeds up loading of images which don't set a viewBox
themselves, the main purpose of this change is to avoid endless
recursions. The image's viewBox is being calculated before QSvgHandler
tries to detect cycles, so the program could run into a stack overflow.

This accompanies 935dcfcf4118fe8eb2fb1c64a06923939379dfce which caught
these recursions later. Nevertheless that change cannot be reverted now
because it catches further cases.

Change-Id: I2039fb3d6155b154713d5bcab380025f95665c68
Reviewed-by: Hatem ElKharashy <hatem.elkharashy@qt.io>
commit00984ee2895a1065c03e088255ef0e2bcd690b5d
parenta0cfc9f65bd97455a8a5b1eb3781cf3d72a5ce3b
authorRobert Löhning <robert.loehning@qt.io>
committerRobert Löhning <robert.loehning@qt.io>
commit timeWed, 17 Sep 2025 08:43:07 +0000