qdoc: Replaced hard-coded href with computed href
For enum types that have QFlags versions, qdoc was outputting the documentation with a hard-coded link to qflags.html, which only workjed in the single directory mode. When qdoc outputs modular documentation, the href for the link should be "../qtcore/qflags.html" . Now qdoc computes this href correctly before it writes the docs. The href is no longer hard-coded. Task-number: QTBUG-35209 Change-Id: Ibdf5b11dbd063726eb77048de78f8874c65752ca Reviewed-by: Topi Reiniö <topi.reinio@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
This commit is contained in:
parent
119ea0f2db
commit
1fc28716e6
@ -269,6 +269,9 @@ QString HtmlGenerator::format()
|
||||
void HtmlGenerator::generateTree()
|
||||
{
|
||||
qdb_->buildCollections();
|
||||
Node* qflags = qdb_->findNodeByNameAndType(QStringList("QFlags"), Node::Class, Node::NoSubType);
|
||||
if (qflags)
|
||||
qflagsHref_ = linkForNode(qflags,0);
|
||||
if (!runPrepareOnly()) {
|
||||
Generator::generateTree();
|
||||
generateCollisionPages();
|
||||
@ -3660,7 +3663,7 @@ void HtmlGenerator::generateDetailedMember(const Node *node,
|
||||
if (enume->flagsType()) {
|
||||
out() << "<p>The " << protectEnc(enume->flagsType()->name())
|
||||
<< " type is a typedef for "
|
||||
<< "<a href=\"qflags.html\">QFlags</a><"
|
||||
<< "<a href=\"" << qflagsHref_ << "\">QFlags</a><"
|
||||
<< protectEnc(enume->name())
|
||||
<< ">. It stores an OR combination of "
|
||||
<< protectEnc(enume->name())
|
||||
|
@ -262,6 +262,7 @@ private:
|
||||
QString cppclassespage;
|
||||
QString qmltypespage;
|
||||
QString buildversion;
|
||||
QString qflagsHref_;
|
||||
|
||||
public:
|
||||
static bool debugging_on;
|
||||
|
Loading…
Reference in New Issue
Block a user