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

QDesktopServices:openUrl() fails to open files on smb share

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3: Somewhat important
    • Resolution: Done
    • Affects Version/s: 4.6.2
    • Fix Version/s: None
    • Component/s: Core: URL Handling
    • Labels:
      None

      Description

      On Windows, a file on a smb share can be references using a file url like:

      file://hostname/share-name/file-path/file.ext

      QDesktopServices::openUrl() fails to open such a file due to a simple bug in QDesktopServices::openDocument().
      For the above example QUrl gives a local filename of
      "//hostname/share-name/file-path/file.ext"
      which is basically correct but it seems that for remote files ShellExecute cannot cope with '//'.
      If the path is converted using toNativeSeparators() before passing it to ShellExecute it just works.

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              paeglis Gatis Paeglis
              Reporter:
              hrabowski-old Maximilian Hrabowski (Inactive)
              Votes:
              3 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes