summaryrefslogtreecommitdiffstats
path: root/src/tools/moc
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/moc')
-rw-r--r--src/tools/moc/generator.cpp2
-rw-r--r--src/tools/moc/moc.cpp4
-rw-r--r--src/tools/moc/moc.h1
3 files changed, 7 insertions, 0 deletions
diff --git a/src/tools/moc/generator.cpp b/src/tools/moc/generator.cpp
index 43bbe5ad02..f41b0e8ba4 100644
--- a/src/tools/moc/generator.cpp
+++ b/src/tools/moc/generator.cpp
@@ -854,6 +854,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);
diff --git a/src/tools/moc/moc.cpp b/src/tools/moc/moc.cpp
index 2fb8c8dee3..625725e5a1 100644
--- a/src/tools/moc/moc.cpp
+++ b/src/tools/moc/moc.cpp
@@ -1254,6 +1254,9 @@ void Moc::createPropertyDef(PropertyDef &propDef)
} else if(l[0] == 'F' && l == "FINAL") {
propDef.final = true;
continue;
+ } else if (l[0] == 'R' && l == "REQUIRED") {
+ propDef.required = true;
+ continue;
}
QByteArray v, v2;
@@ -1986,6 +1989,7 @@ QJsonObject PropertyDef::toJson() const
prop[QLatin1String("constant")] = constant;
prop[QLatin1String("final")] = final;
+ prop[QLatin1String("required")] = required;
if (revision > 0)
prop[QLatin1String("revision")] = revision;
diff --git a/src/tools/moc/moc.h b/src/tools/moc/moc.h
index 91a03a767f..4d3d32a6ac 100644
--- a/src/tools/moc/moc.h
+++ b/src/tools/moc/moc.h
@@ -138,6 +138,7 @@ struct PropertyDef
int revision = 0;
bool constant = false;
bool final = false;
+ bool required = false;
QJsonObject toJson() const;
};