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

QPdfDocument::close leaks a handle to the loaded file

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • P2: Important
    • None
    • 6.4.2, 6.6.3
    • PDF
    • None
    • Windows

    Description

      Calling QPdfDocument::close leaves a dangling handle to the loaded file.

      The following snippet should be able to remove the PDF, but Windows returns a sharing violation error (error code 32), triggering the assert.

          QPdfDocument doc(&a);
          doc.load(R"(Attachment.pdf)");
          doc.close();
      
          std::error_code errc;
          std::filesystem::remove(R"(Attachment.pdf)", errc);
          assert(errc.value() == 0);
      

      Attachments

        Issue Links

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

          Activity

            People

              srutledg Shawn Rutledge
              felipef Felipe Goron Farinon
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes