From c4e308d3f7ad8f2bc6c8e88a89acd1f95a5b46c6 Mon Sep 17 00:00:00 2001 From: Casper van Donderen Date: Thu, 19 Apr 2012 12:19:42 +0200 Subject: QDoc: Generate index file for DITAXML. This change moves the fullDocumentLocation function to the generator base-class and adds generateIndex to the DITAXML Generator. All function calls to fullDocumentLocation are now handled by the static function in the base-class which will use the file extension from the currently active generator (either DITAXML or HTML). Change-Id: I24ce09c05a63eb5980b1243c58990e7ce9d42036 Reviewed-by: Martin Smith --- src/tools/qdoc/generator.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/tools/qdoc/generator.h') diff --git a/src/tools/qdoc/generator.h b/src/tools/qdoc/generator.h index c97e59602d..713bfd2e51 100644 --- a/src/tools/qdoc/generator.h +++ b/src/tools/qdoc/generator.h @@ -90,6 +90,8 @@ public: virtual void terminateGenerator(); static const QString& baseDir() { return baseDir_; } + static Generator *currentGenerator() { return currentGenerator_; } + static QString fullDocumentLocation(const Node *node, bool subdir = false); static Generator *generatorForFormat(const QString& format); static void initialize(const Config& config); static const QString& outputDir() { return outDir_; } @@ -100,7 +102,7 @@ protected: virtual void endSubPage(); virtual void endText(const Node *relative, CodeMarker *marker); virtual QString fileBase(const Node* node) const; - virtual QString fileExtension(const Node* node) const = 0; + virtual QString fileExtension() const = 0; virtual QString fullName(const Node *node, const Node *relative, CodeMarker *marker) const; @@ -185,6 +187,7 @@ protected: private: static QString baseDir_; + static Generator* currentGenerator_; static QStringList exampleDirs; static QStringList exampleImgExts; static QMap > fmtLeftMaps; -- cgit v1.2.3