The base class for static analysis passes. More...
| Header: | #include <GenericPass> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS QmlCompiler)target_link_libraries(mytarget PRIVATE Qt6::QmlCompiler) |
| Inherited By: | |
| Status: | Technical Preview |
| GenericPass(QQmlSA::PassManager *manager) | |
| virtual | ~GenericPass() |
| void | emitWarning(QAnyStringView diagnostic, QQmlSA::LoggerWarningId id) |
| void | emitWarning(QAnyStringView diagnostic, QQmlSA::LoggerWarningId id, QQmlSA::SourceLocation srcLocation) |
| void | emitWarning(QAnyStringView diagnostic, QQmlSA::LoggerWarningId id, QQmlSA::SourceLocation srcLocation, const QQmlSA::FixSuggestion &fix) |
| QQmlSA::Element | resolveAttached(QAnyStringView moduleName, QAnyStringView typeName) |
| QQmlSA::Element | resolveAttachedInFileScope(QAnyStringView typeName) |
| QQmlSA::Element | resolveBuiltinType(QAnyStringView typeName) const |
| QString | resolveElementToId(const QQmlSA::Element &element, const QQmlSA::Element &context) |
| QQmlSA::Element | resolveIdToElement(QAnyStringView id, const QQmlSA::Element &context) |
| QQmlSA::Element | resolveLiteralType(const QQmlSA::Binding &binding) |
| QQmlSA::Element | resolveType(QAnyStringView moduleName, QAnyStringView typeName) |
| QQmlSA::Element | resolveTypeInFileScope(QAnyStringView typeName) |
| QString | sourceCode(QQmlSA::SourceLocation location) |
This class contains common functionality used by more specific passses. Custom passes should not directly derive from it, but rather from one of its subclasses.
See also ElementPass and PropertyPass.
Creates a generic pass.
[virtual noexcept] GenericPass::~GenericPass()Destroys the GenericPass instance.
Emits a warning message diagnostic about an issue of type id.
Emits warning message diagnostic about an issue of type id located at srcLocation.
Emits a warning message diagnostic about an issue of type id located at srcLocation and with suggested fix fix.
Returns the attached type of typeName defined in module moduleName.
Returns the attached type corresponding to typeName used inside the currently analysed file.
Returns the type of the built-in type identified by typeName. Built-in types encompass C++ types which the QML engine can handle without any imports (e.g. QDateTime and QString), global EcmaScript objects like Number, as well as the global Qt
object.
Returns the id of element in a given context.
Returns the element in context that has id id.
Returns the element representing the type of literal in binding. If the binding does not contain a literal value, a null Element is returned.
Returns the type of typeName defined in module moduleName. If an attached type and a non-attached type share the same name (for example, ListView), the
Element corresponding to the non-attached type is returned. To obtain the attached type, use resolveAttached.
Returns the type corresponding to typeName inside the currently analysed file.
Returns the source code located within location.