Files
qt-creator/share/qtcreator/templates/wizards/files/qrc/wizard.json
T
Christian Kandeler 829faf7eef File wizards: Optionally show the default suffix
In wizards that create a single new file, there's almost always a
default suffix that gets appended if the user provides only the base
name. However, there's currently no visual indication on the page that
such a suffix will be appended. Therefore, we add an optional field to
the FileWizardPage that displays the default suffix if the wizard
provides one.

Change-Id: Ia1c8966e7de14b484d065dbd4a41aa74f484f085
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-03-10 09:53:53 +00:00

40 lines
1.0 KiB
JSON

{
"version": 1,
"supportedProjectTypes": [ ],
"id": "F.Resource",
"category": "R.Qt",
"trDescription": "Creates a Qt Resource file (.qrc).",
"trDisplayName": "Qt Resource File",
"trDisplayCategory": "Qt",
"iconText": "qrc",
"enabled": "%{JS: value('Plugins').indexOf('ResourceEditor') >= 0}",
"options": { "key": "DefaultSuffix", "value": "%{JS: Util.preferredSuffix('application/vnd.qt.xml.resource')}" },
"pages" :
[
{
"trDisplayName": "Location",
"trShortTitle": "Location",
"typeId": "File"
},
{
"trDisplayName": "Project Management",
"trShortTitle": "Summary",
"typeId": "Summary"
}
],
"generators" :
[
{
"typeId": "File",
"data":
{
"source": "file.qrc",
"target": "%{JS: Util.fileName(value('TargetPath'), value('DefaultSuffix'))}",
"openInEditor": true
}
}
]
}