QQmlSA::GenericPass Class
class QQmlSA::GenericPassLa clase base para los pases de análisis estáticos. Más...
| Cabecera: | #include <GenericPass> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS QmlCompiler)target_link_libraries(mytarget PRIVATE Qt6::QmlCompiler) |
| Heredado por: |
Funciones públicas
| 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) |
Descripción detallada
Esta clase contiene funciones comunes utilizadas por pases más específicos. Los pases personalizados no deben derivar directamente de ella, sino de una de sus subclases.
Véase también ElementPass y PropertyPass.
Documentación de funciones miembro
GenericPass::GenericPass(QQmlSA::PassManager *manager)
Crea un pase genérico.
[virtual noexcept] GenericPass::~GenericPass()
Destruye la instancia GenericPass.
void GenericPass::emitWarning(QAnyStringView diagnostic, QQmlSA::LoggerWarningId id)
Emite un mensaje de advertencia diagnostic sobre un problema de tipo id.
void GenericPass::emitWarning(QAnyStringView diagnostic, QQmlSA::LoggerWarningId id, QQmlSA::SourceLocation srcLocation)
Emite un mensaje de advertencia diagnostic sobre una incidencia de tipo id localizada en srcLocation.
void GenericPass::emitWarning(QAnyStringView diagnostic, QQmlSA::LoggerWarningId id, QQmlSA::SourceLocation srcLocation, const QQmlSA::FixSuggestion &fix)
Emite un mensaje de advertencia diagnostic sobre un problema de tipo id localizado en srcLocation y con la corrección sugerida fix.
QQmlSA::Element GenericPass::resolveAttached(QAnyStringView moduleName, QAnyStringView typeName)
Devuelve el tipo adjunto de typeName definido en el módulo moduleName.
QQmlSA::Element GenericPass::resolveAttachedInFileScope(QAnyStringView typeName)
Devuelve el tipo adjunto correspondiente a typeName utilizado dentro del archivo analizado actualmente.
QQmlSA::Element GenericPass::resolveBuiltinType(QAnyStringView typeName) const
Devuelve el tipo del tipo incorporado identificado por typeName. Los tipos incorporados abarcan los tipos C++ que el motor QML puede manejar sin ninguna importación (por ejemplo, QDateTime y QString), objetos EcmaScript globales como Number, así como el objeto Qt global.
QString GenericPass::resolveElementToId(const QQmlSA::Element &element, const QQmlSA::Element &context)
Devuelve el id de element en un determinado context.
QQmlSA::Element GenericPass::resolveIdToElement(QAnyStringView id, const QQmlSA::Element &context)
Devuelve el elemento en context que tiene id id.
QQmlSA::Element GenericPass::resolveLiteralType(const QQmlSA::Binding &binding)
Devuelve el elemento que representa el tipo de literal en binding. Si la vinculación no contiene un valor literal, se devuelve un elemento nulo.
QQmlSA::Element GenericPass::resolveType(QAnyStringView moduleName, QAnyStringView typeName)
Devuelve el tipo de typeName definido en el módulo moduleName. Si un tipo adjunto y un tipo no adjunto comparten el mismo nombre (por ejemplo, ListView), se devuelve el Element correspondiente al tipo no adjunto. Para obtener el tipo adjunto, utilice resolveAttached.
QQmlSA::Element GenericPass::resolveTypeInFileScope(QAnyStringView typeName)
Devuelve el tipo correspondiente a typeName dentro del archivo analizado actualmente.
QString GenericPass::sourceCode(QQmlSA::SourceLocation location)
Devuelve el código fuente ubicado dentro de location.
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.