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

Base url handling in QML has changed in Qt 5.9.4

    XMLWordPrintable

Details

    Description

      Hi,

      Commit 52bc4fbfbae6aa1569dc134dd103e966f04bc2e6 in qtdeclarative introduced a changed in the base url handling when resolving urls. The following test case is now failing:

      test.qml
      import QtQuick 2.0
      import "script.js" as Script
      Item { }
      
      script.js
      ;
      

       
      http://foo/test.qml redirects to relative url bar/test.qml (so absolute url is http://foo/bar/test.qml).

      Before the commit, the script import url would be resolved as http://foo/bar/script.js. Now it's resolved as http://foo/script.js.

      This unfortunately breaks some production code. Can the code be updated to not change behaviour or was this done on purpose ?

      Example is available here: https://absolut.zogzog.org/pub/test.qml

      Thanks,
      -Arnaud

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            ulherman Ulf Hermann
            rawoul Arnaud Vrac
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes