diff options
author | Sandro S. Andrade <sandroandrade@kde.org> | 2013-03-02 21:58:59 -0300 |
---|---|---|
committer | Sandro S. Andrade <sandroandrade@kde.org> | 2013-03-03 02:00:03 +0100 |
commit | a1dcbbac2ce28c84a8e93652a2285a2d97727d67 (patch) | |
tree | 610d3e1082e386055e890d59bee79b920874a23a /scripts/templates | |
parent | f1994201daa16629bbbda50dd6d2a653ac380f02 (diff) |
Fix names of boolean properties. Add initial script support
Change-Id: Ic4b1fe6cf3ee28ab34959c21704c71ffb11f6dd8
Reviewed-by: Sandro S. Andrade <sandroandrade@kde.org>
Diffstat (limited to 'scripts/templates')
-rw-r--r-- | scripts/templates/class.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/templates/class.h b/scripts/templates/class.h index 40e23c08..22790cd5 100644 --- a/scripts/templates/class.h +++ b/scripts/templates/class.h @@ -58,7 +58,7 @@ [%- IF attribute.isReadOnly == 'true' or attribute.accessor.size == 3 %] Q_PROPERTY(${attribute.accessor.0.return.remove('^const ').remove('&$')}[%- IF attribute.accessor.0.return.substr(attribute.accessor.0.return.length - 1, 1) == '*' -%] [% END -%]${attribute.accessor.0.name} READ ${attribute.accessor.0.name}[% IF attribute.isDerived == 'true' and attribute.isDerivedUnion == 'false' %] STORED false[% END %]) [%- ELSE %] - Q_PROPERTY(${attribute.accessor.0.return}[%- IF attribute.accessor.0.return.substr(attribute.accessor.0.return.length - 1, 1) == '*' -%] [% END -%]${attribute.accessor.0.name} READ ${attribute.accessor.0.name} WRITE ${attribute.accessor.1.name}[% IF attribute.defaultValue != '' %] RESET unset${attribute.accessor.0.name.ucfirst.replace('^Is', '')}[% END %][% IF attribute.isDerived == 'true' and attribute.isDerivedUnion == 'false' %] STORED false[% END %]) + Q_PROPERTY(${attribute.accessor.0.return}[%- IF attribute.accessor.0.return.substr(attribute.accessor.0.return.length - 1, 1) == '*' -%] [% END -%][%- IF attribute.accessor.0.name.upper != attribute.accessor.0.name -%]${attribute.accessor.0.name.replace('^is', '').lcfirst}[%- ELSE -%]${attribute.accessor.0.name}[%- END -%] READ ${attribute.accessor.0.name} WRITE ${attribute.accessor.1.name}[% IF attribute.defaultValue != '' %] RESET unset${attribute.accessor.0.name.ucfirst.replace('^Is', '')}[% END %][% IF attribute.isDerived == 'true' and attribute.isDerivedUnion == 'false' %] STORED false[% END %]) [%- END -%] [%- END -%] [%- END -%] @@ -74,7 +74,7 @@ [%- IF associationend.isReadOnly == 'true' or associationend.accessor.size == 3 %] Q_PROPERTY(${associationend.accessor.0.return.remove('^const ').remove('&$')}[%- IF associationend.accessor.0.return.substr(associationend.accessor.0.return.length - 1, 1) == '*' -%] [% END -%]${associationend.accessor.0.name} READ ${associationend.accessor.0.name}[% IF associationend.isDerived == 'true' and associationend.isDerivedUnion == 'false' %] STORED false[% END %]) [%- ELSE %] - Q_PROPERTY(${associationend.accessor.0.return}[%- IF associationend.accessor.0.return.substr(associationend.accessor.0.return.length - 1, 1) == '*' -%] [% END -%]${associationend.accessor.0.name} READ ${associationend.accessor.0.name} WRITE ${associationend.accessor.1.name}[% IF associationend.defaultValue != '' %] RESET unset${associationend.accessor.0.name.ucfirst.replace('^Is', '')}[% END %][% IF associationend.isDerived == 'true' and associationend.isDerivedUnion == 'false' %] STORED false[% END %]) + Q_PROPERTY(${associationend.accessor.0.return}[%- IF associationend.accessor.0.return.substr(associationend.accessor.0.return.length - 1, 1) == '*' -%] [% END -%][%- IF associationend.accessor.0.name.upper != associationend.accessor.0.name -%]${associationend.accessor.0.name.replace('^is', '').lcfirst}[%- ELSE -%]${associationend.accessor.0.name}[%- END -%] READ ${associationend.accessor.0.name} WRITE ${associationend.accessor.1.name}[% IF associationend.defaultValue != '' %] RESET unset${associationend.accessor.0.name.ucfirst.replace('^Is', '')}[% END %][% IF associationend.isDerived == 'true' and associationend.isDerivedUnion == 'false' %] STORED false[% END %]) [%- END -%] [%- END -%] [%- END %] |