Files
qt-creator/share/qtcreator/templates/wizards/files/cppheader/file.h
Filip Bucek aaa8beab88 Wizards: Support using #pragma once instead of include guards
Allow users to choose #pragma once instead of #ifndef include guards in
generated header files.

Fixes: QTCREATORBUG-12166
Change-Id: I3ba41c7570beb9c5958e174b5581fcc25855050f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Filip Bucek <fbucek@atlas.cz>
2019-01-23 09:10:42 +00:00

10 lines
215 B
C

%{Cpp:LicenseTemplate}\
@if '%{Cpp:PragmaOnce}'
#pragma once
@else
#ifndef %{JS: Cpp.headerGuard('%{FileName}')}
#define %{JS: Cpp.headerGuard('%{FileName}')}
#endif // %{JS: Cpp.headerGuard('%{FileName}')}
@endif