diff options
author | Martin Smith <[email protected]> | 2012-07-24 14:27:37 +0200 |
---|---|---|
committer | Qt by Nokia <[email protected]> | 2012-07-25 01:00:41 +0200 |
commit | a4cd6ef25df6a2a99626a0e97bfc239f68e7771f (patch) | |
tree | a95e458fe9f64b76ddcbabc0ec46554c017f6dba /src/tools/qdoc/node.cpp | |
parent | 48d439833ac25c033a5c999a8f2dbf94561b5bca (diff) |
qdoc: Fixed incorrect href attribute values in qdoc
There were two fileBase() functions, but only one
was correct. The wrong one was being called in some
cases. Now there is only one fileBase() function,
which is always called.
Task nr: QTBUG-26591
Change-Id: I2c40e2152a8c7ad1bb9db256ecf1367148f0e7f6
Reviewed-by: Casper van Donderen <[email protected]>
Diffstat (limited to 'src/tools/qdoc/node.cpp')
-rw-r--r-- | src/tools/qdoc/node.cpp | 29 |
1 files changed, 4 insertions, 25 deletions
diff --git a/src/tools/qdoc/node.cpp b/src/tools/qdoc/node.cpp index 967c4c441a0..1464603db5f 100644 --- a/src/tools/qdoc/node.cpp +++ b/src/tools/qdoc/node.cpp @@ -505,6 +505,7 @@ Node::ThreadSafeness Node::inheritedThreadSafeness() const return safeness_; } +#if 0 /*! Returns the sanitized file name without the path. If the the file is an html file, the html suffix @@ -520,7 +521,7 @@ QString Node::fileBase() const base.replace(QLatin1Char(' '), QLatin1Char('-')); return base.toLower(); } - +#endif /*! Returns this node's Universally Unique IDentifier as a QString. Creates the UUID first, if it has not been created. @@ -533,29 +534,6 @@ QString Node::guid() const } /*! - Composes a string to be used as an href attribute in DITA - XML. It is composed of the file name and the UUID separated - by a '#'. If this node is a class node, the file name is - taken from this node; if this node is a function node, the - file name is taken from the parent node of this node. - */ -QString Node::ditaXmlHref() -{ - QString href; - if ((type() == Function) || - (type() == Property) || - (type() == Variable)) { - href = parent()->fileBase(); - } - else { - href = fileBase(); - } - if (!href.endsWith(".xml") && !href.endsWith(".dita")) - href += ".dita"; - return href + QLatin1Char('#') + guid(); -} - -/*! If this node is a QML class node, return a pointer to it. If it is a child of a QML class node, return a pointer to the QML class node. Otherwise, return 0; @@ -2086,6 +2064,7 @@ QmlClassNode* QmlClassNode::lookupQmlTypeNode(const QString& qmid, const QString return qmlModuleMemberMap_.value(qmid + "::" + name); } +#if 0 /*! The base file name for this kind of node has "qml_" prepended to it. @@ -2096,7 +2075,7 @@ QString QmlClassNode::fileBase() const { return Node::fileBase(); } - +#endif /*! Record the fact that QML class \a base is inherited by QML class \a sub. |