summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@theqtcompany.com>2014-11-13 15:54:26 +0100
committerTobias Hunger <tobias.hunger@theqtcompany.com>2014-11-19 12:33:58 +0100
commit5e54037fc6ee38404d4c2ea752ddabacbfb0a159 (patch)
tree8c8d2ae10031de76337c60c8d7e2614451d8a9ff /share
parent040b8855c47be3414f7a49a449b1568801b146d5 (diff)
downloadqt-creator-5e54037fc6ee38404d4c2ea752ddabacbfb0a159.tar.gz
JsonWizard: Support fixup expandos for lineedits on FieldPages
The fixup expando will be applied before validating a string in a lineedit. It uses the special "%{INPUT}" variable for its input and any change will be applied to the LineEdit. Change-Id: Ia496eacdbe541d418acb4a977c274527387896ca Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
Diffstat (limited to 'share')
-rw-r--r--share/qtcreator/templates/wizards/classes/qtquickui/wizard.json6
1 files changed, 5 insertions, 1 deletions
diff --git a/share/qtcreator/templates/wizards/classes/qtquickui/wizard.json b/share/qtcreator/templates/wizards/classes/qtquickui/wizard.json
index ea912652f4..08de27a95e 100644
--- a/share/qtcreator/templates/wizards/classes/qtquickui/wizard.json
+++ b/share/qtcreator/templates/wizards/classes/qtquickui/wizard.json
@@ -27,7 +27,10 @@
"trDisplayName": "Component name:",
"mandatory": true,
"type": "LineEdit",
- "data": { "validator": "(?:[A-Z_][a-zA-Z_0-9]*|)" }
+ "data": {
+ "validator": "(?:[A-Z_][a-zA-Z_0-9]*|)",
+ "fixup": "%{JS: '%{INPUT}'.charAt(0).toUpperCase() + '%{INPUT}'.slice(1) }"
+ }
},
{
@@ -42,6 +45,7 @@
"type": "LineEdit",
"data": {
"validator": "(?:[A-Z_][a-zA-Z_0-9]*|)",
+ "fixup": "%{JS: '%{INPUT}'.charAt(0).toUpperCase() + '%{INPUT}'.slice(1) }",
"trText": "%{Class}Form"
}
},