diff options
author | Sandro S. Andrade <sandroandrade@kde.org> | 2013-08-29 15:44:51 -0300 |
---|---|---|
committer | Sandro S. Andrade <sandroandrade@kde.org> | 2013-08-29 20:48:01 +0200 |
commit | 03a141b2de08aaaa12b69ae7422d524aaeb7e1b2 (patch) | |
tree | 4c2379fb75733c99ad069dd154c023e5715be1ce /scripts | |
parent | 65c1353742f739bbb82df36fd11a0e2155ce4ff0 (diff) |
Move documentation from internal classes to QObject-based classes
Change-Id: Iecaf7c942d71a12d98eec38cf95a77c97772c29e
Reviewed-by: Sandro S. Andrade <sandroandrade@kde.org>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/templates/class.cpp | 20 | ||||
-rw-r--r-- | scripts/templates/qclass.cpp | 26 | ||||
-rw-r--r-- | scripts/templates/qclass.h | 2 |
3 files changed, 24 insertions, 24 deletions
diff --git a/scripts/templates/class.cpp b/scripts/templates/class.cpp index 3e0f1b61..b3717b11 100644 --- a/scripts/templates/class.cpp +++ b/scripts/templates/class.cpp @@ -58,14 +58,6 @@ #include "private/${forward.lower}_p.h" [%- END %] -/*! - \class ${namespace}${className} - - \inmodule Qt${namespace} - - \brief ${class.findvalue("ownedComment/body/text()")} - */ - ${namespace}${className}::${namespace}${className}() [%- SET found = "false" -%] [%- FOREACH attribute = class.findnodes("ownedAttribute[(@isDerived=\"false\" or not(@isDerived)) or (@isDerivedUnion and @isDerivedUnion=\"true\")]") -%] @@ -113,12 +105,6 @@ ${namespace}${className}::${namespace}${className}() // OWNED ATTRIBUTES [%- END %] -[%- SET documentation = attribute.findvalue("ownedComment/body/text()") -%] -[%- IF documentation != "" %] -/*! - ${documentation} - */ -[%- END -%] [%- SET qtAttribute = QT_ATTRIBUTE(attribute) -%] [%- SET qtType = QT_TYPE(namespace, attribute) -%] [%- SET readOnly = attribute.findvalue("@isReadOnly") -%] @@ -317,12 +303,6 @@ void ${namespace}${className}::set${attributeName.remove("^Is")}(${QT_TYPE(names [%- SET returnType = QT_TYPE(namespace, operation.findnodes("ownedParameter[@direction='return']")) %] -[%- SET documentation = operation.findvalue("ownedComment/body/text()") -%] -[%- IF documentation != "" %] -/*! - ${documentation} - */ -[%- END %] ${returnType}${namespace}${className}::${operationName}( [% SET parameters = operation.findnodes("ownedParameter[@direction!='return']") -%] [%- FOREACH parameter = parameters -%] diff --git a/scripts/templates/qclass.cpp b/scripts/templates/qclass.cpp index 6729a3d5..d1b21d31 100644 --- a/scripts/templates/qclass.cpp +++ b/scripts/templates/qclass.cpp @@ -55,6 +55,14 @@ [%- END -%] QT_BEGIN_NAMESPACE +/*! + \class ${namespace}${className} + + \inmodule Qt${namespace} + + \brief ${class.findvalue("ownedComment/body/text()")} + */ + Q${namespace}${className}::Q${namespace}${className}(QObject *parent) : QObject(parent) { @@ -62,8 +70,14 @@ Q${namespace}${className}::Q${namespace}${className}(QObject *parent) : [% FOREACH attribute = class.findnodes("ownedAttribute") -%] [%- IF loop.first -%] -// Owned attributes +// OWNED ATTRIBUTES [% END -%] +[%- SET documentation = attribute.findvalue("ownedComment/body/text()") -%] +[%- IF documentation != "" %] +/*! + ${documentation} + */ +[%- END -%] [%- SET qtAttribute = QT_ATTRIBUTE(attribute) -%] [%- SET qtType = QT_TYPE(namespace, attribute, "false") -%] [%- SET derived = attribute.findvalue("@isDerived") -%] @@ -99,10 +113,16 @@ Q${namespace}${className}::Q${namespace}${className}(QObject *parent) : [%- END -%] [% FOREACH operation = class.findnodes("ownedOperation[@name != ../ownedAttribute[@isDerived='true']/@name]") -%] [%- IF loop.first -%] -// Operations +// OPERATIONS [% END -%] [% SET operationName = operation.findvalue("@name") -%] [%- SET return = QT_TYPE(namespace, operation.findnodes("ownedParameter[@direction='return']"), "false") %] +[%- SET documentation = operation.findvalue("ownedComment/body/text()") -%] +[%- IF documentation != "" %] +/*! + ${documentation} + */ +[%- END %] [% return -%] Q${namespace}${className}::${operationName}( [%- FOREACH parameter = operation.findnodes("ownedParameter[@direction!='return']") -%] @@ -146,7 +166,7 @@ ${parameter.findvalue("@name")} [%- END -%] [% FOREACH attribute = class.findnodes("ownedAttribute") -%] [%- IF loop.first -%] -// Slots for owned attributes +// SLOTS FOR OWNED ATTRIBUTES [% END -%] [%- SET readOnly = attribute.findvalue("@isReadOnly") %] [%- IF readOnly == "false" || readOnly == "" -%] diff --git a/scripts/templates/qclass.h b/scripts/templates/qclass.h index a68631d0..65eeb195 100644 --- a/scripts/templates/qclass.h +++ b/scripts/templates/qclass.h @@ -122,7 +122,7 @@ ${parameter.findvalue("@name")} [%- IF loop.first %] public Q_SLOTS: - // Owned attributes + // Slots for owned attributes [%- END -%] [%- SET qtAttribute = QT_ATTRIBUTE(attribute) -%] [%- SET qtType = QT_TYPE(namespace, attribute, "false") -%] |