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

Resource Urls with colons are treated as relative Urls

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.1.1
    • None
    • linux 32bit

    Description

      when I assign a string to a url property like

       
      //file: :/components/MyComponent.qml in resouce it is treated as if were a relative Url.
      import QtQuick 1.1
      Image {
          source : ":/images/image.png"
          onSourceChanged {
                console.log(source)  //writes file::/component/:/images/image.png
          }
      
      }
      

      if used from a MyComponent.qml in "subfolder" in resource files "components" it would expand to : file::/component/:/images/image.png
      Same is when calling Qt.resolvedUrl(":/images/image.png"). You'd expect that it would expand to e.g. qrc:///images/image.png or file::/images/image.png but it also resolved wrong.

      Attachments

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

        Activity

          People

            aalpert Alan Alpert
            richardo Richard Öhlinger
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes