QSvgIOHandler: fix format detection when loading triggers it
When reading from a device without a file name, the format is
determined by probing the contents in canRead(). load() did that only
after marking the load as attempted, so canRead() returned early
without probing, and format() stayed empty if e.g. size() or
imageCount() triggered loading first.
Amends 6b0aba5544c4e2c9015a691a7ad669b3d6c94cfe.
Fixes: QTBUG-151324
Pick-to: 6.12
Change-Id: I6e9dc4ecd71ef03ecfeca7f8827e51b14f3d30cd
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>