summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Smith <martin.smith@nokia.com>2010-08-20 06:50:57 (GMT)
committerMartin Smith <martin.smith@nokia.com>2010-08-20 06:50:57 (GMT)
commit870701fc34dc50bb06e55467e28da66f23ace2ea (patch)
treeda03c7808aaba1b72f0fa00d45c6d1cce005fbc5
parentd129112034d600ea925a4199d8bad72388444335 (diff)
downloadQt-870701fc34dc50bb06e55467e28da66f23ace2ea.zip
Qt-870701fc34dc50bb06e55467e28da66f23ace2ea.tar.gz
Qt-870701fc34dc50bb06e55467e28da66f23ace2ea.tar.bz2
qdoc: Changed id attribute to be a UUID.
Task-nr: QTBUG-11113
-rw-r--r--tools/qdoc3/htmlgenerator.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp
index 3e79a9f..e4443b0 100644
--- a/tools/qdoc3/htmlgenerator.cpp
+++ b/tools/qdoc3/htmlgenerator.cpp
@@ -4423,7 +4423,7 @@ bool HtmlGenerator::generatePageElement(QXmlStreamWriter& writer,
if (node->access() == Node::Private)
return false;
- QString t;
+ QString guid = QUuid::createUuid().toString();
QString url = PageGenerator::fileName(node);
QString title;
QString rawTitle;
@@ -4432,7 +4432,6 @@ bool HtmlGenerator::generatePageElement(QXmlStreamWriter& writer,
QXmlStreamAttributes attributes;
writer.writeStartElement("page");
- t.setNum(id++);
if (node->isInnerNode()) {
const InnerNode* inner = static_cast<const InnerNode*>(node);
@@ -4510,7 +4509,7 @@ bool HtmlGenerator::generatePageElement(QXmlStreamWriter& writer,
}
}
- writer.writeAttribute("id",t);
+ writer.writeAttribute("id",guid);
writer.writeStartElement("pageWords");
writer.writeCharacters(pageWords.join(" "));
@@ -4545,9 +4544,9 @@ bool HtmlGenerator::generatePageElement(QXmlStreamWriter& writer,
Text headingText = Text::sectionHeading(toc.at(i));
QString s = headingText.toString();
writer.writeStartElement("page");
- t.setNum(id++);
+ guid = QUuid::createUuid().toString();
QString internalUrl = url + "#" + Doc::canonicalTitle(s);
- writer.writeAttribute("id",t);
+ writer.writeAttribute("id",guid);
writer.writeStartElement("pageWords");
writer.writeCharacters(pageWords.join(" "));
writer.writeCharacters(" ");