-
Task
-
Resolution: Done
-
P3: Somewhat important
-
5.15.6, 6.2.0
-
-
7136df0f8ed2b691f5291712fdeaf401072b32fd (qt/qtdeclarative/dev) c2f6ef8504f7444bf1c47016088bc0997c362a9d (qt/qtdeclarative/6.2) f9f69fe0ac (qt/tqtc-qtdeclarative/5.15)
LoggingCategory issues a warning about attempted write on its properties even when it is unnecessary, i.e. when new value is equal to the old one.
It can be triggered with QQmlEngine::retranslate() call on 5.15 and early 6.x branches. Since the recent optimizations to retranslate() which now only forces to re-evaluate what's really dependent on qsTr, it became harder, but I still managed to pull it off. Sample code attached.
I have a use case for "expressions as name of logging category", so it's bugging me out, now that I've introduced i18n support to my app.
Patch is ready, and on its way to Gerrit.
For Gerrit Dashboard: QTBUG-97717 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
378059,6 | QQmlLoggingCategory: Avoid unnecessary warnings from setters | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
379563,2 | QQmlLoggingCategory: Avoid unnecessary warnings from setters | 6.2 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
379565,3 | QQmlLoggingCategory: Avoid unnecessary warnings from setters | tqtc/lts-5.15 | qt/tqtc-qtdeclarative | Status: MERGED | -1 | 0 |