summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Filho <renato.filho@openbossa.org>2011-05-19 10:44:44 -0300
committerRenato Filho <renato.filho@openbossa.org>2011-05-19 11:30:22 -0300
commit84572f3ee8a4407dd44a218a5844a4ba5d5a6efa (patch)
tree21034eda8f21ae2ffe0e22021a6b3d02f1e43417
parentccbdbb57ddae9785d0ede24deddd8a2882bb25f7 (diff)
Implemented support to "since" attribute on documentation.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org> Hugo Parente <hugo.lima@openbossa.org>
-rw-r--r--generators/qtdoc/qtdocgenerator.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/generators/qtdoc/qtdocgenerator.cpp b/generators/qtdoc/qtdocgenerator.cpp
index b2ac7fcd..52a0bf93 100644
--- a/generators/qtdoc/qtdocgenerator.cpp
+++ b/generators/qtdoc/qtdocgenerator.cpp
@@ -966,6 +966,9 @@ void QtDocGenerator::generateClass(QTextStream& s, const AbstractMetaClass* meta
s << ".. inheritance-diagram:: " << className << endl
<< " :parts: 2" << endl << endl; // TODO: This would be a parameter in the future...
+ if (metaClass->typeEntry() && (metaClass->typeEntry()->version() != 0))
+ s << ".. note:: This class was introduced in Qt " << metaClass->typeEntry()->version() << endl;
+
writeFunctionList(s, metaClass);
//Function list
@@ -1079,7 +1082,11 @@ void QtDocGenerator::writeEnums(QTextStream& s, const AbstractMetaClass* cppClas
foreach (AbstractMetaEnum* en, cppClass->enums()) {
s << section_title << getClassTargetFullName(cppClass) << "." << en->name() << endl << endl;
writeFormatedText(s, en->documentation(), cppClass);
+
+ if (en->typeEntry() && (en->typeEntry()->version() != 0))
+ s << ".. note:: This enum was introduced or modified in Qt " << en->typeEntry()->version() << endl;
}
+
}
void QtDocGenerator::writeFields(QTextStream& s, const AbstractMetaClass* cppClass)
@@ -1388,6 +1395,9 @@ void QtDocGenerator::writeFunction(QTextStream& s, bool writeDoc, const Abstract
writeFunctionSignature(s, cppClass, func);
s << endl;
+ if (func->typeEntry() && (func->typeEntry()->version() != 0))
+ s << ".. note:: This method was introduced in Qt " << func->typeEntry()->version() << endl;
+
if (writeDoc) {
s << endl;
writeFunctionParametersType(s, cppClass, func);