Priority: Not Evaluated
Affects Version/s: None
Fix Version/s: None
Component/s: Language Syntax & Semantics
it has been previously suggested to add an if-else construct to the qbs language. however, we rejected it in the presented form for good reasons. see http://lists.qt-project.org/pipermail/qbs/2012-February/000049.html
but chains of mutually exclusive blocks are relatively common, with two visible consequences:
- the Properties items are implicitly chained. of course, such magic behavior is entirely unexpected, and therefore a rather bad idea, as proven by confused users. see for example http://lists.qt-project.org/pipermail/qbs/2013-December/000588.html
- for other items, chaining must be manually implemented (FIXME: i can't find the official guideline, but i remember that there were related mailing list posts)
a cleaner approach would be making the cascading explicit like this:
this is a well-defined structure with no hidden meanings (except for the order of the Case items, which seems natural), so it should be easy to implement and be well toolable.
note that the suggested semantics for the nested properties are additive by default like for the Properties item. that would make it unnecessary to use Group just to have a conditional list of files.