QDoc: Generate index file for DITAXML.
authorCasper van Donderen <casper.vandonderen@nokia.com>
Thu, 19 Apr 2012 10:19:42 +0000 (12:19 +0200)
committerQt by Nokia <qt-info@nokia.com>
Thu, 19 Apr 2012 11:26:51 +0000 (13:26 +0200)
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 <martin.smith@nokia.com>
src/tools/qdoc/ditaxmlgenerator.cpp
src/tools/qdoc/ditaxmlgenerator.h
src/tools/qdoc/generator.cpp
src/tools/qdoc/generator.h
src/tools/qdoc/helpprojectwriter.cpp
src/tools/qdoc/htmlgenerator.cpp
src/tools/qdoc/htmlgenerator.h
src/tools/qdoc/tree.cpp

index f49b267..9c85e7b 100644 (file)
@@ -646,6 +646,10 @@ void DitaXmlGenerator::generateTree(Tree *tree)
 
     Generator::generateTree(tree);
     generateCollisionPages();
+
+    QString fileBase = project.toLower().simplified().replace(" ", "-");
+    generateIndex(fileBase, projectUrl, projectDescription);
+
     writeDitaMap(tree);
 }
 
@@ -2429,7 +2433,7 @@ void DitaXmlGenerator::writeRelatedLinks(const FakeNode* node, CodeMarker* marke
 /*!
   Returns "dita" for this subclass of class Generator.
  */
-QString DitaXmlGenerator::fileExtension(const Node * /* node */) const
+QString DitaXmlGenerator::fileExtension() const
 {
     return "dita";
 }
@@ -5690,7 +5694,7 @@ DitaXmlGenerator::generateInnerNode(InnerNode* node)
 }
 
 /*!
-  Returns true if \a format is "XML" or "HTML" .
+  Returns true if \a format is "DITAXML" or "HTML" .
  */
 bool DitaXmlGenerator::canHandleFormat(const QString& format)
 {
index 6ce42fc..2ced0e0 100644 (file)
@@ -281,7 +281,7 @@ protected:
                              CodeMarker* marker);
     virtual void generateClassLikeNode(InnerNode* inner, CodeMarker* marker);
     virtual void generateFakeNode(FakeNode* fake, CodeMarker* marker);
-    virtual QString fileExtension(const Node* node) const;
+    virtual QString fileExtension() const;
     virtual QString guidForNode(const Node* node);
     virtual QString linkForNode(const Node* node, const Node* relative);
     virtual QString refForAtom(Atom* atom, const Node* node);
index 4258bc6..16f84bb 100644 (file)
@@ -60,6 +60,7 @@
 QT_BEGIN_NAMESPACE
 
 QString Generator::baseDir_;
+Generator* Generator::currentGenerator_;
 QStringList Generator::exampleDirs;
 QStringList Generator::exampleImgExts;
 QMap<QString, QMap<QString, QString> > Generator::fmtLeftMaps;
@@ -346,7 +347,7 @@ QString Generator::fileName(const Node* node) const
 
     QString name = fileBase(node);
     name += QLatin1Char('.');
-    name += fileExtension(node);
+    name += fileExtension();
     return name;
 }
 
@@ -447,6 +448,173 @@ QMap<QString, QString>& Generator::formattingRightMap()
     return fmtRightMaps[format()];
 }
 
+/*!
+  Returns the full document location.
+ */
+QString Generator::fullDocumentLocation(const Node *node, bool subdir)
+{
+    if (!node)
+        return "";
+    if (!node->url().isEmpty())
+        return node->url();
+
+    QString parentName;
+    QString anchorRef;
+    QString fdl = "";
+
+    /*
+      If the output is being sent to subdirectories of the
+      output directory, and if the subdir parameter is set,
+      prepend the subdirectory name + '/' to the result.
+     */
+    if (subdir) {
+        fdl = node->outputSubdirectory();
+        if (!fdl.isEmpty())
+            fdl.append(QLatin1Char('/'));
+    }
+    if (node->type() == Node::Namespace) {
+
+        // The root namespace has no name - check for this before creating
+        // an attribute containing the location of any documentation.
+
+        if (!node->fileBase().isEmpty())
+            parentName = node->fileBase() + "." + currentGenerator()->fileExtension();
+        else
+            return "";
+    }
+    else if (node->type() == Node::Fake) {
+        if ((node->subType() == Node::QmlClass) ||
+                (node->subType() == Node::QmlBasicType)) {
+            QString fb = node->fileBase();
+            if (fb.startsWith(Generator::outputPrefix(QLatin1String("QML"))))
+                return fb + "." + currentGenerator()->fileExtension();
+            else {
+                QString mq = "";
+                if (!node->qmlModuleName().isEmpty()) {
+                    mq = node->qmlModuleIdentifier().replace(QChar('.'),QChar('-'));
+                    mq = mq.toLower() + "-";
+                }
+                return fdl+ Generator::outputPrefix(QLatin1String("QML")) + mq +
+                        node->fileBase() + "." + currentGenerator()->fileExtension();
+            }
+        }
+        else
+            parentName = node->fileBase() + "." + currentGenerator()->fileExtension();
+    }
+    else if (node->fileBase().isEmpty())
+        return "";
+
+    Node *parentNode = 0;
+
+    if ((parentNode = node->relates())) {
+        parentName = fullDocumentLocation(node->relates());
+    }
+    else if ((parentNode = node->parent())) {
+        if (parentNode->subType() == Node::QmlPropertyGroup) {
+            parentNode = parentNode->parent();
+            parentName = fullDocumentLocation(parentNode);
+        }
+        else
+            parentName = fullDocumentLocation(node->parent());
+    }
+
+    switch (node->type()) {
+    case Node::Class:
+    case Node::Namespace:
+        if (parentNode && !parentNode->name().isEmpty()) {
+            parentName.remove("." + currentGenerator()->fileExtension());
+            parentName +=  QLatin1Char('-')
+                    + node->fileBase().toLower() + "." + currentGenerator()->fileExtension();
+        } else {
+            parentName = node->fileBase() + "." + currentGenerator()->fileExtension();
+        }
+        break;
+    case Node::Function:
+    {
+        /*
+                  Functions can be destructors, overloaded, or
+                  have associated properties.
+                */
+        const FunctionNode *functionNode =
+                static_cast<const FunctionNode *>(node);
+
+        if (functionNode->metaness() == FunctionNode::Dtor)
+            anchorRef = "#dtor." + functionNode->name().mid(1);
+
+        else if (functionNode->associatedProperty())
+            return fullDocumentLocation(functionNode->associatedProperty());
+
+        else if (functionNode->overloadNumber() > 1)
+            anchorRef = QLatin1Char('#') + functionNode->name()
+                    + "-" + QString::number(functionNode->overloadNumber());
+        else
+            anchorRef = QLatin1Char('#') + functionNode->name();
+    }
+
+        /*
+              Use node->name() instead of node->fileBase() as
+              the latter returns the name in lower-case. For
+              HTML anchors, we need to preserve the case.
+            */
+        break;
+    case Node::Enum:
+        anchorRef = QLatin1Char('#') + node->name() + "-enum";
+        break;
+    case Node::Typedef:
+        anchorRef = QLatin1Char('#') + node->name() + "-typedef";
+        break;
+    case Node::Property:
+        anchorRef = QLatin1Char('#') + node->name() + "-prop";
+        break;
+    case Node::QmlProperty:
+        anchorRef = QLatin1Char('#') + node->name() + "-prop";
+        break;
+    case Node::QmlSignal:
+        anchorRef = QLatin1Char('#') + node->name() + "-signal";
+        break;
+    case Node::QmlSignalHandler:
+        anchorRef = QLatin1Char('#') + node->name() + "-signal-handler";
+        break;
+    case Node::QmlMethod:
+        anchorRef = QLatin1Char('#') + node->name() + "-method";
+        break;
+    case Node::Variable:
+        anchorRef = QLatin1Char('#') + node->name() + "-var";
+        break;
+    case Node::Fake:
+    {
+        /*
+              Use node->fileBase() for fake nodes because they are represented
+              by pages whose file names are lower-case.
+            */
+        parentName = node->fileBase();
+        parentName.replace(QLatin1Char('/'), "-").replace(".", "-");
+        parentName += "." + currentGenerator()->fileExtension();
+    }
+        break;
+    default:
+        break;
+    }
+
+    // Various objects can be compat (deprecated) or obsolete.
+    if (node->type() != Node::Class && node->type() != Node::Namespace) {
+        switch (node->status()) {
+        case Node::Compat:
+            parentName.replace("." + currentGenerator()->fileExtension(),
+                               "-compat." + currentGenerator()->fileExtension());
+            break;
+        case Node::Obsolete:
+            parentName.replace("." + currentGenerator()->fileExtension(),
+                               "-obsolete." + currentGenerator()->fileExtension());
+            break;
+        default:
+            ;
+        }
+    }
+
+    return fdl + parentName.toLower() + anchorRef;
+}
+
 QString Generator::fullName(const Node *node,
                             const Node *relative,
                             CodeMarker *marker) const
