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

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • None
    • 4.6.2
    • Core: URL Handling
    • 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

          For Gerrit Dashboard: QTBUG-13359
          # Subject Branch Project Status CR V

          Activity

            People

              paeglis Gatis Paeglis
              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