diff options
author | Topi Reinio <topi.reinio@qt.io> | 2020-03-04 17:31:17 +0100 |
---|---|---|
committer | Topi Reinio <topi.reinio@qt.io> | 2020-03-05 15:55:19 +0100 |
commit | dc8598ab1e441d9b49a3aac1e3812bf93f8a3211 (patch) | |
tree | f87b882fcd3d3e4e8214a24e356c34fbd25dae84 /src/qdoc/generator.h | |
parent | 60be58eb314349862e09d3fc106bfa23feda170f (diff) |
qdoc: Fix issues in HelpProjectWriter
The code that generates Qt Help Project (.qhp) xml files was suffering
from multiple issues - mostly related to changes in Node inheritance
that were not reflected in HelpProjectWriter implementation.
- We no longer have subtypes for page nodes. Therefore, selectors like
'doc:example' were broken. Simplify the selector code but continue
supporting the old notation.
- Examples and basic QML/JS types were incorrectly dropped from the TOC.
- Node::Union and Node::Struct were called 'Class' in the .qhp. Use the
Generator::typeString() to fetch the correct type name for all types.
- Require .qhp subprojects to have at least a title to avoid empty
subsections in the TOC.
Add a test that covers the entire .qhp generation with different types
of subprojects defined.
Fixes: QTBUG-82671
Fixes: QTBUG-82674
Change-Id: I8fe4a8ad5fc6d58f86e0e9128e98c0b8c4ba4a6a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Diffstat (limited to 'src/qdoc/generator.h')
-rw-r--r-- | src/qdoc/generator.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qdoc/generator.h b/src/qdoc/generator.h index fd5fbbcef..f28432bd2 100644 --- a/src/qdoc/generator.h +++ b/src/qdoc/generator.h @@ -63,6 +63,7 @@ public: virtual void initializeGenerator(); virtual void initializeFormat(); virtual void terminateGenerator(); + virtual QString typeString(const Node *node); QString fullDocumentLocation(const Node *node, bool useSubdir = false); QString linkForExampleFile(const QString &path, const Node *parent, @@ -118,7 +119,6 @@ protected: virtual bool generateText(const Text &text, const Node *relative, CodeMarker *marker); virtual QString imageFileName(const Node *relative, const QString &fileBase); virtual int skipAtoms(const Atom *atom, Atom::AtomType type) const; - virtual QString typeString(const Node *node); static bool matchAhead(const Atom *atom, Atom::AtomType expectedAtomType); static QString outputPrefix(const Node *node); |