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

QFileDialog::getOpenFileUrl and related functions do not return empty URLs on cancel.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 5.2.0
    • Fix Version/s: 5.3.1
    • Labels:
      None
    • Commits:
      d915432c23177a5d7f9ffd0d6899aab13ddc4c2b (stable,7.5.2014, 5.3.1)

      Description

      In `QFileDialog::getOpenFileUrl`, `QFileDialog::getOpenFileUrls`, `QFileDialog::getSaveFileUrl`, and `QFileDialog::getExistingDirectoryUrl`, a local file path from the related local file equivalents are passed directly to QUrl::fromLocalPath. Unfortunately, this won't work, because an empty string will convert to `file:///`.

      (I'm not sure to put for component here, so I picked one of the GUI components largely arbitrarily.)

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              kleint Friedemann Kleint
              Reporter:
              jchadwick John Chadwick
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes