Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
#include <moc.h>
Public Types | |
enum | PropertyMode { Named , Anonymous } |
enum class | EncounteredQmlMacro { Yes , No } |
Public Attributes | |
QByteArray | filename |
bool | noInclude |
bool | mustIncludeQPluginH |
bool | requireCompleteTypes |
QByteArray | includePath |
QList< QByteArray > | includeFiles |
QList< ClassDef > | classList |
QMap< QByteArray, QByteArray > | interface2IdMap |
QList< QByteArray > | metaTypes |
QHash< QByteArray, QByteArray > | knownQObjectClasses |
QHash< QByteArray, QByteArray > | knownGadgets |
QMap< QString, QJsonArray > | metaArgs |
QList< QString > | parsedPluginMetadataFiles |
Public Attributes inherited from Parser | |
Symbols | symbols |
qsizetype | index = 0 |
bool | displayWarnings = true |
bool | displayNotes = true |
bool | activeQtMode = false |
QList< IncludePath > | includes |
std::stack< QByteArray, QByteArrayList > | currentFilenames |
QList< Function > | m_functions |
QList< Point > | m_points |
QList< Replace > | m_replaces |
QList< QString > | m_prefixes |
QList< QString > | m_metadata |
QList< LineNumber > | m_offsets |
QList< QString > | m_includeDirs |
QString | m_provider |
|
strong |
enum Moc::PropertyMode |
|
inline |
Definition at line 213 of file moc.h.
References mustIncludeQPluginH, noInclude, and requireCompleteTypes.
void Moc::createPropertyDef | ( | PropertyDef & | def, |
int | propertyIndex, | ||
Moc::PropertyMode | mode ) |
Definition at line 1324 of file moc.cpp.
References Named, parsePropertyAttributes(), and PropertyDef::relativeIndex.
Referenced by parsePrivateProperty(), and parseProperty().
void Moc::generate | ( | FILE * | out, |
FILE * | jsonOutput ) |
Definition at line 1139 of file moc.cpp.
References mustIncludeQPluginH, and noInclude.
Referenced by runMoc().
|
inline |
Definition at line 237 of file moc.h.
Referenced by parse(), parseSignals(), and parseSlots().
|
inline |
Definition at line 241 of file moc.h.
Referenced by parse(), and prependNamespaces().
QByteArray Moc::lexemUntil | ( | Token | target | ) |
Definition at line 1770 of file moc.cpp.
References is_ident_char(), and until().
void Moc::parse | ( | ) |
Definition at line 664 of file moc.cpp.
References FunctionDef::access, Anonymous, checkListSizes(), checkProperties(), checkSuperClasses(), ClassDef::hasQGadget, NamespaceDef::hasQNamespace, ClassDef::hasQObject, inClass(), inNamespace(), FunctionDef::isConstructor, FunctionDef::isDestructor, FunctionDef::isInvokable, FunctionDef::isSignal, FunctionDef::isSlot, Named, parseClassHead(), parseClassInfo(), parseDeclareInterface(), parseDeclareMetatype(), parseEnum(), parseEnumOrFlag(), parseFlag(), parseInterfaces(), parseMaybeFunction(), parseMocInclude(), parsePluginData(), parsePrivateProperty(), parseProperty(), parseSignals(), parseSlotInPrivate(), parseSlots(), prependNamespaces(), FunctionDef::Private, FunctionDef::Protected, FunctionDef::Public, FunctionDef::revision, ClassDef::revisionedMethods, and until().
Referenced by runMoc().
bool Moc::parseClassHead | ( | ClassDef * | def | ) |
Definition at line 39 of file moc.cpp.
References parseType(), FunctionDef::Private, FunctionDef::Protected, FunctionDef::Public, skipCxxAttributes(), and until().
Referenced by parse().
Moc::EncounteredQmlMacro Moc::parseClassInfo | ( | BaseDef * | def | ) |
Definition at line 1668 of file moc.cpp.
References ClassDef::requireCompleteMethodTypes.
Referenced by parse().
void Moc::parseDeclareInterface | ( | ) |
void Moc::parseDeclareMetatype | ( | ) |
bool Moc::parseEnum | ( | EnumDef * | def | ) |
Definition at line 241 of file moc.cpp.
References IncludeBegin, IncludeEnd, NoInclude, skipCxxAttributes(), and until().
Referenced by parse().
void Moc::parseEnumOrFlag | ( | BaseDef * | def, |
QtMocConstants::EnumFlags | flags ) |
bool Moc::parseFunction | ( | FunctionDef * | def, |
bool | inMacro = false ) |
Definition at line 421 of file moc.cpp.
References FunctionDef::inlineCode, FunctionDef::isAbstract, FunctionDef::isConst, Type::isScoped, FunctionDef::isStatic, FunctionDef::isVirtual, parseFunctionArguments(), parseType(), Type::Reference, skipCxxAttributes(), testForFunctionModifiers(), testFunctionAttribute(), testFunctionRevision(), and until().
Referenced by parseSignals(), parseSlotInPrivate(), and parseSlots().
void Moc::parseFunctionArguments | ( | FunctionDef * | def | ) |
Definition at line 296 of file moc.cpp.
References ArgumentDef::isDefault, FunctionDef::isPrivateSignal, FunctionDef::isRawSlot, parseType(), and until().
Referenced by parseFunction(), and parseMaybeFunction().
bool Moc::parseMaybeFunction | ( | const ClassDef * | cdef, |
FunctionDef * | def ) |
Definition at line 531 of file moc.cpp.
References Type::Type(), FunctionDef::isConst, FunctionDef::isConstructor, FunctionDef::isDestructor, FunctionDef::isInvokable, Type::isScoped, FunctionDef::isSignal, FunctionDef::isSlot, FunctionDef::isStatic, FunctionDef::isVirtual, parseFunctionArguments(), parseType(), Type::Reference, skipCxxAttributes(), testForFunctionModifiers(), testFunctionAttribute(), and testFunctionRevision().
Referenced by parse().
void Moc::parseMocInclude | ( | ) |
Definition at line 1507 of file moc.cpp.
References mustIncludeQPluginH.
Referenced by parse().
void Moc::parsePrivateProperty | ( | ClassDef * | def, |
Moc::PropertyMode | mode ) |
Definition at line 1589 of file moc.cpp.
References createPropertyDef().
Referenced by parse().
void Moc::parseProperty | ( | ClassDef * | def, |
Moc::PropertyMode | mode ) |
Definition at line 1497 of file moc.cpp.
References createPropertyDef().
Referenced by parse().
QByteArray Moc::parsePropertyAccessor | ( | ) |
void Moc::parsePropertyAttributes | ( | PropertyDef & | propDef | ) |
Definition at line 1360 of file moc.cpp.
References PropertyDef::constant, PropertyDef::final, parseRevision(), PropertyDef::required, and PropertyDef::revision.
Referenced by createPropertyDef().
QTypeRevision Moc::parseRevision | ( | ) |
Definition at line 378 of file moc.cpp.
References QTypeRevision::QTypeRevision().
Referenced by parsePropertyAttributes(), parseSignals(), parseSlots(), and testFunctionRevision().
Definition at line 1280 of file moc.cpp.
References FunctionDef::access, inClass(), FunctionDef::isVirtual, parseFunction(), parseRevision(), FunctionDef::Public, FunctionDef::revision, ClassDef::revisionedMethods, and until().
Referenced by parse().
void Moc::parseSlotInPrivate | ( | ClassDef * | def, |
FunctionDef::Access | access ) |
Definition at line 1749 of file moc.cpp.
References FunctionDef::access, parseFunction(), FunctionDef::revision, and ClassDef::revisionedMethods.
Referenced by parse().
void Moc::parseSlots | ( | ClassDef * | def, |
FunctionDef::Access | access ) |
Definition at line 1238 of file moc.cpp.
References FunctionDef::access, inClass(), parseFunction(), parseRevision(), FunctionDef::revision, ClassDef::revisionedMethods, and until().
Referenced by parse().
Type Moc::parseType | ( | ) |
Definition at line 126 of file moc.cpp.
References Type::firstToken, Type::isScoped, Type::isVolatile, Type::NoReference, Type::Pointer, Type::Reference, Type::referenceType, Type::RValueReference, and skipCxxAttributes().
Referenced by parseClassHead(), parseFunction(), parseFunctionArguments(), and parseMaybeFunction().
void Moc::prependNamespaces | ( | BaseDef & | def, |
const QList< NamespaceDef > & | namespaceList ) const |
Definition at line 618 of file moc.cpp.
References inNamespace().
Referenced by parse().
bool Moc::skipCxxAttributes | ( | ) |
Definition at line 369 of file moc.cpp.
References until().
Referenced by parseClassHead(), parseEnum(), parseFunction(), parseMaybeFunction(), and parseType().
bool Moc::testForFunctionModifiers | ( | FunctionDef * | def | ) |
Definition at line 523 of file moc.cpp.
References FunctionDef::isStatic, and FunctionDef::isVirtual.
Referenced by parseFunction(), and parseMaybeFunction().
bool Moc::testFunctionAttribute | ( | FunctionDef * | def | ) |
Definition at line 337 of file moc.cpp.
Referenced by parseFunction(), and parseMaybeFunction().
bool Moc::testFunctionAttribute | ( | Token | tok, |
FunctionDef * | def ) |
Definition at line 346 of file moc.cpp.
References FunctionDef::isCompat, FunctionDef::isInvokable, FunctionDef::isScriptable, FunctionDef::isSignal, and FunctionDef::isSlot.
bool Moc::testFunctionRevision | ( | FunctionDef * | def | ) |
Definition at line 409 of file moc.cpp.
References parseRevision(), and FunctionDef::revision.
Referenced by parseFunction(), and parseMaybeFunction().
|
noexcept |
bool Moc::until | ( | Token | target | ) |
Definition at line 1790 of file moc.cpp.
Referenced by lexemUntil(), parse(), parseClassHead(), parseEnum(), parseFunction(), parseFunctionArguments(), parseSignals(), parseSlots(), and skipCxxAttributes().
QByteArray Moc::filename |
QList<QByteArray> Moc::includeFiles |
QByteArray Moc::includePath |
QMap<QByteArray, QByteArray> Moc::interface2IdMap |
QHash<QByteArray, QByteArray> Moc::knownGadgets |
QHash<QByteArray, QByteArray> Moc::knownQObjectClasses |
QMap<QString, QJsonArray> Moc::metaArgs |
QList<QByteArray> Moc::metaTypes |
bool Moc::mustIncludeQPluginH |
Definition at line 220 of file moc.h.
Referenced by Moc(), generate(), and parsePluginData().
bool Moc::noInclude |
Definition at line 219 of file moc.h.
Referenced by Moc(), generate(), and runMoc().
bool Moc::requireCompleteTypes |