Add a link to the upstream bug report in the workaround code

This commit is contained in:
Kovid Goyal 2024-02-13 10:18:29 +05:30
parent ae6ef2807d
commit b9cdc80806
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -1693,6 +1693,7 @@ def local_path_for_resource(qurl: QUrl, base_qurl: 'QUrl | None' = None) -> str:
def fix_qt_bodging_windows_paths(path: str) -> str:
# When loading <img src="file:///c:/path/to/img.png"> Qt gives us the
# URL: //c/path/to/img.png Le bubbling sigh
# https://bugreports.qt.io/browse/QTBUG-122201
if iswindows and re.match(r'//[a-zA-Z]/', path) is not None and not os.path.exists(path):
path = os.path.normpath(path[2] + ':' + path[3:])
return path