aboutsummaryrefslogtreecommitdiffstats
path: root/generators
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2011-05-18 17:29:41 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2011-05-18 18:42:52 -0300
commitccbdbb57ddae9785d0ede24deddd8a2882bb25f7 (patch)
tree1ae326ec908da6a2ea5dbe4007e569721ae299c9 /generators
parente371f92d30c72f8074398a1cb9ad3d365ade54bc (diff)
Fix bug 830 - "QAbstractItemModel is not linked from QTreeView page"
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org> Luciano Wolf <luciano.wolf@openbossa.org>
Diffstat (limited to 'generators')
-rw-r--r--generators/qtdoc/qtdocgenerator.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/generators/qtdoc/qtdocgenerator.cpp b/generators/qtdoc/qtdocgenerator.cpp
index 4d764f98a..b2ac7fcd6 100644
--- a/generators/qtdoc/qtdocgenerator.cpp
+++ b/generators/qtdoc/qtdocgenerator.cpp
@@ -581,11 +581,16 @@ void QtXmlToSphinx::handleLinkTag(QXmlStreamReader& reader)
l_linktag = " :func:`";
} else if (l_type == "class") {
l_linktag = " :class:`";
- QStringList rawlinklist = l_linkref.split(".");
- QStringList splittedContext = m_context.split(".");
- if (rawlinklist.size() == 1 || rawlinklist.first() == splittedContext.last()) {
- splittedContext.removeLast();
- l_linkref.prepend('~' + splittedContext.join(".") + '.');
+ TypeEntry* type = TypeDatabase::instance()->findType(l_linkref);
+ if (type) {
+ l_linkref = type->qualifiedTargetLangName();
+ } else { // fall back to the old heuristic if the type wasn't found.
+ QStringList rawlinklist = l_linkref.split(".");
+ QStringList splittedContext = m_context.split(".");
+ if (rawlinklist.size() == 1 || rawlinklist.first() == splittedContext.last()) {
+ splittedContext.removeLast();
+ l_linkref.prepend('~' + splittedContext.join(".") + '.');
+ }
}
} else if (l_type == "enum") {
l_linktag = " :attr:`";