diff --git a/share/qtcreator/templates/wizards/classes/cpp/wizard.json b/share/qtcreator/templates/wizards/classes/cpp/wizard.json index 8c7d33ea731..ec343fa1592 100644 --- a/share/qtcreator/templates/wizards/classes/cpp/wizard.json +++ b/share/qtcreator/templates/wizards/classes/cpp/wizard.json @@ -179,12 +179,20 @@ { "source": "file.h", "target": "%{HdrPath}", - "openInEditor": true + "openInEditor": true, + "options": [ + { "key": "Cpp:License:FileName", "value": "%{HdrFileName}" }, + { "key": "Cpp:License:ClassName", "value": "%{CN}" } + ] }, { "source": "file.cpp", "target": "%{SrcPath}", - "openInEditor": true + "openInEditor": true, + "options": [ + { "key": "Cpp:License:FileName", "value": "%{SrcFileName}" }, + { "key": "Cpp:License:ClassName", "value": "%{CN}" } + ] } ] } diff --git a/share/qtcreator/templates/wizards/files/cppheader/wizard.json b/share/qtcreator/templates/wizards/files/cppheader/wizard.json index f0b93641a90..77f3e24c241 100644 --- a/share/qtcreator/templates/wizards/files/cppheader/wizard.json +++ b/share/qtcreator/templates/wizards/files/cppheader/wizard.json @@ -9,6 +9,8 @@ "icon": "../../global/genericfilewizard.png", "enabled": "%{JS: [ %{Plugins} ].indexOf('CppEditor') >= 0}", + "options": { "key": "FileName", "value": "%{JS: Cpp.fileName('%{TargetPath}', '%{JS: Util.preferredSuffix('text/x-c++hdr')}')}" }, + "pages" : [ { @@ -29,8 +31,9 @@ "data": { "source": "file.h", - "target": "%{JS: Cpp.fileName('%{TargetPath}', '%{JS: Util.preferredSuffix('text/x-c++hdr')}')}", - "openInEditor": true + "target": "%{FileName}", + "openInEditor": true, + "options": { "key": "Cpp:License:FileName", "value": "%{JS: Util.completeBaseName('%{FileName}')}" } } } ] diff --git a/share/qtcreator/templates/wizards/files/cppsource/wizard.json b/share/qtcreator/templates/wizards/files/cppsource/wizard.json index 6a0dbbb9f84..0058ba9a8c7 100644 --- a/share/qtcreator/templates/wizards/files/cppsource/wizard.json +++ b/share/qtcreator/templates/wizards/files/cppsource/wizard.json @@ -9,6 +9,8 @@ "icon": "../../global/genericfilewizard.png", "enabled": "%{JS: [ %{Plugins} ].indexOf('CppEditor') >= 0}", + "options": { "key": "FileName", "value": "%{JS: Cpp.fileName('%{TargetPath}', '%{JS: Util.preferredSuffix('text/x-c++src')}')}" }, + "pages" : [ { @@ -29,8 +31,9 @@ "data": { "source": "file.cpp", - "target": "%{JS: Cpp.fileName('%{TargetPath}', '%{JS: Util.preferredSuffix('text/x-c++src')}')}", - "openInEditor": true + "target": "%{FileName}", + "openInEditor": true, + "options": { "key": "Cpp:License:FileName", "value": "%{JS: Util.completeBaseName('%{FileName}')}" } } } ]