Details
-
Task
-
Resolution: Done
-
P2: Important
-
None
-
eff73ee3197723eb1f5b35ec39bb496a40ab5343 (qt/qtdeclarative/dev)
Description
Going further with QML compiler, we need a way to figure out how to directly call property functions, without involving the meta object system.
Consider an example:
Rectangle { width: 42 }
In QML compiler, property setting would be translated into something like:
this->setProperty("width", 42);
However, in this case we rely on the meta object system to figure out the setter of the property.
Likely, the direct call is much faster, so having
this->setWidth(42); // directly call C++ method of "this" emit this->witdhChanged(); // optional?
would give better performance, practically allowing the auto-generated code to be as good as human-generated one in certain cases.
For now, looks like only setters are interesting (and signals?).