Details
-
Bug
-
Resolution: Incomplete
-
P2: Important
-
5.12.9, 5.14.2
Description
(I realise that this is a vague report, and I wish I have more to offer, but this is a very complicated bug and has thus far been quite elusive to tracking down...)
I have an application that has a component Thing.qml, looking like this (simplified a little)
Text { property int priority: 2 property bool acked color: priority >= 0 ? active ? Theme.activeColors[priority] : Theme.inactiveColors[priority] : "transparent" }
Notably absent from this component is an 'active' property. Due to design mistakes, this has been looked up implicitly from the parent context for some years now.
This seems to break - sometimes - in versions of newer Qt (working: 5.6, not working: 5.12+ has been tested thus far), with the following usage of Thing in one particular part of the application:
Thing { property bool active: otherThing.otherProperty .... }
When this breaks, 'active' inside Thing will resolve to undefined rather than a boolean value.
It's unclear to me why this would break, when several other similar uses of Thing elsewhere in the application seem to work fine.
Luckily, I have a workaround for the time being (turning it into a real property, avoiding the use of the implicit resolution), but I figure that it's worth filing this as it is a very serious problem when it goes wrong. The binding simply breaks with "correct" data as observed everywhere outside the one binding where it goes wrong.