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>
29 lines
653 B
C++
29 lines
653 B
C++
@if '%{Cpp:PragmaOnce}'
|
|
#pragma once
|
|
@else
|
|
#ifndef @COLLECTION_INCLUDE_GUARD@
|
|
#define @COLLECTION_INCLUDE_GUARD@
|
|
@endif
|
|
|
|
#include <QtDesigner>
|
|
#include <qplugin.h>
|
|
|
|
class @COLLECTION_PLUGIN_CLASS@ : public QObject, public QDesignerCustomWidgetCollectionInterface
|
|
{
|
|
Q_OBJECT
|
|
Q_INTERFACES(QDesignerCustomWidgetCollectionInterface)
|
|
@COLLECTION_PLUGIN_METADATA@
|
|
|
|
public:
|
|
explicit @COLLECTION_PLUGIN_CLASS@(QObject *parent = 0);
|
|
|
|
virtual QList<QDesignerCustomWidgetInterface*> customWidgets() const;
|
|
|
|
private:
|
|
QList<QDesignerCustomWidgetInterface*> m_widgets;
|
|
};
|
|
|
|
@if ! '%{Cpp:PragmaOnce}'
|
|
#endif // @COLLECTION_INCLUDE_GUARD@
|
|
@endif
|