qt5base-lts/tests/auto/gui/text/qtextimagehandler
Volker Hilsheimer 2d87c4d881 QTextImageHandler: Resolve Nx images correctly for file or qrc URLs
The qt_findAtNxFile helper in qicon.cpp expects a local file name that
can be probed with QFile::exists. If the src attribute of an <img>
element specifies the location of the image as a file:/ or qrc:/ url
rather than as a local file name, then we need to strip the scheme
off the file path, and in the case of a qrc URL leave the :/ prefix
before calling the qt_findAtNxFile helper.

Amends, and partially reverts, 760df72565.
We can't avoid testing whether the source in the HTML is provided as a
URL before interpreting it as a file name.

Pick-to: 6.5 6.4 6.2
Fixes: QTBUG-109212
Change-Id: I7ea7a5bfde79bab90a8025c42e754129813dd0fc
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-12-22 19:19:33 +01:00
..
data Set the url to have the AtNx filename if one is found 2020-11-06 09:16:30 +00:00
CMakeLists.txt QTextImageHandler: Add test coverage for resources and URLs 2022-12-22 00:48:08 +01:00
tst_qtextimagehandler.cpp QTextImageHandler: Resolve Nx images correctly for file or qrc URLs 2022-12-22 19:19:33 +01:00