forked from qt-creator/qt-creator
Wizards: Always derive header guard from file name
Fixes: QTCREATORBUG-30140 Change-Id: Iad84bb49b26193f059f729009bc66832939f079c Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -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', 'QQuickItem'].indexOf(value('Base')) >= 0 }" },
|
||||
{ "key": "GUARD", "value": "%{JS: Cpp.classToHeaderGuard(value('Class'), Util.suffix(value('HdrFileName')))}" },
|
||||
{ "key": "GUARD", "value": "%{JS: Cpp.headerGuard(value('HdrFileName'))}" },
|
||||
{ "key": "SharedDataInit", "value": "%{JS: (value('IncludeQSharedData')) ? 'data(new %{CN}Data)' : '' }" },
|
||||
{ "key": "Dependencies", "value": "%{JS: '' + (value('IncludeQObject') || value('IncludeQSharedData') || value('BaseCB') === 'QObject' ? ':Qt.core' : '') + (value('IncludeQWidget') || value('IncludeQMainWindow') || value('BaseCB') === 'QWidget' || value('BaseCB') === 'QMainWindow' ? ':Qt.widgets' : '') + (value('IncludeQQuickItem') || value('BaseCB') === 'QQuickItem' ? ':Qt.quick' : '')}"}
|
||||
],
|
||||
|
@@ -14,7 +14,7 @@
|
||||
{ "key": "HdrPath", "value": "%{Path}/%{HdrFileName}" },
|
||||
{ "key": "SrcPath", "value": "%{Path}/%{SrcFileName}" },
|
||||
{ "key": "CN", "value": "%{JS: Cpp.className(value('Class'))}" },
|
||||
{ "key": "GUARD", "value": "%{JS: Cpp.classToHeaderGuard(value('Class'), Cpp.cxxHeaderSuffix())}" }
|
||||
{ "key": "GUARD", "value": "%{JS: Cpp.headerGuard(value('HdrFileName'))}" }
|
||||
],
|
||||
|
||||
"pages":
|
||||
|
@@ -32,7 +32,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.classToHeaderGuard(value('Class'), Util.suffix(value('HdrFileName')))}" },
|
||||
{ "key": "GUARD", "value": "%{JS: Cpp.headerGuard(value('HdrFileName'))}" },
|
||||
{ "key": "HasTranslation", "value": "%{JS: value('TsFileName') !== ''}" },
|
||||
{ "key": "GLOBAL_GUARD", "value": "%{JS: Cpp.headerGuard(value('GlobalHdrFileName'))}" }
|
||||
],
|
||||
|
@@ -22,7 +22,7 @@
|
||||
{ "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": "HasTranslation", "value": "%{JS: value('TsFileName') !== ''}" },
|
||||
{ "key": "GUARD", "value": "%{JS: Cpp.classToHeaderGuard(value('Class'), Util.suffix(value('HdrFileName')))}" }
|
||||
{ "key": "GUARD", "value": "%{JS: Cpp.headerGuard(value('HdrFileName'))}" }
|
||||
],
|
||||
|
||||
"pages":
|
||||
|
Reference in New Issue
Block a user