Details
-
Bug
-
Resolution: Fixed
-
P3: Somewhat important
-
Qt for MCUs 2.5.1, Qt for MCUs 2.8
-
None
Description
My guess is this is an issue in qml2cpp.
I happened to find this while doing a research on how StaticText works.
I attached the little project I'm working on for you to check the behavior on your side.
In the generated "outcome/05_04+use_StaticText/gen/TranslationMetaDataManyTexts_Experiment.cpp," there are lines like this:
Here, it's basically setting the StaticTextItem instances to each of StaticText instances, using StaticText::setStaticTextItem() method.
After that, there's a line below calling StaticText::update() for each StaticText::setStaticTextItem().
The issue is, StaticText::setStaticTextItem() method calls StaticText::update() everytime it's called.
<statictext.cpp>
So the StaticText::update() gets called twice. I think we can omit the one in the auto-generated code by qml2cpp.