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

QML Image treats source as flawed unencoded URL

XMLWordPrintable

      When you set a QML image source to a string, the QUrl(const QString&) constructor gets used to convert to a QUrl property. But this uses the default "TolerantMode", which handles a hybrid of encoded and unencoded URLs. There is no way to specify a filename that actually contains the characters %20 in the name, because even though it's expecting an unencoded URL, it second guesses you if it sees those characters.

      You can see this just by running qmlviewer with this sample code:

      import Qt 4.7
      Column {
      Image

      { source: "image%20.jpg" }

      Image

      { source: "image%2520.jpg"}

      }

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

            mvogt Matthew Vogt (closed Nokia identity) (Inactive)
            grgustaf Geoff Gustafson
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes