summaryrefslogtreecommitdiffstats
path: root/src/tools/qdoc/qdocindexfiles.cpp
diff options
context:
space:
mode:
authorMartin Smith <martin.smith@digia.com>2012-11-02 09:54:55 +0100
committerMartin Smith <martin.smith@digia.com>2012-11-02 12:41:43 +0100
commitd9d8845d507a6bdbc9c9f24c0d9d86dca513461d (patch)
tree79a0e56c3907d2c575bb897b240f6ec40325b77e /src/tools/qdoc/qdocindexfiles.cpp
parent8f1687c572ea661a7b91b0aa675796145513c275 (diff)
qdoc: Fixed the since list for modularized Qt
This required adding a "since" attribute to the index file. Task number: QTBUG-27695 Change-Id: I97ca96b837ce404ea85ca8086718be4e7a9e21a8 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Diffstat (limited to 'src/tools/qdoc/qdocindexfiles.cpp')
-rw-r--r--src/tools/qdoc/qdocindexfiles.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/tools/qdoc/qdocindexfiles.cpp b/src/tools/qdoc/qdocindexfiles.cpp
index 33b489d6d0..14dfa334ae 100644
--- a/src/tools/qdoc/qdocindexfiles.cpp
+++ b/src/tools/qdoc/qdocindexfiles.cpp
@@ -50,13 +50,6 @@
#include "generator.h"
#include <qdebug.h>
-//include "doc.h"
-//include "htmlgenerator.h"
-//include "node.h"
-//include "text.h"
-//include <limits.h>
-//include <qdebug.h>
-
QT_BEGIN_NAMESPACE
/*!
@@ -447,6 +440,11 @@ void QDocIndexFiles::readIndexSection(const QDomElement& element,
section->setUrl(indexUrl + QLatin1Char('/') + href);
}
+ QString since = element.attribute("since");
+ if (!since.isEmpty()) {
+ section->setSince(since);
+ }
+
// Create some content for the node.
QSet<QString> emptySet;
Doc doc(location, location, " ", emptySet); // placeholder
@@ -506,7 +504,7 @@ bool QDocIndexFiles::generateIndexSection(QXmlStreamWriter& writer,
Node* node,
bool generateInternalNodes)
{
- if (!node->url().isEmpty() || node->subType() == Node::DitaMap)
+ if (node->subType() == Node::DitaMap)
return false;
QString nodeName;
@@ -646,6 +644,10 @@ bool QDocIndexFiles::generateIndexSection(QXmlStreamWriter& writer,
if ((node->type() != Node::Document) && (!node->isQmlNode()))
writer.writeAttribute("location", node->location().fileName());
+ if (!node->since().isEmpty()) {
+ writer.writeAttribute("since", node->since());
+ }
+
switch (node->type()) {
case Node::Class:
{