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

Incorrect parsing of local urls in qml

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 5.15.0, 5.15.1
    • Fix Version/s: None
    • Component/s: PDF
    • Labels:
      None
    • Environment:
      Windows 7 Ultimate version 6.1.7601 Service Pack 1 Build 7601
      Microsoft Visual Studio Community 2019 Version 16.7.4 x64
      I use binary distribution of Qt 5.15.1 with an extra module QtPdf bought at QMarketplace

    • Platform/s:
      Windows

      Description

      To reproduce the bug you can use the pdfviewer example from Qt 5.15.1 package. Its location is qtrootfolder\Examples\Qt-5.15.1\pdf\pdfviewer. I did not modify the example's code in any way.

      When I try to open some pdf file from my HD I always get an error "File not found".

      I debuged the issue and I've found that the path which is passed to QFile constructor had an extra "/" at the beginning.  In my case the path was "/D:/Cpp/pdf/java.pdf".  Look at the screenshot attached to the bug report for more details. The issue is rather annoying, actually it blocks the usage of local files in qml.

        Attachments

        1. pdfviewerbug.png
          pdfviewerbug.png
          209 kB
        2. qtpdf.patch
          0.6 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            srutledg Shawn Rutledge
            Reporter:
            loylick loylick
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes