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

QUrl::fromLocalFile() does not correctly use current directory

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • P2: Important
    • Resolution: Cannot Reproduce
    • 5.4.0
    • None
    • Core: URL Handling
    • None
    • Linux Mint 17

    Description

      QUrl seems to fail for local files unless they are specified with full path.

      For example, this works:

      QUrl url = QUrl::fromLocalFile("/home/dave/test.svg");

      but this doesn't (when current working directory is correct)

      QUrl url = QUrl::fromLocalFile("./test.svg");

      Testing seems to indicate that the QUrl::QUrl(QString) constructor has same problem when using "file://" protocol. I believe this may work correctly on Qt4 but not completely sure: do not have a apples-to-apples comparison set up.

      Attachments

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

        Activity

          People

            allan.jensen Allan Sandfeld Jensen
            lapointe David LaPointe
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes