From 0b3fd47adafef4ea58ac3431ecd55bb06fd6f4e6 Mon Sep 17 00:00:00 2001 From: "Sandro S. Andrade" Date: Sun, 24 Nov 2013 21:58:57 -0300 Subject: Change QModelingObjectPropertyModel to show "to be implemented" When implementing derived properties/operations the Q_TODO tag should also be removed in the corresponding *object_p.h file. Change-Id: I4c81d5754b5289778957d0c2912fe2dd92479387 Reviewed-by: Sandro S. Andrade --- scripts/templates/common.tmpl | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'scripts/templates/common.tmpl') diff --git a/scripts/templates/common.tmpl b/scripts/templates/common.tmpl index 23463ce2..1db78b48 100644 --- a/scripts/templates/common.tmpl +++ b/scripts/templates/common.tmpl @@ -135,6 +135,8 @@ ${attributeName} [%- SET found = "false" -%] [%- SET className = class.findvalue("@name") -%] [%- FOREACH attribute IN attributes -%] + [%- SET derived = attribute.findvalue("@isDerived") -%] + [%- SET derivedUnion = attribute.findvalue("@isDerivedUnion") -%] [%- IF found == "false" %] // Owned attributes [${className}] @@ -144,11 +146,11 @@ ${attributeName} [%- NEXT IF redefinedProperties.grep("^${className}-${qtAttribute}$").size > 0 -%] [%- SET qtType = QT_TYPE(namespace, attribute, "false") -%] [%- IF qtType.match("QList|QSet") %] - Q_INVOKABLE const ${qtType}${PLURALFORM(qtAttribute, attribute)}() const; + [% IF derived == "true" && (derivedUnion == "false" || derivedUnion == "") %]Q_TODO [% END %]Q_INVOKABLE const ${qtType}${PLURALFORM(qtAttribute, attribute)}() const; [%- ELSIF qtType.match('\*$') %] - Q_INVOKABLE ${qtType}${qtAttribute}() const; + [% IF derived == "true" && (derivedUnion == "false" || derivedUnion == "") %]Q_TODO [% END %]Q_INVOKABLE ${qtType}${qtAttribute}() const; [%- ELSE %] - Q_INVOKABLE ${qtType}${qtAttribute}() const; + [% IF derived == "true" && (derivedUnion == "false" || derivedUnion == "") %]Q_TODO [% END %]Q_INVOKABLE ${qtType}${qtAttribute}() const; [%- END %] [%- IF loop.last %] [%- END %] @@ -174,7 +176,7 @@ ${attributeName} [%- NEXT IF redefinedOperations.grep("^${className}-${operationName}$").size > 0 -%] [%- SET qtType = QT_TYPE(namespace, operation.findnodes("ownedParameter[@direction='return']"), "false") -%] - Q_INVOKABLE [%- IF qtType != " " -%]${qtType}[%- ELSE -%]void [%- END -%] + Q_TODO Q_INVOKABLE [%- IF qtType != " " -%]${qtType}[%- ELSE -%]void [%- END -%] [%- IF uml2qt_attribute.item(operationName) != "" -%]${uml2qt_attribute.item(operationName)}[%- ELSE -%]${operationName}[%- END -%]( [%- FOREACH parameter = operation.findnodes("ownedParameter[@direction!='return']") -%] [%- QT_TYPE(namespace, parameter, "false") -%] -- cgit v1.2.3