forked from qt-creator/qt-creator
829faf7eef
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>
40 lines
1.0 KiB
JSON
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
|
|
}
|
|
}
|
|
]
|
|
}
|