En esta página

QQmlSA::PropertyPass Class

class QQmlSA::PropertyPass

Clase base para todos los pases de análisis estático de propiedades. Más...

Cabecera: #include <PropertyPass>
CMake: find_package(Qt6 REQUIRED COMPONENTS QmlCompiler)
target_link_libraries(mytarget PRIVATE Qt6::QmlCompiler)
Hereda: QQmlSA::GenericPass

Funciones públicas

PropertyPass(QQmlSA::PassManager *manager)
virtual void onBinding(const QQmlSA::Element &element, const QString &propertyName, const QQmlSA::Binding &binding, const QQmlSA::Element &bindingScope, const QQmlSA::Element &value)
virtual void onCall(const QQmlSA::Element &element, const QString &propertyName, const QQmlSA::Element &readScope, QQmlSA::SourceLocation location)
virtual void onRead(const QQmlSA::Element &element, const QString &propertyName, const QQmlSA::Element &readScope, QQmlSA::SourceLocation location)
virtual void onWrite(const QQmlSA::Element &element, const QString &propertyName, const QQmlSA::Element &expressionType, const QQmlSA::Element &writeScope, QQmlSA::SourceLocation location)

Descripción detallada

Documentación de las funciones

PropertyPass::PropertyPass(QQmlSA::PassManager *manager)

Crea un objeto PropertyPass y utiliza manager para referirse al gestor de pases.

[virtual] void PropertyPass::onBinding(const QQmlSA::Element &element, const QString &propertyName, const QQmlSA::Binding &binding, const QQmlSA::Element &bindingScope, const QQmlSA::Element &value)

Se ejecuta cada vez que una propiedad se vincula a un valor.

La propiedad propertyName de element se vincula a value dentro de bindingScope con binding.

[virtual] void PropertyPass::onCall(const QQmlSA::Element &element, const QString &propertyName, const QQmlSA::Element &readScope, QQmlSA::SourceLocation location)

Se ejecuta cada vez que se llama a una propiedad o método.

La propiedad o método propertyName de element es llamada como una función por una instrucción dentro de readScope definida en location.

Nota: Actualmente sólo se admiten llamadas directas a métodos o propiedades, no se reconocen las llamadas indirectas, por ejemplo almacenando un método en una variable JavaScript y llamando después a la variable.

[virtual] void PropertyPass::onRead(const QQmlSA::Element &element, const QString &propertyName, const QQmlSA::Element &readScope, QQmlSA::SourceLocation location)

Se ejecuta cada vez que se lee una propiedad.

La propiedad propertyName de element es leída por una instrucción dentro de readScope definida en location.

Esto también se ejecuta si la propiedad propertyName es llamada como una función ya que eso requiere que la propiedad sea leída primero.

[virtual] void PropertyPass::onWrite(const QQmlSA::Element &element, const QString &propertyName, const QQmlSA::Element &expressionType, const QQmlSA::Element &writeScope, QQmlSA::SourceLocation location)

Se ejecuta cada vez que se escribe en una propiedad.

La propiedad propertyName de element se escribe mediante una instrucción dentro de writeScope definida en location. El tipo de la expresión escrita en propertyName es expressionType.

© 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.