@@ -1449,6 +1617,7 @@ void Generator::initialize(const Config &config)
     QList<Generator *>::ConstIterator g = generators.begin();
     while (g != generators.end()) {
         if (outputFormats.contains((*g)->format())) {
+            currentGenerator_ = (*g);
             (*g)->initializeGenerator(config);
             QStringList extraImages =
                     config.getCleanPathList(CONFIG_EXTRAIMAGES+Config::dot+(*g)->format());
index c97e596..713bfd2 100644 (file)
@@ -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<QString, QMap<QString, QString> > fmtLeftMaps;
index da2a43d..590feba 100644 (file)
@@ -211,7 +211,7 @@ QStringList HelpProjectWriter::keywordDetails(const Node *node) const
         details << node->name();
         details << node->name();
     }
-    details << HtmlGenerator::fullDocumentLocation(node,true);
+    details << Generator::fullDocumentLocation(node,true);
     return details;
 }
 
@@ -271,12 +271,12 @@ bool HelpProjectWriter::generateSection(HelpProject &project,
 
     case Node::Class:
         project.keywords.append(keywordDetails(node));
-        project.files.insert(HtmlGenerator::fullDocumentLocation(node,true));
+        project.files.insert(Generator::fullDocumentLocation(node,true));
         break;
 
     case Node::Namespace:
         project.keywords.append(keywordDetails(node));
-        project.files.insert(HtmlGenerator::fullDocumentLocation(node,true));
+        project.files.insert(Generator::fullDocumentLocation(node,true));
         break;
 
     case Node::Enum:
@@ -296,7 +296,7 @@ bool HelpProjectWriter::generateSection(HelpProject &project,
                 details << item.name(); // "name"
                 details << item.name(); // "id"
             }
-            details << HtmlGenerator::fullDocumentLocation(node,true);
+            details << Generator::fullDocumentLocation(node,true);
             project.keywords.append(details);
         }
     }
@@ -328,7 +328,7 @@ bool HelpProjectWriter::generateSection(HelpProject &project,
 
         if (node->relates()) {
             project.memberStatus[node->relates()].insert(node->status());
-            project.files.insert(HtmlGenerator::fullDocumentLocation(node->relates(),true));
+            project.files.insert(Generator::fullDocumentLocation(node->relates(),true));
         } else if (node->parent())
             project.memberStatus[node->parent()].insert(node->status());
     }
@@ -342,7 +342,7 @@ bool HelpProjectWriter::generateSection(HelpProject &project,
         // Use the location of any associated enum node in preference
         // to that of the typedef.
         if (enumNode)
-            typedefDetails[2] = HtmlGenerator::fullDocumentLocation(enumNode,true);
+            typedefDetails[2] = Generator::fullDocumentLocation(enumNode,true);
 
         project.keywords.append(typedefDetails);
     }
