From a1dcbbac2ce28c84a8e93652a2285a2d97727d67 Mon Sep 17 00:00:00 2001 From: "Sandro S. Andrade" Date: Sat, 2 Mar 2013 21:58:59 -0300 Subject: Fix names of boolean properties. Add initial script support Change-Id: Ic4b1fe6cf3ee28ab34959c21704c71ffb11f6dd8 Reviewed-by: Sandro S. Andrade --- scripts/templates/class.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts/templates') 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 %] -- cgit v1.2.3