diff options
Diffstat (limited to 'src/tools/moc/moc.h')
-rw-r--r-- | src/tools/moc/moc.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/tools/moc/moc.h b/src/tools/moc/moc.h index bb1c9501fe..a3e20a061e 100644 --- a/src/tools/moc/moc.h +++ b/src/tools/moc/moc.h @@ -61,6 +61,7 @@ struct Type }; Q_DECLARE_TYPEINFO(Type, Q_MOVABLE_TYPE); +struct ClassDef; struct EnumDef { QByteArray name; @@ -68,6 +69,7 @@ struct EnumDef QVector<QByteArray> values; bool isEnumClass; // c++11 enum class EnumDef() : isEnumClass(false) {} + QJsonObject toJson(const ClassDef &cdef) const; }; Q_DECLARE_TYPEINFO(EnumDef, Q_MOVABLE_TYPE); @@ -78,6 +80,8 @@ struct ArgumentDef QByteArray rightType, normalizedType, name; QByteArray typeNameForCast; // type name to be used in cast from void * in metacall bool isDefault; + + QJsonObject toJson() const; }; Q_DECLARE_TYPEINFO(ArgumentDef, Q_MOVABLE_TYPE); @@ -111,6 +115,9 @@ struct FunctionDef bool isConstructor = false; bool isDestructor = false; bool isAbstract = false; + + QJsonObject toJson() const; + static void accessToJson(QJsonObject *obj, Access acs); }; Q_DECLARE_TYPEINFO(FunctionDef, Q_MOVABLE_TYPE); @@ -130,6 +137,9 @@ struct PropertyDef int revision = 0; bool constant = false; bool final = false; + bool required = false; + + QJsonObject toJson() const; }; Q_DECLARE_TYPEINFO(PropertyDef, Q_MOVABLE_TYPE); @@ -182,7 +192,9 @@ struct ClassDef : BaseDef { bool hasQObject = false; bool hasQGadget = false; + bool hasQNamespace = false; + QJsonObject toJson() const; }; Q_DECLARE_TYPEINFO(ClassDef, Q_MOVABLE_TYPE); Q_DECLARE_TYPEINFO(ClassDef::Interface, Q_MOVABLE_TYPE); @@ -213,9 +225,10 @@ public: QHash<QByteArray, QByteArray> knownQObjectClasses; QHash<QByteArray, QByteArray> knownGadgets; QMap<QString, QJsonArray> metaArgs; + QVector<QString> parsedPluginMetadataFiles; void parse(); - void generate(FILE *out); + void generate(FILE *out, FILE *jsonOutput); bool parseClassHead(ClassDef *def); inline bool inClass(const ClassDef *def) const { |