Sur cette page

QQmlSA::PropertyPass Class

class QQmlSA::PropertyPass

Classe de base pour toutes les analyses statiques portant sur les propriétés. Plus d'informations...

En-tête : #include <PropertyPass>
CMake : find_package(Qt6 REQUIRED COMPONENTS QmlCompiler)
target_link_libraries(mytarget PRIVATE Qt6::QmlCompiler)
Héritages : QQmlSA::GenericPass

Fonctions publiques

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)

Description détaillée

Documentation des fonctions membres

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

Crée un objet PropertyPass et utilise manager pour faire référence au gestionnaire de laissez-passer.

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

S'exécute chaque fois qu'une propriété est liée à une valeur.

La propriété propertyName de element est liée à value dans bindingScope avec binding.

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

S'exécute chaque fois qu'une propriété ou une méthode est appelée.

La propriété ou la méthode propertyName de element est appelée en tant que fonction par une instruction de readScope définie à location.

Remarque : actuellement, seuls les appels directs de méthodes ou de propriétés sont pris en charge ; les appels indirects, par exemple en stockant une méthode dans une variable JavaScript et en appelant ensuite la variable, ne sont pas reconnus.

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

S'exécute à chaque fois qu'une propriété est lue.

La propriété propertyName de element est lue par une instruction de readScope définie à location.

Cette instruction est également exécutée si la propriété propertyName est appelée en tant que fonction, car cela nécessite que la propriété soit d'abord lue.

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

S'exécute chaque fois qu'une propriété est écrite.

La propriété propertyName de element est écrite par une instruction dans writeScope définie à location. Le type de l'expression écrite dans propertyName est 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.