c9cf4037ca
If an image source in HTML is specified via local file name or resource path (i.e. without qrc prefix), then the correct image is loaded. With file:/ or qrc:/ schema however, the image is either not loaded at all, or the 2x image is not loaded. The qt_findAtNxFile helper in qicon.cpp gets a URL path, but expects a file path (that can be tested with QFile::exists). Task-number: QTBUG-109212 Pick-to: 6.5 6.4 6.2 Change-Id: Ibcf687c69b3e53a10f21d718d28c8177a02d6be6 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
24 lines
488 B
CMake
24 lines
488 B
CMake
# Copyright (C) 2022 The Qt Company Ltd.
|
|
# SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
list(APPEND test_data "data/image.png")
|
|
list(APPEND test_data "data/image@2x.png")
|
|
|
|
qt_internal_add_test(tst_qtextimagehandler
|
|
SOURCES
|
|
tst_qtextimagehandler.cpp
|
|
LIBRARIES
|
|
Qt::CorePrivate
|
|
Qt::Gui
|
|
Qt::GuiPrivate
|
|
TESTDATA
|
|
${test_data}
|
|
)
|
|
|
|
qt_internal_add_resource(tst_qtextimagehandler "qtextimagehandler"
|
|
PREFIX
|
|
"/"
|
|
FILES
|
|
${test_data}
|
|
)
|