In questa pagina

QQmlSA::PropertyPass Class

class QQmlSA::PropertyPass

Classe base per tutti i passaggi di analisi statica sulle proprietà. Maggiori informazioni...

Intestazione: #include <qqmlsa.h>
CMake: find_package(Qt6 REQUIRED COMPONENTS QmlCompiler)
target_link_libraries(mytarget PRIVATE Qt6::QmlCompiler)
Eredita da: QQmlSA::GenericPass
Stato: Anteprima tecnologica

Questa classe è in anteprima tecnologica ed è soggetta a modifiche.

Funzioni pubbliche

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)

Descrizione dettagliata

Documentazione delle funzioni dei membri

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

Crea un oggetto PropertyPass e utilizza ` manager ` per fare riferimento al gestore dei pass.

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

Viene eseguito ogni volta che una proprietà viene associata a un valore.

La proprietà propertyName di element è associata a value all'interno di bindingScope tramite binding.

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

Viene eseguito ogni volta che viene richiamata una proprietà o un metodo.

La proprietà o il metodo propertyName di element viene richiamato come funzione da un'istruzione all'interno di readScope definita all'indirizzo location.

Nota: attualmente sono supportate solo le chiamate dirette a metodi o proprietà; le chiamate indirette, ad esempio quelle effettuate memorizzando un metodo in una variabile JavaScript e richiamando successivamente la variabile, non vengono riconosciute.

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

Viene eseguito ogni volta che viene letta una proprietà.

La proprietà propertyName di element viene letta da un'istruzione contenuta in readScope definita all'indirizzo location.

Viene eseguita anche se la proprietà propertyName viene chiamata come funzione, poiché ciò richiede che la proprietà venga prima letta.

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

Viene eseguito ogni volta che viene modificata una proprietà.

La proprietà propertyName di element viene modificata da un'istruzione contenuta in writeScope definita all'indirizzo location. Il tipo dell'espressione modificata in propertyName è 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.