Instead of the default (and pretty bugprone) qtcreator header guard CLASS_H, this defines a safer one in the form NAMESPACE_NESTED_NAMESPACES_CLASS_H. It is more likelly to comply with [llvm-header-guard][1] check of clang-tidy, if your namespaces matches your folder architecture.
Copy the three files (file.cpp
file.h
wizard.json
) in your local qtcreator template folder:
$HOME/.config/QtProject/qtcreator/templates/wizards/classes/cpp/
on Linux and macOS
or %APPDATA%\QtProject\qtcreator\templates\wizards\classes\cpp\
on Windows.
You may need to restart qtcreator for this to be considered.