diff options
Diffstat (limited to 'src/tools/moc/moc.h')
-rw-r--r-- | src/tools/moc/moc.h | 75 |
1 files changed, 37 insertions, 38 deletions
diff --git a/src/tools/moc/moc.h b/src/tools/moc/moc.h index d98c73e1a0..2bba8a5bb9 100644 --- a/src/tools/moc/moc.h +++ b/src/tools/moc/moc.h @@ -83,57 +83,53 @@ Q_DECLARE_TYPEINFO(ArgumentDef, Q_MOVABLE_TYPE); struct FunctionDef { - FunctionDef(): returnTypeIsVolatile(false), access(Private), isConst(false), isVirtual(false), isStatic(false), - inlineCode(false), wasCloned(false), isCompat(false), isInvokable(false), - isScriptable(false), isSlot(false), isSignal(false), isPrivateSignal(false), - isConstructor(false), isDestructor(false), isAbstract(false), revision(0) {} Type type; + QVector<ArgumentDef> arguments; QByteArray normalizedType; QByteArray tag; QByteArray name; - bool returnTypeIsVolatile; - - QVector<ArgumentDef> arguments; + QByteArray inPrivateClass; enum Access { Private, Protected, Public }; - Access access; - bool isConst; - bool isVirtual; - bool isStatic; - bool inlineCode; - bool wasCloned; - - QByteArray inPrivateClass; - bool isCompat; - bool isInvokable; - bool isScriptable; - bool isSlot; - bool isSignal; - bool isPrivateSignal; - bool isConstructor; - bool isDestructor; - bool isAbstract; - - int revision; + Access access = Private; + int revision = 0; + + bool isConst = false; + bool isVirtual = false; + bool isStatic = false; + bool inlineCode = false; + bool wasCloned = false; + + bool returnTypeIsVolatile = false; + + bool isCompat = false; + bool isInvokable = false; + bool isScriptable = false; + bool isSlot = false; + bool isSignal = false; + bool isPrivateSignal = false; + bool isConstructor = false; + bool isDestructor = false; + bool isAbstract = false; }; Q_DECLARE_TYPEINFO(FunctionDef, Q_MOVABLE_TYPE); struct PropertyDef { - PropertyDef():notifyId(-1), constant(false), final(false), gspec(ValueSpec), revision(0){} - QByteArray name, type, member, read, write, reset, designable, scriptable, editable, stored, user, notify, inPrivateClass; - int notifyId; // -1 means no notifyId, >= 0 means signal defined in this class, < -1 means signal not defined in this class - bool constant; - bool final; - enum Specification { ValueSpec, ReferenceSpec, PointerSpec }; - Specification gspec; bool stdCppSet() const { QByteArray s("set"); s += toupper(name[0]); s += name.mid(1); return (s == write); } - int revision; + + QByteArray name, type, member, read, write, reset, designable, scriptable, editable, stored, user, notify, inPrivateClass; + int notifyId = -1; // -1 means no notifyId, >= 0 means signal defined in this class, < -1 means signal not defined in this class + enum Specification { ValueSpec, ReferenceSpec, PointerSpec }; + Specification gspec = ValueSpec; + int revision = 0; + bool constant = false; + bool final = false; }; Q_DECLARE_TYPEINFO(PropertyDef, Q_MOVABLE_TYPE); @@ -169,9 +165,6 @@ struct ClassDef : BaseDef { }; QVector<QVector<Interface> >interfaceList; - bool hasQObject = false; - bool hasQGadget = false; - struct PluginData { QByteArray iid; QMap<QString, QJsonArray> metaArgs; @@ -181,17 +174,21 @@ struct ClassDef : BaseDef { QVector<FunctionDef> constructorList; QVector<FunctionDef> signalList, slotList, methodList, publicList; QVector<QByteArray> nonClassSignalList; - int notifyableProperties = 0; QVector<PropertyDef> propertyList; + int notifyableProperties = 0; int revisionedMethods = 0; int revisionedProperties = 0; + bool hasQObject = false; + bool hasQGadget = false; + }; Q_DECLARE_TYPEINFO(ClassDef, Q_MOVABLE_TYPE); Q_DECLARE_TYPEINFO(ClassDef::Interface, Q_MOVABLE_TYPE); struct NamespaceDef : BaseDef { bool hasQNamespace = false; + bool doGenerate = false; }; Q_DECLARE_TYPEINFO(NamespaceDef, Q_MOVABLE_TYPE); @@ -260,6 +257,8 @@ public: bool testFunctionAttribute(Token tok, FunctionDef *def); bool testFunctionRevision(FunctionDef *def); + bool skipCxxAttributes(); + void checkSuperClasses(ClassDef *def); void checkProperties(ClassDef* cdef); }; |