Priority: Not Evaluated
Affects Version/s: Qt Creator 4.9.2, Qt Creator 4.10.0
Fix Version/s: None
Component/s: All Other Issues
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.