summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui/text/qtextimagehandler
Commit message (Collapse)AuthorAgeFilesLines
* Change license for tests filesLucie Gérard2024-02-041-1/+1
| | | | | | | | | | | | According to QUIP-18 [1], all tests file should be LicenseRef-Qt-Commercial OR GPL-3.0-only [1]: https://contribute.qt-project.org/quips/18 Pick-to: 6.7 Task-number: QTBUG-121787 Change-Id: I9657df5d660820e56c96d511ea49d321c54682e8 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* QTextImageHandler: Use QUrl::toLocalFile to convert to local file nameChristian Ehrlicher2024-01-211-1/+1
| | | | | | | | | | | Simply stripping away the first six characters does not work on Windows. Amends 2d87c4d881b74619fef966ffb0d7a00cb4ccea50 Pick-to: 6.7 6.6 6.5 6.2 Fixes: QTBUG-120577 Change-Id: If48ba026785cab784f46109e34ac80e39a990b79 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* CMake: Make gui tests standalone projectsAlexandru Croitor2023-07-051-0/+6
| | | | | | | | | | | | | | | | | Add the boilerplate standalone test prelude to each test, so that they can be opened with an IDE without the qt-cmake-standalone-test script, but directly with qt-cmake or cmake. Boilerplate was added using the following scripts: https://git.qt.io/alcroito/cmake_refactor Manual adjustments were made where the code was inserted in the wrong location. Task-number: QTBUG-93020 Change-Id: I2ef59684cf297a0222a136ce7b5630037294d000 Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* QTextImageHandler: Resolve Nx images correctly for file or qrc URLsVolker Hilsheimer2022-12-221-7/+0
| | | | | | | | | | | | | | | | | | 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, 760df7256588e76d082ea959399af36d7ba80a86. 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>
* QTextImageHandler: Add test coverage for resources and URLsVolker Hilsheimer2022-12-222-0/+17
| | | | | | | | | | | | | | | 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>
* Enable and fix the test for QTextImageHandlerVolker Hilsheimer2022-12-222-8/+38
| | | | | | | | | | | | | | | | | | | | Amends 52ce0c177e80c2d5b70b38d429abb3689b3da51e, which added the test without adding it to the parent directory. Refactor the test code to be data driven, add the image files as external test data files, and adjust the test code to find the files. Use the QTextImageFormat from the document rather than a manually crafted one, as otherwise we don't test a real usecase. This also makes the test more flexible for adding qrc, resources, and file URLs. Task-number: QTBUG-109212 Pick-to: 6.5 6.4 6.2 Change-Id: Id0771037b961d95ec3cadd0cd6467d2448f22884 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-161-27/+2
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Remove the qmake project filesJoerg Bornemann2021-01-071-4/+0
| | | | | | | | | | | | | | | | Remove the qmake project files for most of Qt. Leave the qmake project files for examples, because we still test those in the CI to ensure qmake does not regress. Also leave the qmake project files for utils and other minor parts that lack CMake project files. Task-number: QTBUG-88742 Change-Id: I6cdf059e6204816f617f9624f3ea9822703f73cc Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Replace QtTest headers with QTestDavid Skoland2020-12-221-1/+1
| | | | | | | | | | | Complete search and replace of QtTest and QtTest/QtTest with QTest, as QtTest includes the whole module. Replace all such instances with correct header includes. See Jira task for more discussion. Fixes: QTBUG-88831 Change-Id: I981cfae18a1cabcabcabee376016b086d9d01f44 Pick-to: 6.0 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Set the url to have the AtNx filename if one is foundMorten Johan Sørvig2020-11-064-0/+91
There’s no need to convert the file name/path to QUrl, and then back again to QString before calling qt_findAtNxFile(). Call qt_findAtNxFile first, and then convert to QUrl. This makes sure the url-name and string-name stays in sync. Change-Id: I8b8939eabbdaff473945ebe31faafd408e9c4295 Pick-to: 5.15 Fixes: QTBUG-60793 Reviewed-by: Andy Shaw <andy.shaw@qt.io>