summaryrefslogtreecommitdiffstats
path: root/src/tools/moc/moc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/moc/moc.cpp')
-rw-r--r--src/tools/moc/moc.cpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/tools/moc/moc.cpp b/src/tools/moc/moc.cpp
index e31bdfbb15..44e669a664 100644
--- a/src/tools/moc/moc.cpp
+++ b/src/tools/moc/moc.cpp
@@ -1527,14 +1527,9 @@ void Moc::parsePrivateQProperty(ClassDef *def)
next(IDENTIFIER);
const QByteArray setter = lexem();
- def->privateQProperties += PrivateQPropertyDef{type, name, setter, accessor};
-
PropertyDef propDef;
propDef.name = name;
- propDef.qpropertyname = name;
propDef.type = type.name;
- propDef.read = name + ".value";
- propDef.write = name + ".setValue";
propDef.isQProperty = true;
propDef.isQPropertyWithNotifier = true;
propDef.inPrivateClass = accessor;
@@ -1544,6 +1539,17 @@ void Moc::parsePrivateQProperty(ClassDef *def)
if (test(COMMA))
parsePropertyAttributes(propDef);
+ propDef.qpropertyname = (propDef.stored == "true") ? name : (name + "()");
+
+ def->privateQProperties += PrivateQPropertyDef {
+ type, name, setter, accessor, propDef.qpropertyname
+ };
+
+ if (propDef.read.isEmpty())
+ propDef.read = propDef.qpropertyname + ".value";
+ if (propDef.write.isEmpty())
+ propDef.write = propDef.qpropertyname + ".setValue";
+
next(RPAREN);
def->propertyList += propDef;