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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 4.6.2
    • Core: URL Handling
    • None

      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.

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes