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

QPdfDocument::close leaks a handle to the loaded file

XMLWordPrintable

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

      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);
      

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

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

              Created:
              Updated:

                There are no open Gerrit changes