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

Incorrect parsing of local urls in qml

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.5.1, 6.6.0
    • 5.15.0, 5.15.1
    • PDF
    • None
    • 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

    • Windows
    • 33fac9305 (dev), 8d30a94e6 (6.5)

    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
        For Gerrit Dashboard: QTBUG-87275
        # Subject Branch Project Status CR V

        Activity

          People

            michal Michal Klocek
            loylick loylick
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes