From 4f989d6543de221fc4857a8c11750b5645bac7cc Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Thu, 9 May 2019 13:26:37 +0200 Subject: [PATCH] Wizards: Fix java file wizard Avoid ending up with a wrong named class when specifying the file name instead of the class name. Change-Id: I5e2ddaae1a16d60aa40fb9303e8d49efa9f51b7e Reviewed-by: Eike Ziller --- share/qtcreator/templates/wizards/files/java/wizard.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/qtcreator/templates/wizards/files/java/wizard.json b/share/qtcreator/templates/wizards/files/java/wizard.json index b3e4131d1ac..d465c9ead5b 100644 --- a/share/qtcreator/templates/wizards/files/java/wizard.json +++ b/share/qtcreator/templates/wizards/files/java/wizard.json @@ -9,7 +9,7 @@ "iconText": "java", "enabled": "%{JS: value('Plugins').indexOf('Android') >= 0}", - "options": [ { "key": "ClassName", "value": "%{JS: value('FileName').charAt(0).toUpperCase() + value('FileName').substr(1)}" } ], + "options": [ { "key": "ClassName", "value": "%{JS: value('FileName').charAt(0).toUpperCase() + value('FileName').substr(1).replace(/\.java$/,'')}" } ], "pages" : [