diff options
author | Tomas Junnonen <tomas.junnonen@nokia.com> | 2010-04-20 15:46:38 +0300 |
---|---|---|
committer | Tomas Junnonen <tomas.junnonen@nokia.com> | 2010-04-20 15:46:38 +0300 |
commit | dc7071072018f6a4200f8054b9abb23ead4a0a85 (patch) | |
tree | 32a524342cf13144a927b1d5c808ab9b9105a9a2 /mmoc | |
parent | 09a74b966ecf8ce2822a2b169883634e87f12117 (diff) |
Fixes: MB#9970 - Model properties are not being exposed as Q_PROPERTYs
By: James
RevBy: Tomas
Details: mmoc currently did not parse the M_MODEL(_PTR)_PROPERTY macro correctly and
subsequently did not convert them to Q_PROPERTY macros before passing to Qt's
moc.
Diffstat (limited to 'mmoc')
-rwxr-xr-x | mmoc/mmoc | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -202,8 +202,8 @@ sub runModelMoc chomp; my $line = $_; - $line =~ s/$pattern[0]/ Q_PROPERTY($1 $2 READ $2 WRITE set$3)/; - $line =~ s/$pattern[1]/ Q_PROPERTY($1 $2 READ $2 WRITE set$3)/; + $line =~ s/\s*M_MODEL_PROPERTY\s*\((\w+)\s*,\s*(\w+)\s*,\s*(\w+)\s*,\s*(\w+)\s*,\s*([^\(\)]+)(?:\(\))?\s*\)\s*/ Q_PROPERTY($1 $2 READ $2 WRITE set$3)/; + $line =~ s/\s*M_MODEL_PTR_PROPERTY\s*\((\w+\s*(?:\*)*)\s*,\s*(\w+)\s*,\s*(\w+)\s*,\s*(\w+)\s*,\s*([^\(\)]+)(?:\(\))?\s*\)\s*/ Q_PROPERTY($1 $2 READ $2 WRITE set$3)/; print MOC "$line\n"; } |