Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-23057

New Qt Creator plugin has malformed json.in file

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Not Evaluated Not Evaluated
    • None
    • Qt Creator 4.9.2, Qt Creator 4.10.0
    • All Other Issues
    • None
    • Linux/X11

      When using the wizard to create a new Qt Creator Plugin a malformed json.in file is created, that makes the plugin fail to load after it's been built.

       

      In particular the problem is that the json.in file is something like this:

          "Name" : "MyPlugin3",
          "Version" : "0.0.1",
          ...

      Instead of the right format:

          \"Name\" : \"MyPlugin4\",
          \"Version\" : \"0.0.1\",
          ...

      That works fine.

      A workaround is to add a \ before each " in the json.in file and then rebuild, this should be fixed in Qt Creator though.

       

      Steps to reproduce

      • Start Qt Creator
      • New Project > Library > Qt Creator Plugin
      • Complete the wizard and create the new project
      • Build the new project

      Building will show an error like:

      "Warning: Plugin Metadata file "MyPlugin.json" does not contain a valid JSON object. Declaration will be ignored"

      After restarting Qt Creator it's possible to notice that the plugin is not loaded.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            con Eike Ziller
            vivaladav Davide Coppola
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes