Nesta página

QQmlSA::GenericPass Class

class QQmlSA::GenericPass

A classe base para as verificações de análise estática. Mais...

Cabeçalho: #include <qqmlsa.h>
CMake: find_package(Qt6 REQUIRED COMPONENTS QmlCompiler)
target_link_libraries(mytarget PRIVATE Qt6::QmlCompiler)
Herdado por:

QQmlSA::ElementPass e QQmlSA::PropertyPass

Status: Pré-visualização tecnológica

Esta classe está em pré-visualização tecnológica e está sujeita a alterações.

Funções 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)

Descrição detalhada

Esta classe contém funcionalidades comuns utilizadas por passagens mais específicas. Passagens personalizadas não devem derivar diretamente dela, mas sim de uma de suas subclasses.

Veja também ElementPass e PropertyPass.

Documentação das funções-membro

GenericPass::GenericPass(QQmlSA::PassManager *manager)

Cria um passe genérico.

[virtual noexcept] GenericPass::~GenericPass()

Destrói a instância do ` GenericPass `.

void GenericPass::emitWarning(QAnyStringView diagnostic, QQmlSA::LoggerWarningId id)

Exibe uma mensagem de aviso diagnostic sobre um problema do tipo id.

void GenericPass::emitWarning(QAnyStringView diagnostic, QQmlSA::LoggerWarningId id, QQmlSA::SourceLocation srcLocation)

Exibe a mensagem de aviso diagnostic sobre um problema do tipo id localizado em srcLocation.

void GenericPass::emitWarning(QAnyStringView diagnostic, QQmlSA::LoggerWarningId id, QQmlSA::SourceLocation srcLocation, const QQmlSA::FixSuggestion &fix)

Exibe uma mensagem de aviso diagnostic sobre um problema do tipo id localizado em srcLocation e com a correção sugerida fix.

QQmlSA::Element GenericPass::resolveAttached(QAnyStringView moduleName, QAnyStringView typeName)

Retorna o tipo associado de ` typeName ` definido no módulo ` moduleName`.

QQmlSA::Element GenericPass::resolveAttachedInFileScope(QAnyStringView typeName)

Retorna o tipo associado correspondente a um ` typeName ` utilizado no arquivo que está sendo analisado no momento.

QQmlSA::Element GenericPass::resolveBuiltinType(QAnyStringView typeName) const

Retorna o tipo do tipo embutido identificado por typeName. Os tipos embutidos abrangem tipos do C++ que o mecanismo QML pode processar sem a necessidade de importações (por exemplo, QDateTime e QString), objetos globais do E , como Number, bem como o objeto global Qt.

QString GenericPass::resolveElementToId(const QQmlSA::Element &element, const QQmlSA::Element &context)

Retorna o ID de element em um determinado context.

QQmlSA::Element GenericPass::resolveIdToElement(QAnyStringView id, const QQmlSA::Element &context)

Retorna o elemento em context que possui o id id.

QQmlSA::Element GenericPass::resolveLiteralType(const QQmlSA::Binding &binding)

Retorna o elemento que representa o tipo do literal em ` binding`. Se a ligação não contiver um valor literal, é retornado um elemento nulo.

QQmlSA::Element GenericPass::resolveType(QAnyStringView moduleName, QAnyStringView typeName)

Retorna o tipo de ` typeName ` definido no módulo ` moduleName`. Se um tipo vinculado e um tipo não vinculado tiverem o mesmo nome (por exemplo, ` ListView`), é retornado o ` Element ` correspondente ao tipo não vinculado. Para obter o tipo vinculado, use ` resolveAttached`.

QQmlSA::Element GenericPass::resolveTypeInFileScope(QAnyStringView typeName)

Retorna o tipo correspondente a ` typeName ` dentro do arquivo que está sendo analisado no momento.

QString GenericPass::sourceCode(QQmlSA::SourceLocation location)

Retorna o código-fonte localizado em 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.