diff options
Diffstat (limited to 'src/tools/moc/moc.cpp')
-rw-r--r-- | src/tools/moc/moc.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/tools/moc/moc.cpp b/src/tools/moc/moc.cpp index a14f0c1ccd..8a5abd3020 100644 --- a/src/tools/moc/moc.cpp +++ b/src/tools/moc/moc.cpp @@ -1301,7 +1301,7 @@ void Moc::parsePropertyAttributes(PropertyDef &propDef) error(1); } else if (test(DEFAULT)) { v = lexem(); - if (l != "READ") + if (l != "READ" && l != "WRITE") error(1); } else { next(IDENTIFIER); @@ -1387,6 +1387,12 @@ void Moc::parsePropertyAttributes(PropertyDef &propDef) propDef.read = ""; warning(msg.constData()); } + if (propDef.write == "default" && propDef.bind.isNull()) { + const QByteArray msg = "Property declaration " + propDef.name + + " is not BINDable but default-WRITEable. WRITE will be ignored."; + propDef.write = ""; + warning(msg.constData()); + } } void Moc::parseProperty(ClassDef *def) |