![]() |
Qt 6.x
The Qt SDK
|
#include <moc.h>
Inheritance diagram for Moc:
Collaboration diagram for Moc: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 |
| bool | displayWarnings |
| bool | displayNotes |
| 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 |
Definition at line 622 of file moc.cpp.
References BaseDef::classInfoList, ClassDef::constructorList, BaseDef::enumList, error, ClassDef::methodList, ClassDef::nonClassSignalList, ClassDef::propertyList, ClassDef::publicList, Q_UNLIKELY, ClassDef::signalList, QList< T >::size(), ClassDef::slotList, and ClassDef::superclassList.
Referenced by parse().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 1919 of file moc.cpp.
References QList< T >::at(), QByteArray::chop(), BaseDef::classname, QByteArray::constData(), QByteArray::endsWith(), QDuplicateTracker< T, Prealloc >::hasSeen(), QListSpecialMethodsBase< T >::indexOf(), j, QByteArray::left(), QByteArray::mid(), ClassDef::nonClassSignalList, PropertyDef::PointerSpec, ClassDef::propertyList, ClassDef::publicList, PropertyDef::ReferenceSpec, QList< T >::removeIf(), ClassDef::signalList, QList< T >::size(), Parser::symbolAt(), PropertyDef::ValueSpec, and Parser::warning().
Referenced by parse().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 1861 of file moc.cpp.
References QList< T >::at(), QList< T >::cbegin(), QList< T >::cend(), BaseDef::classname, QByteArray::constData(), QMap< Key, T >::contains(), QHash< Key, T >::contains(), interface2IdMap, ClassDef::interfaceList, QList< T >::isEmpty(), it, knownQObjectClasses, Q_ASSERT, ClassDef::superclassList, QList< T >::value(), and Parser::warning().
Referenced by parse().
Here is the call graph for this function:
Here is the caller graph for this function:| void Moc::createPropertyDef | ( | PropertyDef & | def, |
| int | propertyIndex, | ||
| Moc::PropertyMode | mode | ||
| ) |
Definition at line 1313 of file moc.cpp.
References PropertyDef::designable, error, Parser::index, Parser::lexem(), PropertyDef::location, Type::name, PropertyDef::name, Named, Parser::next(), normalizeType(), parsePropertyAttributes(), parseType(), PropertyDef::relativeIndex, PropertyDef::scriptable, PropertyDef::stored, PropertyDef::type, and PropertyDef::user.
Referenced by parsePrivateProperty(), and parseProperty().
Here is the call graph for this function:
Here is the caller graph for this function:| void Moc::generate | ( | FILE * | out, |
| FILE * | jsonOutput | ||
| ) |
Definition at line 1129 of file moc.cpp.
References QJsonArray::append(), ch, classList, BaseDef::classname, QByteArray::constData(), QByteArrayView::constData(), QList< T >::constFirst(), QByteArrayView::crbegin(), QByteArrayView::crend(), QByteArray::endsWith(), error, filename, generator, includeFiles, includePath, QJsonArray::isEmpty(), knownGadgets, knownQObjectClasses, QByteArrayView::last(), metaTypes, mocOutputRevision, mustIncludeQPluginH, noInclude, out, QByteArray::prepend(), Q_UNLIKELY, requireCompleteTypes, requiredQtContainers(), QByteArray::size(), QList< T >::size(), and QJsonDocument::toJson().
Here is the call graph for this function:
|
inline |
Definition at line 230 of file moc.h.
References BaseDef::begin, and BaseDef::end.
Referenced by parse(), parseSignals(), and parseSlots().
Here is the caller graph for this function:
|
inline |
Definition at line 234 of file moc.h.
References BaseDef::begin, and BaseDef::end.
Referenced by parse(), and prependNamespaces().
Here is the caller graph for this function:| QByteArray Moc::lexemUntil | ( | Token | target | ) |
Definition at line 1761 of file moc.cpp.
References QList< T >::at(), Parser::index, is_ident_char(), QCss::Symbol::lexem(), Parser::next(), Parser::prev(), Parser::symbols, and until().
Referenced by parse(), parseDeclareMetatype(), parseFunctionArguments(), parseMocInclude(), parsePropertyAttributes(), parseRevision(), and parseType().
Here is the call graph for this function:
Here is the caller graph for this function:| void Moc::parse | ( | ) |
Definition at line 658 of file moc.cpp.
References FunctionDef::access, Anonymous, QList< T >::begin(), BaseDef::begin, checkListSizes(), checkProperties(), checkSuperClasses(), BaseDef::classInfoList, classList, BaseDef::classname, ClassDef::constructorList, Parser::currentFilenames, NamespaceDef::doGenerate, QList< T >::end(), BaseDef::end, BaseDef::enumDeclarations, BaseDef::enumList, error, BaseDef::flagAliases, handleDefaultArguments(), Parser::hasNext(), ClassDef::hasQGadget, ClassDef::hasQNamespace, NamespaceDef::hasQNamespace, ClassDef::hasQObject, ClassDef::PluginData::iid, inClass(), Parser::index, inNamespace(), QHash< Key, T >::insert(), QSet< T >::insert(), FunctionDef::isConstructor, FunctionDef::isDestructor, QMap< Key, T >::isEmpty(), QByteArray::isEmpty(), QList< T >::isEmpty(), FunctionDef::isInvokable, FunctionDef::isSignal, FunctionDef::isSlot, it, knownGadgets, knownQObjectClasses, Parser::lexem(), lexemUntil(), Parser::lookup(), ClassDef::PluginData::metaArgs, metaArgs, ClassDef::methodList, Named, Parser::next(), parseClassHead(), parseClassInfo(), parseDeclareInterface(), parseDeclareMetatype(), parseEnum(), parseEnumOrFlag(), parseFlag(), parseInterfaces(), parseMaybeFunction(), parseMocInclude(), parsePluginData(), parsePrivateProperty(), parseProperty(), parseSignals(), parseSlotInPrivate(), parseSlots(), ClassDef::pluginData, prependNamespaces(), FunctionDef::Private, ClassDef::propertyList, FunctionDef::Protected, FunctionDef::Public, ClassDef::publicList, Q_ASSERT, Q_FALLTHROUGH, Q_META_TOKEN_BEGIN, Q_META_TOKEN_END, BaseDef::qualified, FunctionDef::revision, ClassDef::revisionedMethods, SCOPE, ClassDef::signalList, QSet< T >::size(), ClassDef::slotList, ClassDef::superclassList, Parser::symbol(), Parser::test(), Parser::unquotedLexem(), and until().
Here is the call graph for this function:| bool Moc::parseClassHead | ( | ClassDef * | def | ) |
Definition at line 29 of file moc.cpp.
References BaseDef::begin, BaseDef::classname, QList< T >::constFirst(), QHash< Key, T >::contains(), BaseDef::end, i, Parser::index, QHash< Key, T >::insert(), QList< T >::isEmpty(), knownGadgets, Parser::lexem(), Parser::lookup(), Type::name, parseType(), FunctionDef::Private, FunctionDef::Protected, FunctionDef::Public, qMakePair(), BaseDef::qualified, SCOPE, skipCxxAttributes(), ClassDef::superclassList, Parser::test(), Parser::token(), and until().
Referenced by parse().
Here is the call graph for this function:
Here is the caller graph for this function:| Moc::EncounteredQmlMacro Moc::parseClassInfo | ( | BaseDef * | def | ) |
Definition at line 1632 of file moc.cpp.
References BaseDef::classInfoList, ClassInfoDef::name, Parser::next(), No, QByteArray::number(), parseRevision(), QByteArray::startsWith(), Parser::symbol(), Parser::test(), Symbol::unquotedLexem(), ClassInfoDef::value, and Yes.
Referenced by parse(), and parseClassInfo().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 1659 of file moc.cpp.
References parseClassInfo(), ClassDef::requireCompleteMethodTypes, and Yes.
Here is the call graph for this function:| void Moc::parseDeclareInterface | ( | ) |
Definition at line 1698 of file moc.cpp.
References QMap< Key, T >::insert(), interface, interface2IdMap, Parser::lexem(), Parser::next(), SCOPE, and Parser::test().
Referenced by parse().
Here is the call graph for this function:
Here is the caller graph for this function:| void Moc::parseDeclareMetatype | ( | ) |
Definition at line 1721 of file moc.cpp.
References QList< T >::append(), lexemUntil(), metaTypes, Parser::next(), and typeName.
Referenced by parse().
Here is the call graph for this function:
Here is the caller graph for this function:| bool Moc::parseEnum | ( | EnumDef * | def | ) |
Definition at line 230 of file moc.cpp.
References Parser::currentFilenames, IncludeBegin, IncludeEnd, EnumDef::isEnumClass, Parser::lexem(), Parser::lookup(), EnumDef::name, Parser::next(), NoInclude, normalizeType(), parseType(), skipCxxAttributes(), Parser::symbol(), Parser::test(), EnumDef::type, Symbol::unquotedLexem(), until(), and EnumDef::values.
Referenced by parse().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 1593 of file moc.cpp.
References BaseDef::enumDeclarations, Parser::lexem(), Parser::next(), SCOPE, and Parser::test().
Referenced by parse().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 1608 of file moc.cpp.
References BaseDef::flagAliases, QMap< Key, T >::insert(), Parser::lexem(), Parser::next(), SCOPE, and Parser::test().
Referenced by parse().
Here is the call graph for this function:
Here is the caller graph for this function:| bool Moc::parseFunction | ( | FunctionDef * | def, |
| bool | inMacro = false |
||
| ) |
Definition at line 410 of file moc.cpp.
References QByteArray::constData(), QListSpecialMethodsBase< T >::contains(), error, Type::firstToken, FunctionDef::inlineCode, FunctionDef::isAbstract, FunctionDef::isConst, QByteArray::isEmpty(), Type::isScoped, FunctionDef::isStatic, FunctionDef::isVirtual, Parser::lookup(), Type::name, FunctionDef::name, Parser::next(), FunctionDef::normalizedType, normalizeType(), parseFunctionArguments(), parseType(), Parser::prev(), Type::rawName, Type::referenceType, skipCxxAttributes(), QByteArray::split(), FunctionDef::tag, Parser::test(), testForFunctionModifiers(), testFunctionAttribute(), testFunctionRevision(), FunctionDef::type, until(), and Parser::warning().
Referenced by parseSignals(), parseSlotInPrivate(), and parseSlots().
Here is the call graph for this function:
Here is the caller graph for this function:| void Moc::parseFunctionArguments | ( | FunctionDef * | def | ) |
Definition at line 285 of file moc.cpp.
References arg, FunctionDef::arguments, QList< T >::constLast(), error, Parser::hasNext(), QList< T >::isEmpty(), FunctionDef::isPrivateSignal, FunctionDef::isRawSlot, Parser::lexem(), lexemUntil(), ArgumentDef::normalizedType, normalizeType(), parseType(), Q_UNLIKELY, Q_UNUSED, QList< T >::removeLast(), QList< T >::size(), Parser::test(), and until().
Referenced by parseFunction(), and parseMaybeFunction().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 1665 of file moc.cpp.
References error, i, interface2IdMap, ClassDef::interfaceList, QByteArray::isEmpty(), Parser::lexem(), Parser::next(), SCOPE, Parser::test(), and QMap< Key, T >::value().
Referenced by parse().
Here is the call graph for this function:
Here is the caller graph for this function:| bool Moc::parseMaybeFunction | ( | const ClassDef * | cdef, |
| FunctionDef * | def | ||
| ) |
Definition at line 526 of file moc.cpp.
References BaseDef::classname, QByteArray::constData(), Type::firstToken, FunctionDef::isConst, FunctionDef::isConstructor, FunctionDef::isDestructor, QByteArray::isEmpty(), FunctionDef::isInvokable, Type::isScoped, FunctionDef::isSignal, FunctionDef::isSlot, FunctionDef::isStatic, FunctionDef::isVirtual, Parser::lookup(), Type::name, FunctionDef::name, FunctionDef::normalizedType, normalizeType(), parseFunctionArguments(), parseType(), Type::rawName, Type::referenceType, skipCxxAttributes(), FunctionDef::tag, Parser::test(), testForFunctionModifiers(), testFunctionAttribute(), testFunctionRevision(), FunctionDef::type, and Parser::warning().
Referenced by parse().
Here is the call graph for this function:
Here is the caller graph for this function:| void Moc::parseMocInclude | ( | ) |
Definition at line 1730 of file moc.cpp.
References QList< T >::append(), QByteArray::chop(), includeFiles, lexemUntil(), Parser::next(), and QByteArray::remove().
Referenced by parse().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 1498 of file moc.cpp.
References QList< T >::append(), QFileInfo::canonicalFilePath(), QByteArray::constData(), Parser::currentFilenames, QFileInfo::dir(), error, QIODevice::errorString(), QFileInfo::exists(), fi, file, QJsonDocument::fromJson(), QString::fromLocal8Bit(), ClassDef::PluginData::iid, Parser::includes, QFileInfo::isDir(), QByteArray::isEmpty(), QJsonDocument::isObject(), Parser::lexem(), ClassDef::PluginData::metaData, mustIncludeQPluginH, Parser::next(), QFile::open(), parsedPluginMetadataFiles, ClassDef::pluginData, QIODevice::readAll(), QIODeviceBase::ReadOnly, QFileInfo::setFile(), Parser::test(), QString::toUtf8(), Parser::unquotedLexem(), ClassDef::PluginData::uri, and Parser::warning().
Referenced by parse().
Here is the call graph for this function:
Here is the caller graph for this function:| void Moc::parsePrivateProperty | ( | ClassDef * | def, |
| Moc::PropertyMode | mode | ||
| ) |
Definition at line 1580 of file moc.cpp.
References createPropertyDef(), PropertyDef::inPrivateClass, Parser::next(), parsePropertyAccessor(), ClassDef::propertyList, and QList< T >::size().
Referenced by parse().
Here is the call graph for this function:
Here is the caller graph for this function:| void Moc::parseProperty | ( | ClassDef * | def, |
| Moc::PropertyMode | mode | ||
| ) |
Definition at line 1488 of file moc.cpp.
References createPropertyDef(), Parser::next(), ClassDef::propertyList, and QList< T >::size().
Referenced by parse().
Here is the call graph for this function:
Here is the caller graph for this function:| QByteArray Moc::parsePropertyAccessor | ( | ) |
Definition at line 1562 of file moc.cpp.
References Parser::lexem(), Parser::next(), and Parser::peek().
Referenced by parsePrivateProperty().
Here is the call graph for this function:
Here is the caller graph for this function:| void Moc::parsePropertyAttributes | ( | PropertyDef & | propDef | ) |
Definition at line 1351 of file moc.cpp.
References PropertyDef::bind, PropertyDef::constant, QByteArray::constData(), PropertyDef::designable, QByteArray::endsWith(), error, PropertyDef::final, QTypeRevision::fromMinorVersion(), QByteArray::isNull(), QTypeRevision::isValidSegment(), Parser::lexem(), Symbol::lexem(), lexemUntil(), PropertyDef::member, PropertyDef::name, Parser::next(), PropertyDef::notify, ok, parseRevision(), Parser::prev(), PropertyDef::read, PropertyDef::required, PropertyDef::reset, PropertyDef::revision, PropertyDef::scriptable, PropertyDef::stored, Parser::symbol(), Parser::test(), QTypeRevision::toEncodedVersion(), PropertyDef::user, Parser::warning(), and PropertyDef::write.
Referenced by createPropertyDef().
Here is the call graph for this function:
Here is the caller graph for this function:| QTypeRevision Moc::parseRevision | ( | ) |
Definition at line 367 of file moc.cpp.
References QByteArray::chop(), error, QTypeRevision::fromMinorVersion(), QTypeRevision::fromVersion(), QTypeRevision::isValidSegment(), lexemUntil(), Parser::next(), ok, QByteArray::remove(), QList< T >::size(), QByteArray::split(), and QByteArray::toInt().
Referenced by parseClassInfo(), parsePropertyAttributes(), parseSignals(), parseSlots(), and testFunctionRevision().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 1269 of file moc.cpp.
References FunctionDef::access, error, handleDefaultArguments(), Parser::hasNext(), inClass(), FunctionDef::inlineCode, QTypeRevision::isValid(), FunctionDef::isVirtual, Parser::next(), parseFunction(), parseRevision(), Parser::prev(), FunctionDef::Public, FunctionDef::revision, ClassDef::revisionedMethods, ClassDef::signalList, Parser::test(), QTypeRevision::toEncodedVersion(), until(), and Parser::warning().
Referenced by parse().
Here is the call graph for this function:
Here is the caller graph for this function:| void Moc::parseSlotInPrivate | ( | ClassDef * | def, |
| FunctionDef::Access | access | ||
| ) |
Definition at line 1740 of file moc.cpp.
References FunctionDef::access, handleDefaultArguments(), FunctionDef::inPrivateClass, Parser::lexem(), Parser::next(), parseFunction(), FunctionDef::revision, ClassDef::revisionedMethods, ClassDef::slotList, and Parser::test().
Referenced by parse().
Here is the call graph for this function:
Here is the caller graph for this function:| void Moc::parseSlots | ( | ClassDef * | def, |
| FunctionDef::Access | access | ||
| ) |
Definition at line 1227 of file moc.cpp.
References FunctionDef::access, error, handleDefaultArguments(), Parser::hasNext(), inClass(), QTypeRevision::isValid(), Parser::next(), parseFunction(), parseRevision(), Parser::prev(), FunctionDef::revision, ClassDef::revisionedMethods, ClassDef::slotList, Parser::test(), QTypeRevision::toEncodedVersion(), and until().
Referenced by parse().
Here is the call graph for this function:
Here is the caller graph for this function:| Type Moc::parseType | ( | ) |
Definition at line 115 of file moc.cpp.
References Parser::lexem(), lexemUntil(), Parser::lookup(), Parser::next(), Parser::prev(), Q_FALLTHROUGH, SCOPE, skipCxxAttributes(), and Parser::test().
Referenced by createPropertyDef(), parseClassHead(), parseEnum(), parseFunction(), parseFunctionArguments(), and parseMaybeFunction().
Here is the call graph for this function:
Here is the caller graph for this function:| void Moc::prependNamespaces | ( | BaseDef & | def, |
| const QList< NamespaceDef > & | namespaceList | ||
| ) | const |
Definition at line 612 of file moc.cpp.
References QList< T >::crbegin(), QList< T >::crend(), inNamespace(), it, QByteArray::prepend(), and BaseDef::qualified.
Referenced by parse().
Here is the call graph for this function:
Here is the caller graph for this function:| bool Moc::skipCxxAttributes | ( | ) |
Definition at line 358 of file moc.cpp.
References Parser::index, Parser::test(), and until().
Referenced by parseClassHead(), parseEnum(), parseFunction(), parseMaybeFunction(), and parseType().
Here is the call graph for this function:
Here is the caller graph for this function:| bool Moc::testForFunctionModifiers | ( | FunctionDef * | def | ) |
Definition at line 518 of file moc.cpp.
References FunctionDef::isStatic, FunctionDef::isVirtual, and Parser::test().
Referenced by parseFunction(), and parseMaybeFunction().
Here is the call graph for this function:
Here is the caller graph for this function:| bool Moc::testFunctionAttribute | ( | FunctionDef * | def | ) |
Definition at line 326 of file moc.cpp.
References QList< T >::at(), Parser::index, QList< T >::size(), Parser::symbols, testFunctionAttribute(), and QCss::Symbol::token.
Referenced by parseFunction(), parseMaybeFunction(), and testFunctionAttribute().
Here is the call graph for this function:
Here is the caller graph for this function:| bool Moc::testFunctionAttribute | ( | Token | tok, |
| FunctionDef * | def | ||
| ) |
Definition at line 335 of file moc.cpp.
References FunctionDef::isCompat, FunctionDef::isInvokable, FunctionDef::isScriptable, FunctionDef::isSignal, and FunctionDef::isSlot.
| bool Moc::testFunctionRevision | ( | FunctionDef * | def | ) |
Definition at line 398 of file moc.cpp.
References parseRevision(), FunctionDef::revision, Parser::test(), and QTypeRevision::toEncodedVersion().
Referenced by parseFunction(), and parseMaybeFunction().
Here is the call graph for this function:
Here is the caller graph for this function:| bool Moc::until | ( | Token | target | ) |
Definition at line 1781 of file moc.cpp.
References QList< T >::at(), Parser::index, QList< T >::size(), Parser::symbols, and QCss::Symbol::token.
Referenced by lexemUntil(), parse(), parseClassHead(), parseEnum(), parseFunction(), parseFunctionArguments(), parseSignals(), parseSlots(), and skipCxxAttributes().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 217 of file moc.h.
Referenced by generate(), and parse().
| QByteArray Moc::filename |
Definition at line 210 of file moc.h.
Referenced by generate().
| QList<QByteArray> Moc::includeFiles |
Definition at line 216 of file moc.h.
Referenced by generate(), and parseMocInclude().
| QByteArray Moc::includePath |
Definition at line 215 of file moc.h.
Referenced by generate().
| QMap<QByteArray, QByteArray> Moc::interface2IdMap |
Definition at line 218 of file moc.h.
Referenced by checkSuperClasses(), parseDeclareInterface(), and parseInterfaces().
| QHash<QByteArray, QByteArray> Moc::knownGadgets |
Definition at line 222 of file moc.h.
Referenced by generate(), parse(), and parseClassHead().
| QHash<QByteArray, QByteArray> Moc::knownQObjectClasses |
Definition at line 221 of file moc.h.
Referenced by checkSuperClasses(), generate(), and parse().
| QMap<QString, QJsonArray> Moc::metaArgs |
| QList<QByteArray> Moc::metaTypes |
Definition at line 219 of file moc.h.
Referenced by generate(), and parseDeclareMetatype().
| bool Moc::mustIncludeQPluginH |
Definition at line 213 of file moc.h.
Referenced by generate(), and parsePluginData().
| bool Moc::noInclude |
Definition at line 212 of file moc.h.
Referenced by generate().
Definition at line 224 of file moc.h.
Referenced by parsePluginData().
| bool Moc::requireCompleteTypes |
Definition at line 214 of file moc.h.
Referenced by generate().