aboutsummaryrefslogtreecommitdiff
path: root/mmoc
diff options
context:
space:
mode:
authorTomas Junnonen <tomas.junnonen@nokia.com>2010-04-20 15:46:38 +0300
committerTomas Junnonen <tomas.junnonen@nokia.com>2010-04-20 15:46:38 +0300
commitdc7071072018f6a4200f8054b9abb23ead4a0a85 (patch)
tree32a524342cf13144a927b1d5c808ab9b9105a9a2 /mmoc
parent09a74b966ecf8ce2822a2b169883634e87f12117 (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-xmmoc/mmoc4
1 files changed, 2 insertions, 2 deletions
diff --git a/mmoc/mmoc b/mmoc/mmoc
index 98737a56..1d0e1d09 100755
--- a/mmoc/mmoc
+++ b/mmoc/mmoc
@@ -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";
}