summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2011-03-01 18:34:38 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2011-03-01 18:39:54 -0300
commit5f29e0324065ebb76f39b8e8fb2cecc91db150dc (patch)
tree80de5a263696ad525b28b7df5eb404bf8b77064d
parent66bd499c3b5abd332ca804a55857705d34eb0a4a (diff)
Use extra directory to also find module docs.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org> Luciano Wolf <luciano.wolf@openbossa.org>
-rw-r--r--generators/qtdoc/qtdocgenerator.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/generators/qtdoc/qtdocgenerator.cpp b/generators/qtdoc/qtdocgenerator.cpp
index 04e648be..fedb05a9 100644
--- a/generators/qtdoc/qtdocgenerator.cpp
+++ b/generators/qtdoc/qtdocgenerator.cpp
@@ -1412,12 +1412,20 @@ void QtDocGenerator::finishGeneration()
s << "Detailed Description" << endl;
s << "--------------------" << endl << endl;
- Documentation moduleDoc = m_docParser->retrieveModuleDocumentation(it.key());
- if (moduleDoc.format() == Documentation::Native) {
- QtXmlToSphinx x(this, moduleDoc.value(), QString(it.key()).remove(0, it.key().lastIndexOf('.') + 1));
- s << x;
+ // module doc is always wrong and C++istic, so go straight to the extra directory!
+ QFile moduleDoc(m_extraSectionDir + '/' + it.key() + ".rst");
+ if (moduleDoc.open(QIODevice::ReadOnly | QIODevice::Text)) {
+ s << moduleDoc.readAll();
+ moduleDoc.close();
} else {
- s << moduleDoc.value();
+ // try the normal way
+ Documentation moduleDoc = m_docParser->retrieveModuleDocumentation(it.key());
+ if (moduleDoc.format() == Documentation::Native) {
+ QtXmlToSphinx x(this, moduleDoc.value(), QString(it.key()).remove(0, it.key().lastIndexOf('.') + 1));
+ s << x;
+ } else {
+ s << moduleDoc.value();
+ }
}
}
}