@@ -350,7 +350,7 @@ bool HelpProjectWriter::generateSection(HelpProject &project,
 
     case Node::Variable:
     {
-        QString location = HtmlGenerator::fullDocumentLocation(node,true);
+        QString location = Generator::fullDocumentLocation(node,true);
         project.files.insert(location.left(location.lastIndexOf(QLatin1Char('#'))));
         project.keywords.append(keywordDetails(node));
     }
@@ -370,12 +370,12 @@ bool HelpProjectWriter::generateSection(HelpProject &project,
                             QStringList details;
                             details << keyword->string()
                                     << keyword->string()
-                                    << HtmlGenerator::fullDocumentLocation(node,true) +
+                                    << Generator::fullDocumentLocation(node,true) +
                                        QLatin1Char('#') + Doc::canonicalTitle(keyword->string());
                             project.keywords.append(details);
                         } else
                             fakeNode->doc().location().warning(
-                                        tr("Bad keyword in %1").arg(HtmlGenerator::fullDocumentLocation(node,true))
+                                        tr("Bad keyword in %1").arg(Generator::fullDocumentLocation(node,true))
                                         );
                     }
                 }
@@ -398,7 +398,7 @@ bool HelpProjectWriter::generateSection(HelpProject &project,
                     }
                 }
 */
-            project.files.insert(HtmlGenerator::fullDocumentLocation(node,true));
+            project.files.insert(Generator::fullDocumentLocation(node,true));
         }
         break;
     }
@@ -477,7 +477,7 @@ void HelpProjectWriter::generate(const Tree *tre)
 void HelpProjectWriter::writeNode(HelpProject &project, QXmlStreamWriter &writer,
                                   const Node *node)
 {
-    QString href = HtmlGenerator::fullDocumentLocation(node,true);
+    QString href = Generator::fullDocumentLocation(node,true);
     QString objName = node->name();
 
     switch (node->type()) {
@@ -625,12 +625,12 @@ void HelpProjectWriter::generateProject(HelpProject &project)
         node = tree->findNode(QStringList("index.html"));
     QString indexPath;
     if (node)
-        indexPath = HtmlGenerator::fullDocumentLocation(node,true);
+        indexPath = Generator::fullDocumentLocation(node,true);
     else
         indexPath = "index.html";
     writer.writeAttribute("ref", indexPath);
     writer.writeAttribute("title", project.indexTitle);
-    project.files.insert(HtmlGenerator::fullDocumentLocation(rootNode));
+    project.files.insert(Generator::fullDocumentLocation(rootNode));
 
     generateSections(project, writer, rootNode);
 
@@ -668,7 +668,7 @@ void HelpProjectWriter::generateProject(HelpProject &project)
 
                             const FakeNode *page = tree->findFakeNodeByTitle(atom->string());
                             writer.writeStartElement("section");
-                            QString indexPath = HtmlGenerator::fullDocumentLocation(page,true);
+                            QString indexPath = Generator::fullDocumentLocation(page,true);
                             writer.writeAttribute("ref", indexPath);
                             writer.writeAttribute("title", atom->string());
                             project.files.insert(indexPath);
@@ -693,7 +693,7 @@ void HelpProjectWriter::generateProject(HelpProject &project)
 
             if (!name.isEmpty()) {
                 writer.writeStartElement("section");
-                QString indexPath = HtmlGenerator::fullDocumentLocation(tree->findFakeNodeByTitle(subproject.indexTitle),true);
+                QString indexPath = Generator::fullDocumentLocation(tree->findFakeNodeByTitle(subproject.indexTitle),true);
                 writer.writeAttribute("ref", indexPath);
                 writer.writeAttribute("title", subproject.title);
                 project.files.insert(indexPath);
index 24dd31e..7d9f3c0 100644 (file)
@@ -1690,7 +1690,7 @@ void HtmlGenerator::generateFakeNode(FakeNode* fake, CodeMarker* marker)
 /*!
   Returns "html" for this subclass of Generator.
  */
-QString HtmlGenerator::fileExtension(const Node * /* node */) const
+QString HtmlGenerator::fileExtension() const
 {
     return "html";
 }
@@ -2110,7 +2110,7 @@ QString HtmlGenerator::generateListOfAllMemberFile(const InnerNode *inner,
     if (sections.isEmpty())
         return QString();
 
-    QString fileName = fileBase(inner) + "-members." + fileExtension(inner);
+    QString fileName = fileBase(inner) + "-members." + fileExtension();
     beginSubPage(inner, fileName);
     QString title = "List of All Members for " + inner->name();
     generateHeader(title, inner, marker);
@@ -2142,7 +2142,7 @@ QString HtmlGenerator::generateAllQmlMembersFile(const QmlClassNode* qml_cn,
     if (sections.isEmpty())
         return QString();
 
-    QString fileName = fileBase(qml_cn) + "-members." + fileExtension(qml_cn);
+    QString fileName = fileBase(qml_cn) + "-members." + fileExtension();
     beginSubPage(qml_cn, fileName);
     QString title = "List of All Members for " + qml_cn->name();
     generateHeader(title, qml_cn, marker);
@@ -2181,11 +2181,11 @@ QString HtmlGenerator::generateLowStatusMemberFile(const InnerNode *inner,
 
     if (status == CodeMarker::Compat) {
         title = "Compatibility Members for " + inner->name();
-        fileName = fileBase(inner) + "-compat." + fileExtension(inner);
+        fileName = fileBase(inner) + "-compat." + fileExtension();
     }
     else {
         title = "Obsolete Members for " + inner->name();
-        fileName = fileBase(inner) + "-obsolete." + fileExtension(inner);
+        fileName = fileBase(inner) + "-obsolete." + fileExtension();
     }
 
     beginSubPage(inner, fileName);
@@ -4319,170 +4319,6 @@ void HtmlGenerator::generateExtractionMark(const Node *node, ExtractionMarkType
     }
 }
 
-/*!
-  Returns the full document location for HTML-based documentation.
- */
-QString HtmlGenerator::fullDocumentLocation(const Node *node, bool subdir)
-{
-    if (!node)
-        return "";
-    if (!node->url().isEmpty())
-        return node->url();
-
-    QString parentName;
-    QString anchorRef;
-    QString fdl = "";
-
-    /*
-      If the output is being sent to subdirectories of the
-      output directory, and if the subdir parameter is set,
-      prepend the subdirectory name + '/' to the result.
-     */
-    if (subdir) {
-        fdl = node->outputSubdirectory();
-        if (!fdl.isEmpty())
-            fdl.append(QLatin1Char('/'));
-    }
-    if (node->type() == Node::Namespace) {
-
-        // The root namespace has no name - check for this before creating
-        // an attribute containing the location of any documentation.
-
-        if (!node->fileBase().isEmpty())
-            parentName = node->fileBase() + ".html";
-        else
-            return "";
-    }
-    else if (node->type() == Node::Fake) {
-        if ((node->subType() == Node::QmlClass) ||
-                (node->subType() == Node::QmlBasicType)) {
-            QString fb = node->fileBase();
-            if (fb.startsWith(Generator::outputPrefix(QLatin1String("QML"))))
-                return fb + ".html";
-            else {
-                QString mq = "";
-                if (!node->qmlModuleName().isEmpty()) {
-                    mq = node->qmlModuleIdentifier().replace(QChar('.'),QChar('-'));
-                    mq = mq.toLower() + "-";
-                }
-                return fdl+ Generator::outputPrefix(QLatin1String("QML")) + mq +
-                        node->fileBase() + QLatin1String(".html");
-            }
-        }
-        else
-            parentName = node->fileBase() + ".html";
-    }
-    else if (node->fileBase().isEmpty())
-        return "";
-
-    Node *parentNode = 0;
-
-    if ((parentNode = node->relates())) {
-        parentName = fullDocumentLocation(node->relates());
-    }
-    else if ((parentNode = node->parent())) {
-        if (parentNode->subType() == Node::QmlPropertyGroup) {
-            parentNode = parentNode->parent();
-            parentName = fullDocumentLocation(parentNode);
-        }
-        else
-            parentName = fullDocumentLocation(node->parent());
-    }
-
-    switch (node->type()) {
-    case Node::Class:
-    case Node::Namespace:
-        if (parentNode && !parentNode->name().isEmpty()) {
-            parentName.remove(".html");
-            parentName +=  QLatin1Char('-')
-                    + node->fileBase().toLower() + ".html";
-        } else {
-            parentName = node->fileBase() + ".html";
-        }
-        break;
-    case Node::Function:
-    {
-        /*
-                  Functions can be destructors, overloaded, or
-                  have associated properties.
-                */
-        const FunctionNode *functionNode =
-                static_cast<const FunctionNode *>(node);
-
-        if (functionNode->metaness() == FunctionNode::Dtor)
-            anchorRef = "#dtor." + functionNode->name().mid(1);
-
-        else if (functionNode->associatedProperty())
-            return fullDocumentLocation(functionNode->associatedProperty());
-
-        else if (functionNode->overloadNumber() > 1)
-            anchorRef = QLatin1Char('#') + functionNode->name()
-                    + "-" + QString::number(functionNode->overloadNumber());
-        else
-            anchorRef = QLatin1Char('#') + functionNode->name();
-    }
-
-        /*
-              Use node->name() instead of node->fileBase() as
-              the latter returns the name in lower-case. For
-              HTML anchors, we need to preserve the case.
-            */
-        break;
-    case Node::Enum:
-        anchorRef = QLatin1Char('#') + node->name() + "-enum";
-        break;
-    case Node::Typedef:
-        anchorRef = QLatin1Char('#') + node->name() + "-typedef";
-        break;
-    case Node::Property:
-        anchorRef = QLatin1Char('#') + node->name() + "-prop";
-        break;
-    case Node::QmlProperty:
-        anchorRef = QLatin1Char('#') + node->name() + "-prop";
-        break;
-    case Node::QmlSignal:
-        anchorRef = QLatin1Char('#') + node->name() + "-signal";
-        break;
-    case Node::QmlSignalHandler:
-        anchorRef = QLatin1Char('#') + node->name() + "-signal-handler";
-        break;
-    case Node::QmlMethod:
-        anchorRef = QLatin1Char('#') + node->name() + "-method";
-        break;
-    case Node::Variable:
-        anchorRef = QLatin1Char('#') + node->name() + "-var";
-        break;
-    case Node::Fake:
-    {
-        /*
-              Use node->fileBase() for fake nodes because they are represented
-              by pages whose file names are lower-case.
-            */
-        parentName = node->fileBase();
-        parentName.replace(QLatin1Char('/'), "-").replace(".", "-");
-        parentName += ".html";
-    }
-        break;
-    default:
-        break;
-    }
-
-    // Various objects can be compat (deprecated) or obsolete.
-    if (node->type() != Node::Class && node->type() != Node::Namespace) {
-        switch (node->status()) {
-        case Node::Compat:
-            parentName.replace(".html", "-compat.html");
-            break;
-        case Node::Obsolete:
-            parentName.replace(".html", "-obsolete.html");
-            break;
-        default:
-            ;
-        }
-    }
-
-    return fdl + parentName.toLower() + anchorRef;
-}
 
 /*!
   This function outputs one or more manifest files in XML.
index 403c1f0..a4e6c2f 100644 (file)
@@ -94,7 +94,6 @@ public:
     static QString protect(const QString &string, const QString &encoding = "ISO-8859-1");
     static QString cleanRef(const QString& ref);
     static QString sinceTitle(int i) { return sinceTitles[i]; }
-    static QString fullDocumentLocation(const Node *node, bool subdir = false);
 
 protected:
     virtual void startText(const Node *relative, CodeMarker *marker);
@@ -103,7 +102,7 @@ protected:
                              CodeMarker *marker);
     virtual void generateClassLikeNode(InnerNode* inner, CodeMarker* marker);
     virtual void generateFakeNode(FakeNode* fake, CodeMarker* marker);
-    virtual QString fileExtension(const Node *node) const;
+    virtual QString fileExtension() const;
     virtual QString refForNode(const Node *node);
     virtual QString linkForNode(const Node *node, const Node *relative);
     virtual QString refForAtom(Atom *atom, const Node *node);
index 3dfcfea..98c269d 100644 (file)
@@ -1513,7 +1513,7 @@ bool Tree::generateIndexSection(QXmlStreamWriter& writer,
     QString href = node->outputSubdirectory();
     if (!href.isEmpty())
         href.append(QLatin1Char('/'));
-    href.append(HtmlGenerator::fullDocumentLocation(node));
+    href.append(Generator::fullDocumentLocation(node));
     writer.writeAttribute("href", href);
     if ((node->type() != Node::Fake) && (!node->isQmlNode()))
         writer.writeAttribute("location", node->location().fileName());
@@ -2026,7 +2026,7 @@ void Tree::generateTagFileCompounds(QXmlStreamWriter& writer, const InnerNode* i
 
         if (node->type() == Node::Class) {
             writer.writeTextElement("name", node->fullDocumentName());
-            writer.writeTextElement("filename", HtmlGenerator::fullDocumentLocation(node,true));
+            writer.writeTextElement("filename", Generator::fullDocumentLocation(node,true));
 
             // Classes contain information about their base classes.
             const ClassNode* classNode = static_cast<const ClassNode*>(node);
@@ -2044,7 +2044,7 @@ void Tree::generateTagFileCompounds(QXmlStreamWriter& writer, const InnerNode* i
             generateTagFileCompounds(writer, static_cast<const InnerNode*>(node));
         } else {
             writer.writeTextElement("name", node->fullDocumentName());
-            writer.writeTextElement("filename", HtmlGenerator::fullDocumentLocation(node,true));
+            writer.writeTextElement("filename", Generator::fullDocumentLocation(node,true));
 
             // Recurse to write all members.
             generateTagFileMembers(writer, static_cast<const InnerNode*>(node));
@@ -2163,7 +2163,7 @@ void Tree::generateTagFileMembers(QXmlStreamWriter& writer, const InnerNode* inn
                                         "virtual " + functionNode->returnType());
 
             writer.writeTextElement("name", objName);
-            QStringList pieces = HtmlGenerator::fullDocumentLocation(node,true).split(QLatin1Char('#'));
+            QStringList pieces = Generator::fullDocumentLocation(node,true).split(QLatin1Char('#'));
             writer.writeTextElement("anchorfile", pieces[0]);
             writer.writeTextElement("anchor", pieces[1]);
 
@@ -2202,7 +2202,7 @@ void Tree::generateTagFileMembers(QXmlStreamWriter& writer, const InnerNode* inn
             const PropertyNode* propertyNode = static_cast<const PropertyNode*>(node);
             writer.writeAttribute("type", propertyNode->dataType());
             writer.writeTextElement("name", objName);
-            QStringList pieces = HtmlGenerator::fullDocumentLocation(node,true).split(QLatin1Char('#'));
+            QStringList pieces = Generator::fullDocumentLocation(node,true).split(QLatin1Char('#'));
             writer.writeTextElement("anchorfile", pieces[0]);
             writer.writeTextElement("anchor", pieces[1]);
             writer.writeTextElement("arglist", "");
@@ -2214,7 +2214,7 @@ void Tree::generateTagFileMembers(QXmlStreamWriter& writer, const InnerNode* inn
         {
             const EnumNode* enumNode = static_cast<const EnumNode*>(node);
             writer.writeTextElement("name", objName);
-            QStringList pieces = HtmlGenerator::fullDocumentLocation(node).split(QLatin1Char('#'));
+            QStringList pieces = Generator::fullDocumentLocation(node).split(QLatin1Char('#'));
             writer.writeTextElement("anchor", pieces[1]);
             writer.writeTextElement("arglist", "");
             writer.writeEndElement(); // member
@@ -2238,7 +2238,7 @@ void Tree::generateTagFileMembers(QXmlStreamWriter& writer, const InnerNode* inn
             else
                 writer.writeAttribute("type", "");
             writer.writeTextElement("name", objName);
-            QStringList pieces = HtmlGenerator::fullDocumentLocation(node,true).split(QLatin1Char('#'));
+            QStringList pieces = Generator::fullDocumentLocation(node,true).split(QLatin1Char('#'));
             writer.writeTextElement("anchorfile", pieces[0]);
             writer.writeTextElement("anchor", pieces[1]);
             writer.writeTextElement("arglist", "");