QDoc: Track the page the template generator writes
The template generator depends on its output writer to know which page
it's writing. When the writer can't open a page's output file, it drops
the page's name, so nothing downstream can say which page was being
generated at that point.
The template generator now keeps its own record of the page it's
generating, whether or not the output file could be opened. A follow-up
change uses it to name the failing page when a template render fails.
Task-number: QTBUG-146939
Pick-to: 6.12
Change-Id: I6cbecb1007f2e8371c2d97eddb17a2c3a48c243e
Reviewed-by: Paul Wicking <paul.wicking@qt.io>