summaryrefslogtreecommitdiffstats
path: root/src/tools/qdoc/qdocindexfiles.cpp
diff options
context:
space:
mode:
authorMartin Smith <martin.smith@digia.com>2013-09-20 13:39:08 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-23 12:36:55 +0200
commitf5b3224cb5321b8b3ffefff13f547fbe81ea0c7c (patch)
tree3bf269e09c2819a90f8e0fb7b3297153a1d7ae7d /src/tools/qdoc/qdocindexfiles.cpp
parent2d00d3951d9384c848794ac9dd783986165eef8f (diff)
qdoc: \externalpage links are fixed
The problem was they were being incorrectly written to and read from the index files. Task-number: QTBUG-33510 Change-Id: Ib0b34265cd22fff5ed88ae2fd5d5d7ea58b3761d Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Diffstat (limited to 'src/tools/qdoc/qdocindexfiles.cpp')
-rw-r--r--src/tools/qdoc/qdocindexfiles.cpp26
1 files changed, 16 insertions, 10 deletions
diff --git a/src/tools/qdoc/qdocindexfiles.cpp b/src/tools/qdoc/qdocindexfiles.cpp
index d8cb42513e1..bef22631f09 100644
--- a/src/tools/qdoc/qdocindexfiles.cpp
+++ b/src/tools/qdoc/qdocindexfiles.cpp
@@ -499,9 +499,10 @@ void QDocIndexFiles::readIndexSection(const QDomElement& element,
QString moduleName = element.attribute("module");
if (!moduleName.isEmpty())
node->setModuleName(moduleName);
- if (!indexUrl.isEmpty()) {
+ if (node->isExternalPage())
+ node->setUrl(href);
+ else if (!indexUrl.isEmpty())
node->setUrl(indexUrl + QLatin1Char('/') + href);
- }
QString since = element.attribute("since");
if (!since.isEmpty()) {
@@ -776,15 +777,20 @@ bool QDocIndexFiles::generateIndexSection(QXmlStreamWriter& writer,
if (!qmlFullBaseName.isEmpty())
writer.writeAttribute("qml-base-type", qmlFullBaseName);
}
- QString fullName = node->fullDocumentName();
- if (fullName != objName)
- writer.writeAttribute("fullname", fullName);
+
QString href;
- if (Generator::useOutputSubdirs())
- href = node->outputSubdirectory();
- if (!href.isEmpty())
- href.append(QLatin1Char('/'));
- href.append(gen_->fullDocumentLocation(node));
+ if (!node->isExternalPage()) {
+ QString fullName = node->fullDocumentName();
+ if (fullName != objName)
+ writer.writeAttribute("fullname", fullName);
+ if (Generator::useOutputSubdirs())
+ href = node->outputSubdirectory();
+ if (!href.isEmpty())
+ href.append(QLatin1Char('/'));
+ href.append(gen_->fullDocumentLocation(node));
+ }
+ else
+ href = node->name();
writer.writeAttribute("href", href);
writer.writeAttribute("location", node->location().fileName());