setHtml() or setMarkdown() can result in attempting to load resources such as images that are needed to render the page. Whenever the resource has a relative URL, loading depends on the baseURL having already been set so that a complete URL can be constructed. QTextDocument::resource() is called to load images, and uses baseUrl(). A little later, QTextBrowserPrivate::resolveUrl() is given an URL that already has been extended with the baseURL if known; but it has its own logic to resolve the resource URL against currentURL, or else to treat it as a local file path if a file exists at that location. The autotest was relying on this fallback to the local relative file path before; but now it tests both with a local filename in the current directory for the source HTML and also with a fully resolved source URL containing the complete file path. Also made minor style improvements in tst_QTextBrowser's TestBrowser class. Change-Id: I46a850015d0e9c5bc5f13b9e37179a9323ab1980 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> |
||
|---|---|---|
| bin | ||
| config.tests | ||
| dist | ||
| doc | ||
| examples | ||
| lib | ||
| mkspecs | ||
| qmake | ||
| src | ||
| tests | ||
| util | ||
| .gitattributes | ||
| .gitignore | ||
| .qmake.conf | ||
| .tag | ||
| INSTALL | ||
| LICENSE.FDL | ||
| LICENSE.GPL2 | ||
| LICENSE.GPL3 | ||
| LICENSE.GPL3-EXCEPT | ||
| LICENSE.LGPL3 | ||
| LICENSE.LGPLv3 | ||
| LICENSE.QT-LICENSE-AGREEMENT-4.0 | ||
| config_help.txt | ||
| configure | ||
| configure.bat | ||
| configure.json | ||
| configure.pri | ||
| header.BSD | ||
| header.COMM | ||
| header.FDL | ||
| header.GPL | ||
| header.GPL-EXCEPT | ||
| header.LGPL | ||
| header.LGPL-NOGPL2 | ||
| header.LGPL-ONLY | ||
| header.LGPL3 | ||
| header.LGPL3-COMM | ||
| header.MIT | ||
| qtbase.pro | ||
| sync.profile | ||