diff options
author | David Boddie <dboddie@trolltech.com> | 2010-06-18 11:31:50 (GMT) |
---|---|---|
committer | David Boddie <dboddie@trolltech.com> | 2010-06-18 11:31:50 (GMT) |
commit | 68073bbcde2d1b12d36f0c58aab1fc20f02ab967 (patch) | |
tree | a3b0bb1a56edf47e16f9c37b3142e41b2fc11600 /tools/qdoc3/codemarker.cpp | |
parent | 9e7f0b9e45cef278c8874539257b4038a0aa6615 (diff) | |
download | Qt-68073bbcde2d1b12d36f0c58aab1fc20f02ab967.zip Qt-68073bbcde2d1b12d36f0c58aab1fc20f02ab967.tar.gz Qt-68073bbcde2d1b12d36f0c58aab1fc20f02ab967.tar.bz2 |
qdoc: Added a workaround for QML/Qt class name clashes.
Reviewed-by: Trust Me
Diffstat (limited to 'tools/qdoc3/codemarker.cpp')
-rw-r--r-- | tools/qdoc3/codemarker.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/tools/qdoc3/codemarker.cpp b/tools/qdoc3/codemarker.cpp index 818a91f..33ceaf5 100644 --- a/tools/qdoc3/codemarker.cpp +++ b/tools/qdoc3/codemarker.cpp @@ -257,6 +257,7 @@ QString CodeMarker::typified(const QString &string) QString CodeMarker::taggedNode(const Node* node) { QString tag; + QString name = node->name(); switch (node->type()) { case Node::Namespace: @@ -277,11 +278,20 @@ QString CodeMarker::taggedNode(const Node* node) case Node::Property: tag = QLatin1String("@property"); break; +#ifdef QDOC_QML + case Node::Fake: + if (node->subType() == Node::QmlClass) { + if (node->name().startsWith(QLatin1String("QML:"))) + name = name.mid(4); // remove the "QML:" prefix + } + tag = QLatin1String("@property"); + break; +#endif default: tag = QLatin1String("@unknown"); break; } - return QLatin1Char('<') + tag + QLatin1Char('>') + protect(node->name()) + return QLatin1Char('<') + tag + QLatin1Char('>') + protect(name) + QLatin1String("</") + tag + QLatin1Char('>'); } |