summaryrefslogtreecommitdiffstats
path: root/src/qdoc/webxmlgenerator.h
diff options
context:
space:
mode:
authorTopi Reinio <topi.reinio@qt.io>2019-09-12 00:38:49 +0200
committerTopi Reinio <topi.reinio@qt.io>2019-09-26 13:46:31 +0200
commit3f3cf9dd93bfcb6c8989afa45f391633d007c8ce (patch)
tree5bc31bc93f129b836e8f852f867d7e1b860067a1 /src/qdoc/webxmlgenerator.h
parent488f24540d087ae98fff4b3a4de82bdf9acbc72c (diff)
qdoc: WebXML output format: Fix issues with example pages
Since QDoc no longer stores example files as nodes in its tree, the WebXMLGenerator failed to generate output for those files. Fix this by generating those pages explicitly as needed, overriding functions from the Generator base class. Prevent QDocIndexFiles from writing nested <page> elements when WebXMLGenerator is in use, as that does not work as expected with shiboken2. Fixes: PYSIDE-1088 Change-Id: I01c2af2391726f448271fdb810ffc3da923caca5 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Diffstat (limited to 'src/qdoc/webxmlgenerator.h')
-rw-r--r--src/qdoc/webxmlgenerator.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/qdoc/webxmlgenerator.h b/src/qdoc/webxmlgenerator.h
index f243a5402..bdd28dd2f 100644
--- a/src/qdoc/webxmlgenerator.h
+++ b/src/qdoc/webxmlgenerator.h
@@ -29,13 +29,14 @@
#ifndef WEBXMLGENERATOR_H
#define WEBXMLGENERATOR_H
-#include <QtCore/qxmlstream.h>
-
#include "codemarker.h"
#include "config.h"
#include "htmlgenerator.h"
#include "qdocindexfiles.h"
+#include <QtCore/qxmlstream.h>
+#include <QtCore/qscopedpointer.h>
+
QT_BEGIN_NAMESPACE
class WebXMLGenerator : public HtmlGenerator, public IndexSectionWriter
@@ -55,6 +56,7 @@ protected:
void generateCppReferencePage(Aggregate *aggregate, CodeMarker *marker) override;
void generatePageNode(PageNode *pn, CodeMarker *marker) override;
void generateDocumentation(Node *node) override;
+ void generateExampleFilePage(const Node *en, const QString &file, CodeMarker *marker) override;
QString fileExtension() const override;
virtual const Atom *addAtomElements(QXmlStreamWriter &writer, const Atom *atom,
@@ -78,6 +80,8 @@ private:
bool hasQuotingInformation;
int numTableRows;
QString quoteCommand;
+ QScopedPointer<QXmlStreamWriter> currentWriter;
+ bool supplement = false;
};
QT_END_NAMESPACE