forked from qt-creator/qt-creator
QmlDesigner: Enforce rules for QML component names
Since a QML component is generated from the effect,
the same rules for names should apply.
(cherry picked from commit 318a2aff2f
)
Task-number: QDS-8152
Change-Id: I607c2771401fec2259b1e1aac9a37707aa1328b7
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
committed by
Tim Jenssen
parent
9269fb2d95
commit
c299d95ea7
@@ -12,18 +12,43 @@
|
|||||||
"featuresRequired": [ "QmlDesigner.Wizards.Enterprise" ],
|
"featuresRequired": [ "QmlDesigner.Wizards.Enterprise" ],
|
||||||
|
|
||||||
"options": [
|
"options": [
|
||||||
{ "key": "DefaultSuffix", "value": "qep" },
|
{ "key": "EffectFile", "value": "%{Class}.qep" },
|
||||||
{ "key": "DoNotOpenFile", "value": "true" }
|
{ "key": "DoNotOpenFile", "value": "true" }
|
||||||
],
|
],
|
||||||
|
|
||||||
"pages" :
|
"pages" :
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"trDisplayName": "Location",
|
"trDisplayName": "Define Class",
|
||||||
"trShortTitle": "Location",
|
"trShortTitle": "Details",
|
||||||
"typeId": "File"
|
"typeId": "Fields",
|
||||||
|
"data" :
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"name": "Class",
|
||||||
|
"trDisplayName": "Effect name:",
|
||||||
|
"mandatory": true,
|
||||||
|
"type": "LineEdit",
|
||||||
|
"data": {
|
||||||
|
"validator": "(?:[A-Z_][a-zA-Z_0-9]*|)",
|
||||||
|
"fixup": "%{JS: '%{INPUT}'.charAt(0).toUpperCase() + '%{INPUT}'.slice(1) }"
|
||||||
}
|
}
|
||||||
],
|
},
|
||||||
|
{
|
||||||
|
"name": "TargetPath",
|
||||||
|
"type": "PathChooser",
|
||||||
|
"trDisplayName": "Path:",
|
||||||
|
"mandatory": true,
|
||||||
|
"data":
|
||||||
|
{
|
||||||
|
"kind": "existingDirectory",
|
||||||
|
"basePath": "%{InitialPath}",
|
||||||
|
"path": "%{InitialPath}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
"generators" :
|
"generators" :
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
@@ -31,7 +56,7 @@
|
|||||||
"data":
|
"data":
|
||||||
{
|
{
|
||||||
"source": "file.qep",
|
"source": "file.qep",
|
||||||
"target": "%{JS: Util.fileName(value('TargetPath'), value('DefaultSuffix'))}",
|
"target": "%{TargetPath}/%{EffectFile}",
|
||||||
"openInEditor": false
|
"openInEditor": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user