diff --git a/share/qtcreator/templates/wizards/qtcreatorplugin/myplugin.h b/share/qtcreator/templates/wizards/qtcreatorplugin/myplugin.h index 6644f4685fd..f605c10da97 100644 --- a/share/qtcreator/templates/wizards/qtcreatorplugin/myplugin.h +++ b/share/qtcreator/templates/wizards/qtcreatorplugin/myplugin.h @@ -1,9 +1,4 @@ -@if '%{Cpp:PragmaOnce}' #pragma once -@else -#ifndef %{GUARD} -#define %{GUARD} -@endif #include "%{GlobalHdrFileName}" @@ -29,7 +24,3 @@ private: }; } // namespace %{PluginName}::Internal - -@if ! '%{Cpp:PragmaOnce}' -#endif // %{GUARD} -@endif diff --git a/share/qtcreator/templates/wizards/qtcreatorplugin/myplugin_global.h b/share/qtcreator/templates/wizards/qtcreatorplugin/myplugin_global.h index ad863f17945..a81c8fcee0d 100644 --- a/share/qtcreator/templates/wizards/qtcreatorplugin/myplugin_global.h +++ b/share/qtcreator/templates/wizards/qtcreatorplugin/myplugin_global.h @@ -1,10 +1,5 @@ %{Cpp:LicenseTemplate}\ -@if '%{Cpp:PragmaOnce}' #pragma once -@else -#ifndef %{GLOBAL_GUARD} -#define %{GLOBAL_GUARD} -@endif #include @@ -13,7 +8,3 @@ #else # define %{LibraryExport} Q_DECL_IMPORT #endif -@if ! '%{Cpp:PragmaOnce}' - -#endif // %{GLOBAL_GUARD} -@endif diff --git a/share/qtcreator/templates/wizards/qtcreatorplugin/mypluginconstants.h b/share/qtcreator/templates/wizards/qtcreatorplugin/mypluginconstants.h index 699e49b2954..a5822a337e7 100644 --- a/share/qtcreator/templates/wizards/qtcreatorplugin/mypluginconstants.h +++ b/share/qtcreator/templates/wizards/qtcreatorplugin/mypluginconstants.h @@ -1,20 +1,9 @@ %{Cpp:LicenseTemplate}\ -@if '%{Cpp:PragmaOnce}' #pragma once -@else -#ifndef %{CONSTANTS_GUARD} -#define %{CONSTANTS_GUARD} -@endif -namespace %{PluginName} { -namespace Constants { +namespace %{PluginName}::Constants { const char ACTION_ID[] = "%{PluginName}.Action"; const char MENU_ID[] = "%{PluginName}.Menu"; -} // namespace Constants -} // namespace %{PluginName} - -@if ! '%{Cpp:PragmaOnce}' -#endif // %{CONSTANTS_GUARD} -@endif +} // namespace %{PluginName}::Constants diff --git a/share/qtcreator/templates/wizards/qtcreatorplugin/wizard.json b/share/qtcreator/templates/wizards/qtcreatorplugin/wizard.json index 95549b2cd99..6bbc9ce8038 100644 --- a/share/qtcreator/templates/wizards/qtcreatorplugin/wizard.json +++ b/share/qtcreator/templates/wizards/qtcreatorplugin/wizard.json @@ -23,10 +23,7 @@ { "key": "GlobalHdrFileName", "value": "%{JS: Util.fileName(value('PluginNameLower') + '_global', Util.preferredSuffix('text/x-c++hdr'))}" }, { "key": "ConstantsHdrFileName", "value": "%{JS: Util.fileName(value('PluginNameLower') + 'constants', Util.preferredSuffix('text/x-c++hdr'))}" }, { "key": "CN", "value": "%{JS: Cpp.className(value('PluginName') + 'Plugin')}" }, - { "key": "GUARD", "value": "%{JS: Cpp.classToHeaderGuard(value('CN'), Util.suffix(value('HdrFileName')))}" }, - { "key": "HasTranslation", "value": "%{JS: value('TsFileName') !== ''}" }, - { "key": "GLOBAL_GUARD", "value": "%{JS: Cpp.headerGuard(value('GlobalHdrFileName'))}" }, - { "key": "CONSTANTS_GUARD", "value": "%{JS: Cpp.headerGuard(value('ConstantsHdrFileName'))}" } + { "key": "HasTranslation", "value": "%{JS: value('TsFileName') !== ''}" } ], "pages":