diff options
author | Marcelo Lira <marcelo.lira@openbossa.org> | 2009-08-24 16:23:24 -0300 |
---|---|---|
committer | Marcelo Lira <marcelo.lira@openbossa.org> | 2009-08-24 16:23:24 -0300 |
commit | 59777bbd55a87043e6d8783d619036701e3b5387 (patch) | |
tree | dbdd2909a4caa82c87832e7efa1b25fd412231a5 | |
parent | 48dd9b112e9ea7bc6c95703cdfd5e8fd269b80b4 (diff) |
fixed problem on documentation: method lists for classes get the
scope duplicated when the owner class is inside a namespace
-rw-r--r-- | docgenerator.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/docgenerator.cpp b/docgenerator.cpp index ac3dbf378..ebba37b70 100644 --- a/docgenerator.cpp +++ b/docgenerator.cpp @@ -762,7 +762,7 @@ QTextStream& operator<<(QTextStream& s, const QtXmlToSphinx::Table &table) } static QString getClassName(const AbstractMetaClass *cppClass) { - return cppClass->name().replace("::", "."); + return QString(cppClass->typeEntry()->qualifiedCppName()).replace("::", "."); } static QString getFuncName(const AbstractMetaFunction *cppFunc) { @@ -942,9 +942,18 @@ QString DocGenerator::parseFunctionDeclaration(const QString &doc, const Abstrac QString methName = data.mid(0, data.indexOf("(")); QString methArgs = data.mid(data.indexOf("(")); - data = QString("def :meth:`%1<%2.%3>` %4") + QString scope = cppClass->name(); + QStringList splitedMethName = methName.split("."); + + if (splitedMethName.first() == scope) { + splitedMethName.removeFirst(); + methName = splitedMethName.join("."); + } + scope.append("."); + + data = QString("def :meth:`%1<%2%3>` %4") .arg(methName) - .arg(cppClass->name()) + .arg(scope) .arg(methName) .arg(methArgs); |