Details
-
Bug
-
Resolution: Done
-
P2: Important
-
None
-
5.0.0
-
None
Description
The QTextBrowser autotest has a test function called relativeLinks(), which calls QTextBrowser::setSource() with a sequence of relative links. In Qt4, this test passes cleanly. In Qt5, the test passes, but outputs warnings indicating that it is really failing. The test was only checking that the correct signals were emitted, not that a document was actually loaded.
The problem is that in Qt5 the first call to QTextBrowser::setSource always fails to load the document unless the specified URL is created with QUrl::fromLocalFile(). This is a regression from Qt4. After the first call, just passing a regular relative path to setSource works fine.
I have improved the test to check that each call to QTextBrowser::setSource loads a non-empty document. This will of course fail until this regression is fixed, so I've added a QEXPECT_FAIL too.
Attachments
For Gerrit Dashboard: QTBUG-22416 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
7579,1 | Improve QTextBrowser unit test. | master | qt/qtbase | Status: MERGED | +2 | 0 |
25300,1 | Correctly locate files with relative paths | master | qt/qtbase | Status: MERGED | +2 | 0 |