diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2019-06-06 16:31:58 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2019-06-12 11:05:12 +0000 |
commit | a093dfc65c519c32a7273b70ef6af7b460363518 (patch) | |
tree | f08d24f0f1ba3b6f82f08ffb2384f94fd8e08923 /share | |
parent | 50dc5674d30e93ef2ef957eb0d2e620c1c486784 (diff) | |
download | qt-creator-a093dfc65c519c32a7273b70ef6af7b460363518.tar.gz |
Wizards: Include namespace in header guards again
This was broken in 63c339ffba while trying to fix a different bug.
Fixes: QTCREATORBUG-18157
Change-Id: Iec7e14de257195ed9bb20314b8031d3ef59df2ae
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'share')
3 files changed, 3 insertions, 3 deletions
diff --git a/share/qtcreator/templates/wizards/classes/cpp/wizard.json b/share/qtcreator/templates/wizards/classes/cpp/wizard.json index dd67d0dd59..ae466ba7ed 100644 --- a/share/qtcreator/templates/wizards/classes/cpp/wizard.json +++ b/share/qtcreator/templates/wizards/classes/cpp/wizard.json @@ -17,7 +17,7 @@ { "key": "CN", "value": "%{JS: Cpp.className(value('Class'))}" }, { "key": "Base", "value": "%{JS: value('BaseCB') === '' ? value('BaseEdit') : value('BaseCB')}" }, { "key": "isQObject", "value": "%{JS: [ 'QObject', 'QWidget', 'QMainWindow', 'QDeclarativeItem', 'QQuickItem'].indexOf(value('Base')) >= 0 }" }, - { "key": "GUARD", "value": "%{JS: Cpp.headerGuard(value('HdrFileName'))}" }, + { "key": "GUARD", "value": "%{JS: Cpp.classToHeaderGuard(value('Class'), Util.suffix(value('HdrFileName')))}" }, { "key": "SharedDataInit", "value": "%{JS: (value('IncludeQSharedData')) ? 'data(new %{CN}Data)' : '' }" } ], diff --git a/share/qtcreator/templates/wizards/projects/cpplibrary/wizard.json b/share/qtcreator/templates/wizards/projects/cpplibrary/wizard.json index ac43d6f1a9..af209105bf 100644 --- a/share/qtcreator/templates/wizards/projects/cpplibrary/wizard.json +++ b/share/qtcreator/templates/wizards/projects/cpplibrary/wizard.json @@ -30,7 +30,7 @@ { "key": "GlobalHdrFileName", "value": "%{JS: Util.fileName(value('ProjectName') + '_global', Util.preferredSuffix('text/x-c++hdr'))}" }, { "key": "TargetInstallPath", "value": "%{JS: value('IsShared') === 'true' ? '/usr/lib' : (value('IsQtPlugin') && value('PluginTargetPath') ? '$$[QT_INSTALL_PLUGINS]/' + value('PluginTargetPath') : '')}" }, { "key": "CN", "value": "%{JS: Cpp.className(value('Class'))}" }, - { "key": "GUARD", "value": "%{JS: Cpp.headerGuard(value('HdrFileName'))}" }, + { "key": "GUARD", "value": "%{JS: Cpp.classToHeaderGuard(value('Class'), Util.suffix(value('HdrFileName')))}" }, { "key": "GLOBAL_GUARD", "value": "%{JS: Cpp.headerGuard(value('GlobalHdrFileName'))}" } ], diff --git a/share/qtcreator/templates/wizards/projects/qtwidgetsapplication/wizard.json b/share/qtcreator/templates/wizards/projects/qtwidgetsapplication/wizard.json index fa7a4124ef..9cce84a413 100644 --- a/share/qtcreator/templates/wizards/projects/qtwidgetsapplication/wizard.json +++ b/share/qtcreator/templates/wizards/projects/qtwidgetsapplication/wizard.json @@ -19,7 +19,7 @@ { "key": "MainFileName", "value": "%{JS: 'main.' + Util.preferredSuffix('text/x-c++src')}" }, { "key": "UiHdrFileName", "value": "%{JS: (value('BuildSystem') === 'cmake' ? (Util.path(value('FormFileName')) + '/') : '') + 'ui_' + Util.completeBaseName(value('FormFileName')) + '.h'}" }, { "key": "CN", "value": "%{JS: Cpp.className(value('Class'))}" }, - { "key": "GUARD", "value": "%{JS: Cpp.headerGuard(value('HdrFileName'))}" } + { "key": "GUARD", "value": "%{JS: Cpp.classToHeaderGuard(value('Class'), Util.suffix(value('HdrFileName')))}" } ], "pages": |