From cb3152086c61e7c51ed1c5f8c5946364e19abc4d Mon Sep 17 00:00:00 2001 From: Fabian Kosmale Date: Tue, 21 Jan 2020 15:33:11 +0100 Subject: Introduce Q_PROPERTY attribute REQUIRED This is meant to correspond to required properties in QML. Change-Id: I2645981e13f7423bc86b48370c165b3cfe2aaa62 Task-number: QTBUG-81561 Reviewed-by: Olivier Goffart (Woboq GmbH) --- src/tools/moc/generator.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/tools/moc/generator.cpp') diff --git a/src/tools/moc/generator.cpp b/src/tools/moc/generator.cpp index 034e846918..8d4fb2efc6 100644 --- a/src/tools/moc/generator.cpp +++ b/src/tools/moc/generator.cpp @@ -864,6 +864,8 @@ void Generator::generateProperties() flags |= Constant; if (p.final) flags |= Final; + if (p.required) + flags |= Required; fprintf(out, " %4d, ", stridx(p.name)); generateTypeInfo(p.type); -- cgit v1.2.3