diff options
author | Sandro S. Andrade <sandroandrade@kde.org> | 2012-09-23 21:13:23 +0000 |
---|---|---|
committer | Sandro S. Andrade <sandroandrade@kde.org> | 2012-09-23 23:14:08 +0200 |
commit | e7adebc308f2649064b679bb54fd5235b8911efb (patch) | |
tree | d53eb591aeb060aeccc39b2efad641b3491ca01a /scripts/xmi2qt.pl | |
parent | ee5cfd0baa5b524d24e8d36dba58f473005dff63 (diff) |
Generate Q_PROPERTIES
Change-Id: I627754c479ac01355f5bfed2a9dc216cc9ccbf89
Reviewed-by: Sandro S. Andrade <sandroandrade@kde.org>
Diffstat (limited to 'scripts/xmi2qt.pl')
-rwxr-xr-x | scripts/xmi2qt.pl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/xmi2qt.pl b/scripts/xmi2qt.pl index c382bd6d..499c63cd 100755 --- a/scripts/xmi2qt.pl +++ b/scripts/xmi2qt.pl @@ -8,7 +8,7 @@ use File::Slurp; use File::Path qw(make_path); use Template; -my $xml = new XML::Simple(keyattr => [], forcearray => ['namespace', 'attribute', 'associationend', 'operation', 'accessor']); +my $xml = new XML::Simple(keyattr => [], forcearray => ['namespace', 'class', 'enumeration', 'attribute', 'associationend', 'operation', 'accessor', 'parameter']); my $tt = Template->new(INTERPOLATE => 1, INCLUDE_PATH => 'templates/'); my $xmi = $xml->XMLin($ARGV[0]); @@ -26,10 +26,12 @@ my $enumerations = $namespace->{'enumeration'}; foreach my $class (@$classes) { open STDOUT, '>', "./".$namespace->{path}."/".lc($class->{name}).".h"; if ($tt->process('class.h', { + namespace => $namespace->{path}, class => $class }) ne 1) { print $tt->error(); } open STDOUT, '>', "./".$namespace->{path}."/".lc($class->{name}).".cpp"; if ($tt->process('class.cpp', { + namespace => $namespace->{path}, class => $class }) ne 1) { print $tt->error(); } } |