33 Q_DECLARE_TR_FUNCTIONS(QQmlJSTypeDescriptionReader)
35 explicit QQmlJSTypeDescriptionReader(QString fileName, QString data)
36 : m_fileName(std::move(fileName)), m_source(std::move(data)) {}
38 Q_DISABLE_COPY_MOVE(QQmlJSTypeDescriptionReader)
40 bool operator()(QList<QQmlJSExportedScope> *objects, QStringList *dependencies);
46 void readDocument(QQmlJS::AST::UiProgram *ast);
47 void readModule(QQmlJS::AST::UiObjectDefinition *ast);
48 void readDependencies(QQmlJS::AST::UiScriptBinding *ast);
49 void readComponent(QQmlJS::AST::UiObjectDefinition *ast);
50 void readSignalOrMethod(QQmlJS::AST::UiObjectDefinition *ast,
bool isMethod,
51 const QQmlJSScope::Ptr &scope);
52 void readProperty(QQmlJS::AST::UiObjectDefinition *ast,
const QQmlJSScope::Ptr &scope);
53 void readEnum(QQmlJS::AST::UiObjectDefinition *ast,
const QQmlJSScope::Ptr &scope);
54 void readParameter(QQmlJS::AST::UiObjectDefinition *ast,
QQmlJSMetaMethod *metaMethod);
56 QString readStringBinding(QQmlJS::AST::UiScriptBinding *ast);
57 bool readBoolBinding(QQmlJS::AST::UiScriptBinding *ast);
58 double readNumericBinding(QQmlJS::AST::UiScriptBinding *ast);
59 QTypeRevision readNumericVersionBinding(QQmlJS::AST::UiScriptBinding *ast);
60 int readIntBinding(QQmlJS::AST::UiScriptBinding *ast);
61 QList<QQmlJSScope::Export> readExports(QQmlJS::AST::UiScriptBinding *ast);
62 void readAliases(QQmlJS::AST::UiScriptBinding *ast,
const QQmlJSScope::Ptr &scope);
63 void readInterfaces(QQmlJS::AST::UiScriptBinding *ast,
const QQmlJSScope::Ptr &scope);
64 void checkMetaObjectRevisions(
65 QQmlJS::AST::UiScriptBinding *ast, QList<QQmlJSScope::Export> *exports);
67 QStringList readStringList(QQmlJS::AST::UiScriptBinding *ast);
68 void readDeferredNames(QQmlJS::AST::UiScriptBinding *ast,
const QQmlJSScope::Ptr &scope);
69 void readImmediateNames(QQmlJS::AST::UiScriptBinding *ast,
const QQmlJSScope::Ptr &scope);
70 void readEnumValues(QQmlJS::AST::UiScriptBinding *ast,
QQmlJSMetaEnum *metaEnum);
72 void addError(
const QQmlJS::SourceLocation &loc,
const QString &message);
73 void addWarning(
const QQmlJS::SourceLocation &loc,
const QString &message);
75 QQmlJS::AST::ArrayPattern *getArray(QQmlJS::AST::UiScriptBinding *ast);
79 QString m_errorMessage;
80 QString m_warningMessage;
81 QList<QQmlJSExportedScope> *m_objects =
nullptr;
82 QStringList *m_dependencies =
nullptr;
83 int m_currentCtorIndex = 0;
84 int m_currentMethodIndex = 0;