[Qt-creator] JSON Wizard broken?

Christian Gagneraud chgans at gmail.com
Tue May 7 02:25:01 CEST 2019

On Mon, 6 May 2019 at 22:57, Christian Gagneraud <chgans at gmail.com> wrote:
> On Mon, 6 May 2019 at 19:32, Eike Ziller <Eike.Ziller at qt.io> wrote:
> > > On 4. May 2019, at 06:40, Christian Gagneraud <chgans at gmail.com> wrote:
> > > Some json wizard rely on this to deduce top level project vs subproject.
> > > eg.
> > > IsTopLevelProject: "%{JS: !'%{Exists:ProjectExplorer.Profile.Ids}'"
> > >
> > > And then, this deducing is actually broken (even w/o the above bug).
> > > Since ProjectExplorer.Profile.Ids would be set only from the context
> > > menu, and from the context menu on a project node you cannot create a
> > > top level project, only subprojects.
> >
> > Without the above bug, that would work. IsTopLevelProject would correctly be false when the wizard was triggered from the context menu, and true otherwise.
> "would work", "would correctly be false", the reality is that "would"
> doesn't happen for a lot of reasons.
> The main issue is Qt'c JSON Wizard's "bool from variant" and QtC's
> macro expansion system doesn't mix well with javascript concept of
> true or false.
> Using the debugger i saw things such as a string like "true || (some
> more unexpanded/unevaluated stuff related to qtc plugins)" being
> evaluating as Wizard's True b/c the it is not an empty string or not
> equal to the string "false".
> I even saw strings like "JS Error: blah, blah, blah" being evaluated
> as true b/c it's not empty/null/"false"...


It's a one character change, yet it was not easy to find which json
file it was. :(


More information about the Qt-creator mailing list