summaryrefslogtreecommitdiffstats
path: root/tools/qdoc3
diff options
context:
space:
mode:
authorMartin Smith <martin.smith@nokia.com>2010-07-07 12:21:55 (GMT)
committerMartin Smith <martin.smith@nokia.com>2010-07-07 12:21:55 (GMT)
commit896de79554060aadf4963d8285ef3f5d8740428b (patch)
treea6ef96517ec9977bf97131a43f62a3cd68feeebf /tools/qdoc3
parent047dd2d73fab867187d17f684be464233f64165b (diff)
downloadQt-896de79554060aadf4963d8285ef3f5d8740428b.zip
Qt-896de79554060aadf4963d8285ef3f5d8740428b.tar.gz
Qt-896de79554060aadf4963d8285ef3f5d8740428b.tar.bz2
qdoc: Fixed a few links to QtObject (QML:QtObject)
Diffstat (limited to 'tools/qdoc3')
-rw-r--r--tools/qdoc3/cppcodeparser.cpp15
-rw-r--r--tools/qdoc3/htmlgenerator.cpp5
-rw-r--r--tools/qdoc3/tree.cpp6
3 files changed, 10 insertions, 16 deletions
diff --git a/tools/qdoc3/cppcodeparser.cpp b/tools/qdoc3/cppcodeparser.cpp
index e4870e3..d5108fd 100644
--- a/tools/qdoc3/cppcodeparser.cpp
+++ b/tools/qdoc3/cppcodeparser.cpp
@@ -728,23 +728,12 @@ Node *CppCodeParser::processTopicCommand(const Doc& doc,
if (n)
classNode = static_cast<const ClassNode*>(n);
}
- if (names[0].startsWith("Q"))
+ if (names[0].startsWith("Qt"))
return new QmlClassNode(tre->root(), QLatin1String("QML:")+names[0], classNode);
else
return new QmlClassNode(tre->root(), names[0], classNode);
}
else if (command == COMMAND_QMLBASICTYPE) {
-#if 0
- QStringList parts = arg.split(" ");
- qDebug() << command << parts;
- if (parts.size() > 1) {
- FakeNode* pageNode = static_cast<FakeNode*>(tre->root()->findNode(parts[1], Node::Fake));
- if (pageNode) {
- qDebug() << "FOUND";
- return new QmlBasicTypeNode(pageNode, parts[0]);
- }
- }
-#endif
return new QmlBasicTypeNode(tre->root(), arg);
}
else if ((command == COMMAND_QMLSIGNAL) ||
@@ -755,7 +744,7 @@ Node *CppCodeParser::processTopicCommand(const Doc& doc,
QString type;
QmlClassNode* qmlClass = 0;
if (splitQmlMethodArg(doc,arg,type,element)) {
- if (element.startsWith(QLatin1String("Q")))
+ if (element.startsWith(QLatin1String("Qt")))
element = QLatin1String("QML:") + element;
Node* n = tre->findNode(QStringList(element),Node::Fake);
if (n && n->subType() == Node::QmlClass) {
diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp
index b7ab4d6..441cfc6 100644
--- a/tools/qdoc3/htmlgenerator.cpp
+++ b/tools/qdoc3/htmlgenerator.cpp
@@ -4197,7 +4197,10 @@ void HtmlGenerator::generateQmlInstantiates(const QmlClassNode* qcn,
text << "[";
text << Atom(Atom::LinkNode,CodeMarker::stringForNode(qcn));
text << Atom(Atom::FormattingLeft, ATOM_FORMATTING_LINK);
- text << Atom(Atom::String, qcn->name());
+ QString name = qcn->name();
+ if (name.startsWith(QLatin1String("QML:")))
+ name = name.mid(4); // remove the "QML:" prefix
+ text << Atom(Atom::String, name);
text << Atom(Atom::FormattingRight, ATOM_FORMATTING_LINK);
text << " instantiates the C++ class ";
text << Atom(Atom::LinkNode,CodeMarker::stringForNode(cn));
diff --git a/tools/qdoc3/tree.cpp b/tools/qdoc3/tree.cpp
index 022e1c2..d22a09a 100644
--- a/tools/qdoc3/tree.cpp
+++ b/tools/qdoc3/tree.cpp
@@ -173,9 +173,11 @@ const Node* Tree::findNode(const QStringList &path,
}
if (node && i == path.size()
&& (!(findFlags & NonFunction) || node->type() != Node::Function
- || ((FunctionNode *)node)->metaness() == FunctionNode::MacroWithoutParams))
- if ((node != self) && (node->subType() != Node::QmlPropertyGroup))
+ || ((FunctionNode *)node)->metaness() == FunctionNode::MacroWithoutParams)) {
+ if ((node != self) && (node->subType() != Node::QmlPropertyGroup)) {
return node;
+ }
+ }
current = current->parent();
} while (current);