QDoc: Allow failed output pages to be discarded


Closing an output document preserves whatever content was written to
its file. If rendering fails after the file opens, that can leave a
partial page that appears to be valid generated documentation.

The file writer can now discard the active document after a failure.
This lets recovery leave the failed page absent while preserving the
normal close behavior for successful pages.

Task-number: QTBUG-146939
Change-Id: I53e96c1aa269b40d24d33323ed2caa513375aa2f
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
commitc5a9ddf77b39546f36e5219a5274a3c7be8aa136
parentcd64d99030654e9c5e24cbbcf38116da5efdbbfc
authorPaul Wicking <paul.wicking@qt.io>
committerPaul Wicking <paul.wicking@qt.io>
commit timeThu, 1 Oct 2026 13:53:58 +0000