forked from qt-creator/qt-creator
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>
21 lines
330 B
C++
21 lines
330 B
C++
@if '%{Cpp:PragmaOnce}'
|
|
#pragma once
|
|
@else
|
|
#ifndef @WIDGET_INCLUDE_GUARD@
|
|
#define @WIDGET_INCLUDE_GUARD@
|
|
@endif
|
|
|
|
#include <@WIDGET_BASE_CLASS@>
|
|
|
|
class @WIDGET_CLASS@ : public @WIDGET_BASE_CLASS@
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
@WIDGET_CLASS@(QWidget *parent = 0);
|
|
};
|
|
|
|
@if ! '%{Cpp:PragmaOnce}'
|
|
#endif // @WIDGET_INCLUDE_GUARD@
|
|
@endif
|