Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-22416

[Regression] First call to QTextBrowser::setSource fails unless URL created with QUrl::fromLocalFile

    XMLWordPrintable

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

        Activity

          People

            rodal Samuel Rødal
            jasmcdon Jason McDonald (Closed Nokia Identity. Please assign to "macadder" instead) (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes