diff options
author | Renato Filho <renato.filho@openbossa.org> | 2010-06-30 18:10:49 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-09 19:10:06 -0300 |
commit | 1930fb468bf5b81a02a18d564be90b5737fa7242 (patch) | |
tree | f8e6173aef0beae3e87f53795c08a5472c753cd6 /qtdocparser.cpp | |
parent | 2d266c0947c72635c2a1c3550a44497f16473d91 (diff) |
Implemented support to namespace on documentation.
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
Luciano Wolf <luciano.wolf@openbossa.org>
Diffstat (limited to 'qtdocparser.cpp')
-rw-r--r-- | qtdocparser.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/qtdocparser.cpp b/qtdocparser.cpp index 6847607da..66977c611 100644 --- a/qtdocparser.cpp +++ b/qtdocparser.cpp @@ -53,7 +53,19 @@ void QtDocParser::fillDocumentation(AbstractMetaClass* metaClass) if (!metaClass) return; + QString scope = metaClass->name(); + const AbstractMetaClass* context = metaClass->enclosingClass(); + while(context) { + if (context->enclosingClass() == 0) + break; + context = context->enclosingClass(); + } + QString filename = metaClass->qualifiedCppName().toLower().replace("::", "-"); + // Remove namespace + if (context && context->isNamespace() && filename.startsWith(context->name(), Qt::CaseInsensitive)) { + filename = filename.remove(0, context->name().size() + 1); + } QString sourceFile = documentationDataDirectory() + '/' + filename + ".xml"; if (metaClass->enclosingClass()) sourceFile.replace("::", "-"); |