summaryrefslogtreecommitdiffstats
path: root/tools/qdoc3
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2009-07-29 01:01:07 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2009-07-29 01:01:07 (GMT)
commitb3d030df07ba59059e3d6ecf6e1967cbf1f30d49 (patch)
treee0a939a1381c2b983c7fdc79c5f116f87b3a3bc6 /tools/qdoc3
parent93ad359f93de72ef8c4d5f0073dc20ba22b9023c (diff)
parenta6ea9ce6990003856ecadcca8ce9ddf37949363d (diff)
downloadQt-b3d030df07ba59059e3d6ecf6e1967cbf1f30d49.zip
Qt-b3d030df07ba59059e3d6ecf6e1967cbf1f30d49.tar.gz
Qt-b3d030df07ba59059e3d6ecf6e1967cbf1f30d49.tar.bz2
Merge branch 'master' of ../qt into kinetic-declarativeui
Conflicts: configure.exe src/gui/graphicsview/qgraphicsitem.cpp src/gui/graphicsview/qgraphicsitem.h src/gui/graphicsview/qgraphicsitem_p.h src/gui/graphicsview/qgraphicsscene.cpp src/gui/widgets/qlineedit.cpp
Diffstat (limited to 'tools/qdoc3')
-rw-r--r--tools/qdoc3/htmlgenerator.cpp28
-rw-r--r--tools/qdoc3/htmlgenerator.h1
2 files changed, 25 insertions, 4 deletions
diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp
index bb96d55..b1f8167 100644
--- a/tools/qdoc3/htmlgenerator.cpp
+++ b/tools/qdoc3/htmlgenerator.cpp
@@ -1917,6 +1917,9 @@ void HtmlGenerator::generateAnnotatedList(const Node *relative,
foreach (const QString &name, nodeMap.keys()) {
const Node *node = nodeMap[name];
+ if (node->status() == Node::Obsolete)
+ continue;
+
if (++row % 2 == 1)
out() << "<tr valign=\"top\" class=\"odd\">";
else
@@ -3021,7 +3024,9 @@ QString HtmlGenerator::highlightedCode(const QString& markedCode,
}
#endif
-void HtmlGenerator::generateLink(const Atom *atom, const Node * /* relative */, CodeMarker *marker)
+void HtmlGenerator::generateLink(const Atom* atom,
+ const Node* /* relative */,
+ CodeMarker* marker)
{
static QRegExp camelCase("[A-Z][A-Z][a-z]|[a-z][A-Z0-9]|_");
@@ -3621,6 +3626,7 @@ QString HtmlGenerator::getLink(const Atom *atom,
{
QString link;
*node = 0;
+ inObsoleteLink = false;
if (atom->string().contains(":") &&
(atom->string().startsWith("file:")
@@ -3672,9 +3678,19 @@ QString HtmlGenerator::getLink(const Atom *atom,
if (relative) {
if (relative->parent() != *node) {
if (relative->status() != Node::Obsolete) {
- relative->doc().location().warning(tr("Link to obsolete item '%1' in %2")
- .arg(atom->string())
- .arg(marker->plainFullName(relative)));
+ bool porting = false;
+ if (relative->type() == Node::Fake) {
+ const FakeNode* fake = static_cast<const FakeNode*>(relative);
+ if (fake->title().startsWith("Porting"))
+ porting = true;
+ }
+ QString name = marker->plainFullName(relative);
+ if (!porting && !name.startsWith("Q3")) {
+ relative->doc().location().warning(tr("Link to obsolete item '%1' in %2")
+ .arg(atom->string())
+ .arg(name));
+ inObsoleteLink = true;
+ }
#if 0
qDebug() << "Link to Obsolete entity"
<< (*node)->name();
@@ -3830,10 +3846,14 @@ void HtmlGenerator::endLink()
out() << "</i>";
}
else {
+ if (inObsoleteLink) {
+ out() << "<sup>(obsolete)</sup>";
+ }
out() << "</a>";
}
}
inLink = false;
+ inObsoleteLink = false;
}
QT_END_NAMESPACE
diff --git a/tools/qdoc3/htmlgenerator.h b/tools/qdoc3/htmlgenerator.h
index a330d0c..180c307 100644
--- a/tools/qdoc3/htmlgenerator.h
+++ b/tools/qdoc3/htmlgenerator.h
@@ -249,6 +249,7 @@ class HtmlGenerator : public PageGenerator
DcfSection dcfQmakeRoot;
HelpProjectWriter *helpProjectWriter;
bool inLink;
+ bool inObsoleteLink;
bool inContents;
bool inSectionHeading;
bool inTableHeader;