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

QUrl::path() prepends a "/" to file URLs in windows.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • Icon: Not Evaluated Not Evaluated
    • None
    • 5.6.3, 5.10.0
    • Core: URL Handling
    • None
    • Windows

      To reproduce : copy a file from windows file explorer and paste it into a widget that extracts the URL path with the following commands:

      QClipboard *clipboard = QGuiApplication::clipboard();
      const QMimeData *mime = clipboard->mimeData();
      QString path = mime->urls().first().path()
      

      the result is something like this :

       

      /C:/folder/file.txt
      

      Instead of the following expected result :

      C:/folder/file.txt
      

       

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

            thiago Thiago Macieira
            quentinv Quentin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes