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>