Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.5.0
-
None
Description
While making a proof of concept example app I discovered the check for recursion on component creation is too conservative, even shortsighted and therefore limiting in what you can do with QML.
// Do not create infinite recursion in object creation static const int maxCreationDepth = 10;
The app is a QML tree builder, branches can be collapsed and expanded, naturally, this happens recursively. Having depth more than 10 results in the tree not being redrawn properly upon expansion.
The solution thankfully is rather simple, the default limit can still be left at 10 if that's what is deemed correct, but the user should be able to override that manually when needed, rather than having it hard-coded.
All it takes is to change maxCreationDepth to not be const, and a static method in the public API to change it if the current use scenario calls for it.